resonant-induction/minecraft/liquidmechanics/common/tileentity/ContainerReleaseValve.java

55 lines
1.7 KiB
Java
Raw Normal View History

package liquidmechanics.common.tileentity;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.inventory.SlotFurnace;
import net.minecraft.item.ItemStack;
public class ContainerReleaseValve extends Container
{
private TileEntityReleaseValve valve;
private int lastCookTime = 0;
private int lastBurnTime = 0;
private int lastItemBurnTime = 0;
public ContainerReleaseValve(InventoryPlayer par1InventoryPlayer, TileEntityReleaseValve par2TileEntityFurnace)
{
this.valve = par2TileEntityFurnace;
int var3;
for (var3 = 0; var3 < 3; ++var3)
{
for (int var4 = 0; var4 < 9; ++var4)
{
this.addSlotToContainer(new Slot(par1InventoryPlayer, var4 + var3 * 9 + 9, 8 + var4 * 18, 84 + var3 * 18));
}
}
for (var3 = 0; var3 < 9; ++var3)
{
this.addSlotToContainer(new Slot(par1InventoryPlayer, var3, 8 + var3 * 18, 142));
}
}
public boolean canInteractWith(EntityPlayer par1EntityPlayer)
{
return this.valve.isUseableByPlayer(par1EntityPlayer);
}
/**
* Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that.
*/
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)
{
ItemStack var3 = null;
Slot var4 = (Slot)this.inventorySlots.get(par2);
return var3;
}
}