3 import net.minecraft.src.Container;
4 import net.minecraft.src.EntityPlayer;
5 import net.minecraft.src.IInventory;
6 import net.minecraft.src.InventoryPlayer;
7 import net.minecraft.src.ItemStack;
8 import net.minecraft.src.Slot;
9 import net.minecraft.src.World;
11 public class ContainerScienceCraftingTable extends Container
13 private World worldObj;
18 public ContainerScienceCraftingTable(InventoryPlayer par1InventoryPlayer, TileEntityScienceCraftingTable par2)
20 this.worldObj = par2.worldObj;
21 this.posX = par2.xCoord;
22 this.posY = par2.yCoord;
23 this.posZ = par2.zCoord;
24 this.addSlotToContainer(new Slot(par2, 0, 10, 10));
28 * Callback for when the crafting matrix is changed.
30 public void onCraftMatrixChanged(IInventory par1IInventory)
35 * Callback for when the crafting gui is closed.
37 public void onCraftGuiClosed(EntityPlayer par1EntityPlayer)
39 super.onCraftGuiClosed(par1EntityPlayer);
42 public boolean canInteractWith(EntityPlayer par1EntityPlayer)
44 return this.worldObj.getBlockId(this.posX, this.posY, this.posZ) != ChemiCraft.instance.scienceCraftingTableID ? false : par1EntityPlayer.getDistanceSq((double)this.posX + 0.5D, (double)this.posY + 0.5D, (double)this.posZ + 0.5D) <= 64.0D;
48 * Called to transfer a stack from one inventory to the other eg. when shift clicking.
50 public ItemStack transferStackInSlot(int par1)