diff --git a/resources/assets/enderio/lang/en_US.lang b/resources/assets/enderio/lang/en_US.lang index 26b7830b..b0fcba9c 100644 --- a/resources/assets/enderio/lang/en_US.lang +++ b/resources/assets/enderio/lang/en_US.lang @@ -374,6 +374,7 @@ tile.blockZombieGenerator.name=Zombie Generator tile.blockZombieGenerator.tooltip.detailed.line1=Consumes Nutrient Distillation tile.blockZombieGenerator.tooltip.detailed.line2=to generate power enderio.zombieGenerator.fuelTank=Nutrient Tank +enderio.gui.fluid.minReq=%s Required for activation tile.blockKillerJoe.name=Killer Joe tile.blockKillerJoe.tooltip.detailed.line1=Attacks nearby creatures when diff --git a/src/main/java/crazypants/enderio/machine/generator/zombie/GuiZombieGenerator.java b/src/main/java/crazypants/enderio/machine/generator/zombie/GuiZombieGenerator.java index 1678ca74..32987f1a 100644 --- a/src/main/java/crazypants/enderio/machine/generator/zombie/GuiZombieGenerator.java +++ b/src/main/java/crazypants/enderio/machine/generator/zombie/GuiZombieGenerator.java @@ -19,7 +19,7 @@ import crazypants.util.Lang; public class GuiZombieGenerator extends GuiPoweredMachineBase { - public GuiZombieGenerator(InventoryPlayer inventory, TileZombieGenerator tileEntity) { + public GuiZombieGenerator(InventoryPlayer inventory, final TileZombieGenerator tileEntity) { super(tileEntity, new ContainerZombieGenerator(inventory, tileEntity)); addToolTip(new GuiToolTip(new Rectangle(80, 21, 15, 47), "") { @@ -30,8 +30,10 @@ public class GuiZombieGenerator extends GuiPoweredMachineBase { private IconButtonEIO xpB; private IconButtonEIO xp10B; - public GuiKillerJoe(InventoryPlayer inventory, TileKillerJoe tileEntity) { + public GuiKillerJoe(InventoryPlayer inventory, final TileKillerJoe tileEntity) { super(tileEntity, new ContainerKillerJoe(inventory, tileEntity)); addToolTip(new GuiToolTip(new Rectangle(18, 11, 15, 47), "") { @@ -39,6 +39,9 @@ public class GuiKillerJoe extends GuiMachineBase { String heading = Lang.localize("killerJoe.fuelTank"); text.add(heading); text.add(Fluids.toCapactityString(getTileEntity().fuelTank)); + if(tileEntity.fuelTank.getFluidAmount() < tileEntity.getActivationAmount()) { + text.add(Lang.localize("gui.fluid.minReq", tileEntity.getActivationAmount() + Fluids.MB())); + } } }); diff --git a/src/main/java/crazypants/enderio/machine/killera/TileKillerJoe.java b/src/main/java/crazypants/enderio/machine/killera/TileKillerJoe.java index 9cc2153c..a1ad5613 100644 --- a/src/main/java/crazypants/enderio/machine/killera/TileKillerJoe.java +++ b/src/main/java/crazypants/enderio/machine/killera/TileKillerJoe.java @@ -158,7 +158,7 @@ public class TileKillerJoe extends AbstractMachineEntity implements IFluidHandle return false; } - if(fuelTank.getFluidAmount() < fuelTank.getCapacity() * 0.7f) { + if(fuelTank.getFluidAmount() < getActivationAmount()) { return false; } @@ -189,6 +189,10 @@ public class TileKillerJoe extends AbstractMachineEntity implements IFluidHandle } return false; } + + int getActivationAmount() { + return (int) (fuelTank.getCapacity() * 0.7f); + } private boolean canJoeSee(EntityLivingBase ent) {