OSDN Git Service

06c739e2da66c65e9b26bc65845e3c89c642e897
[chemicraft/chemicraft.git] / common / chemicraft / ContainerScienceCraftingTable.java
1 package chemicraft;
2
3 import net.minecraft.src.Block;
4 import net.minecraft.src.Container;
5 import net.minecraft.src.CraftingManager;
6 import net.minecraft.src.EntityPlayer;
7 import net.minecraft.src.IInventory;
8 import net.minecraft.src.InventoryCraftResult;
9 import net.minecraft.src.InventoryCrafting;
10 import net.minecraft.src.InventoryPlayer;
11 import net.minecraft.src.ItemStack;
12 import net.minecraft.src.Slot;
13 import net.minecraft.src.SlotCrafting;
14 import net.minecraft.src.World;
15
16 public class ContainerScienceCraftingTable extends Container
17 {
18     private World worldObj;
19     private int posX;
20     private int posY;
21     private int posZ;
22
23     public ContainerScienceCraftingTable(InventoryPlayer par1InventoryPlayer, World par2World, int par3, int par4, int par5)
24     {
25         this.worldObj = par2World;
26         this.posX = par3;
27         this.posY = par4;
28         this.posZ = par5;
29         int var6;
30         int var7;
31
32     }
33
34     /**
35      * Callback for when the crafting matrix is changed.
36      */
37     public void onCraftMatrixChanged(IInventory par1IInventory)
38     {
39     }
40
41     /**
42      * Callback for when the crafting gui is closed.
43      */
44     public void onCraftGuiClosed(EntityPlayer par1EntityPlayer)
45     {
46         super.onCraftGuiClosed(par1EntityPlayer);
47     }
48
49     public boolean canInteractWith(EntityPlayer par1EntityPlayer)
50     {
51         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;
52     }
53
54     /**
55      * Called to transfer a stack from one inventory to the other eg. when shift clicking.
56      */
57     public ItemStack transferStackInSlot(int par1)
58     {
59         return null;
60     }
61 }