From 05c78126859231a68e199dc34613689bd0978e2f Mon Sep 17 00:00:00 2001 From: Foghrye4 Date: Mon, 11 Apr 2016 19:44:54 +0300 Subject: Initial commit --- .../GaedesMercuryRotaryPumpTileEntity.java | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java (limited to 'ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java') diff --git a/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java b/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java new file mode 100644 index 0000000..3a9b814 --- /dev/null +++ b/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java @@ -0,0 +1,83 @@ +package ihl.processing.chemistry; + +import java.util.List; + +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ic2.core.ContainerBase; +import ihl.interfaces.IWorkspaceElement; +import ihl.processing.metallurgy.BasicElectricMotorTileEntity; +import ihl.utils.IHLUtils; + +public class GaedesMercuryRotaryPumpTileEntity extends BasicElectricMotorTileEntity implements IWorkspaceElement{ + + public boolean ready=false; + + public GaedesMercuryRotaryPumpTileEntity() + { + this.isGuiScreenOpened=true; + } + + @Override + public void operate() + { + ready=true; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) + { + return IHLUtils.getThisModItemStack("gaedesMercuryRotaryPump"); + } + + @Override + public List[] getInput() + { + return null; + } + + @Override + public boolean canOperate() + { + return !ready; + } + + @Override + @SideOnly(Side.CLIENT) + public GuiScreen getGui(EntityPlayer player, boolean arg1) { + return new GaedesMercuryRotaryPumpGui(new GaedesMercuryRotaryPumpContainer(player, this)); + } + + @Override + public ContainerBase getGuiContainer(EntityPlayer player) { + return new GaedesMercuryRotaryPumpContainer(player, this); + } + + @Override + public boolean canBeUsed() + { + return ready; + } + + @Override + public void use() + { + ready=false; + } + + @Override + public boolean getIsInvalid() + { + return this.isInvalid(); + } + + @Override + public boolean shouldRenderInPass(int pass) + { + return pass==0; + } + +} -- cgit v1.2.3