Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/niard'
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryLoenwind committed Oct 11, 2015
2 parents 0227397 + eddf274 commit 00525ac
Show file tree
Hide file tree
Showing 20 changed files with 1,120 additions and 14 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ minecraft_version=1.7.10
forge_version=10.13.4.1492-1.7.10
forgeDep_version=10.13.4

mod_version=0.2.1
mod_version=0.3.0

#Comment out this line to get rid of the appendix
mod_appendix=beta
Expand All @@ -13,7 +13,7 @@ ccc_version=1.0.7.46
ccl_version=1.1.3.138
ae2_version=rv1-stable-1
endercore_version=1.7.10-0.1.0.25_beta
enderio_version=1.7.10-2.3.0.416_beta
enderio_version=1.7.10-2.3.0.417_beta
forestry_version=forestry_1.7.10:3.6.2.19
waterhooks_version=1.1.2

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/info/loenwind/enderioaddons/common/GuiIds.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class GuiIds {
public static int GUI_ID_COBBLEWORKS = 0;
public static int GUI_ID_WATERWORKS = 0;
public static int GUI_ID_IHOPPER = 0;
public static int GUI_ID_NIARD = 0;

private GuiIds() {
}
Expand All @@ -21,6 +22,7 @@ public static void compute_GUI_IDs() {
GUI_ID_COBBLEWORKS = nextID();
GUI_ID_WATERWORKS = nextID();
GUI_ID_IHOPPER = nextID();
GUI_ID_NIARD = nextID();
}

private static int lastId = crazypants.enderio.GuiHandler.GUI_ID_CAP_BANK;
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/info/loenwind/enderioaddons/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ public enum Config {

impulseHopperEnabled(Section.RECIPES, true, "Enable the crafting recipe for the Impulse Hopper"), //

niardContinuousEnergyUseRF(Section.NIARD, 10, "The amount of power used by a niard per tick."), //
niardPerBucketEnergyUseRF(Section.NIARD, 400, "The amount of power used by a niard per 1000mB of liquid placed into the world."), //

niardEnabled(Section.RECIPES, true, "Enable the crafting recipe for the Niard"), //

;

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import javax.annotation.Nonnull;

public enum Section {
DRAIN("drain"), COBBLEWORKS("cobbleworks"), WATERWORKS("waterworks"), RECIPES("recipes"), DEV("development"), IHOPPER("impulsehopper");
DRAIN("drain"), COBBLEWORKS("cobbleworks"), WATERWORKS("waterworks"), RECIPES("recipes"), DEV("development"), IHOPPER("impulsehopper"), NIARD("niard");

@Nonnull
public final String name;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package info.loenwind.enderioaddons.fluid;

public enum FluidType {
VANILLA,
CLASSIC,
FINITE
}
17 changes: 17 additions & 0 deletions src/main/java/info/loenwind/enderioaddons/gui/StdSlot.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package info.loenwind.enderioaddons.gui;

import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;

public final class StdSlot extends Slot {

public StdSlot(IInventory inventory, int slotIndex, int x, int y) {
super(inventory, slotIndex, x, y);
}

@Override
public boolean isItemValid(ItemStack itemStack) {
return inventory.isItemValidForSlot(getSlotIndex(), itemStack);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static info.loenwind.enderioaddons.common.NullHelper.notnull;
import static info.loenwind.enderioaddons.common.NullHelper.notnullF;
import info.loenwind.enderioaddons.fluid.FluidType;

import java.util.HashSet;
import java.util.Set;
Expand Down Expand Up @@ -37,7 +38,7 @@ public final class FluidHelper {
@Nonnull
private final ForgeDirection upflowDirection;
@Nonnull
private final FType type;
private final FluidType type;
@Nullable
private final BlockCoord startbc;
private IDrainingCallback hook;
Expand All @@ -58,11 +59,11 @@ private FluidHelper(@Nonnull World world, @Nonnull FluidStack stack, @Nullable B
this.downflowDirection = fluid.getDensity() > 0 ? ForgeDirection.DOWN : ForgeDirection.UP;
this.upflowDirection = downflowDirection == ForgeDirection.UP ? ForgeDirection.DOWN : ForgeDirection.UP;
if (this.block instanceof BlockFluidClassic) {
this.type = FType.CLASSIC;
this.type = FluidType.CLASSIC;
} else if (this.block instanceof BlockFluidFinite) {
this.type = FType.FINITE;
this.type = FluidType.FINITE;
} else if (this.block instanceof BlockLiquid) {
this.type = FType.VANILLA;
this.type = FluidType.VANILLA;
} else {
throw new Exception();
}
Expand Down Expand Up @@ -146,12 +147,6 @@ public static FluidHelper getInstance(@Nonnull World world, @Nonnull FluidStack
return getInstance(world, stack, null);
}

private enum FType {
VANILLA,
CLASSIC,
FINITE
}

private static boolean isInWorld(@Nonnull BlockCoord bc) {
return bc.y > 0 && bc.y <= 255;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package info.loenwind.enderioaddons.machine.niard;

import java.util.List;

import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlockWithMetadata;
import net.minecraft.item.ItemStack;

import com.enderio.core.api.client.gui.IAdvancedTooltipProvider;

import crazypants.enderio.EnderIOTab;

public class BlockItemNiard extends ItemBlockWithMetadata implements IAdvancedTooltipProvider {

public BlockItemNiard() {
this(BlockNiard.blockNiard);
}

public BlockItemNiard(Block block) {
super(block, block);
setHasSubtypes(false);
setCreativeTab(EnderIOTab.tabEnderIO);
}

@Override
public void addCommonEntries(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag) {
BlockNiard.blockNiard.addCommonEntries(itemstack, entityplayer, list, flag);
}

@Override
public void addBasicEntries(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag) {
BlockNiard.blockNiard.addBasicEntries(itemstack, entityplayer, list, flag);
}

@Override
public void addDetailedEntries(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag) {
BlockNiard.blockNiard.addDetailedEntries(itemstack, entityplayer, list, flag);
}

}
Loading

0 comments on commit 00525ac

Please sign in to comment.