OSDN Git Service

競合確認
[chemicraft/chemicraft.git] / common / chemicraft / container / ContainerToolAndWeaponCraftingTable.java
index acadb79..b6b7c2c 100644 (file)
@@ -2,17 +2,56 @@ package chemicraft.container;
 
 import net.minecraft.entity.player.EntityPlayer;
 import net.minecraft.inventory.Container;
+import net.minecraft.inventory.Slot;
+import net.minecraft.world.World;
+import chemicraft.slot.SlotToolAndWeaponCraftingTableResult;
 import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
 
 public class ContainerToolAndWeaponCraftingTable extends Container {
 
+       private World worldobj;
+
+       private int posX;
+       private int posY;
+       private int posZ;
+
+       private TileEntityToolAndWeaponCraftingTable tileentity;
+
        public ContainerToolAndWeaponCraftingTable(EntityPlayer par1EntityPlayer, TileEntityToolAndWeaponCraftingTable par2){
                super();
+               this.tileentity = par2;
+               this.worldobj = this.tileentity.worldObj;
+               this.posX = this.tileentity.xCoord;
+               this.posY = this.tileentity.yCoord;
+               this.posZ = this.tileentity.zCoord;
+
+               for (int i = 0; i < 3; i++) {
+                       for (int j = 0; j < 3; j++) {
+                               this.addSlotToContainer(new Slot(this.tileentity.invm, i * 3 + i, 30 + i * 18, 17 + j * 18));
+                       }
+               }
+
+               this.addSlotToContainer(new SlotToolAndWeaponCraftingTableResult(this.tileentity.invr, 0, 125, 36));
+
+               int var3;
+               for (var3 = 0; var3 < 3; ++var3)
+               {
+                       for (int var4 = 0; var4 < 9; ++var4)
+                       {
+                               this.addSlotToContainer(new Slot(par1EntityPlayer.inventory, var4 + var3 * 9 + 9, 8 + var4 * 18, 85 + var3 * 18));
+                       }
+               }
+
+               for (var3 = 0; var3 < 9; ++var3)
+               {
+                       this.addSlotToContainer(new Slot(par1EntityPlayer.inventory, var3, 8 + var3 * 18, 143));
+               }
+
        }
 
        @Override
        public boolean canInteractWith(EntityPlayer var1) {
-               return false;
+               return true;
        }
 
 }