OSDN Git Service

競合確認
[chemicraft/chemicraft.git] / common / chemicraft / container / ContainerToolAndWeaponCraftingTable.java
1 package chemicraft.container;
2
3 import net.minecraft.entity.player.EntityPlayer;
4 import net.minecraft.inventory.Container;
5 import net.minecraft.inventory.Slot;
6 import net.minecraft.world.World;
7 import chemicraft.slot.SlotToolAndWeaponCraftingTableResult;
8 import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
9
10 public class ContainerToolAndWeaponCraftingTable extends Container {
11
12         private World worldobj;
13
14         private int posX;
15         private int posY;
16         private int posZ;
17
18         private TileEntityToolAndWeaponCraftingTable tileentity;
19
20         public ContainerToolAndWeaponCraftingTable(EntityPlayer par1EntityPlayer, TileEntityToolAndWeaponCraftingTable par2){
21                 super();
22                 this.tileentity = par2;
23                 this.worldobj = this.tileentity.worldObj;
24                 this.posX = this.tileentity.xCoord;
25                 this.posY = this.tileentity.yCoord;
26                 this.posZ = this.tileentity.zCoord;
27
28                 for (int i = 0; i < 3; i++) {
29                         for (int j = 0; j < 3; j++) {
30                                 this.addSlotToContainer(new Slot(this.tileentity.invm, i * 3 + i, 30 + i * 18, 17 + j * 18));
31                         }
32                 }
33
34                 this.addSlotToContainer(new SlotToolAndWeaponCraftingTableResult(this.tileentity.invr, 0, 125, 36));
35
36                 int var3;
37                 for (var3 = 0; var3 < 3; ++var3)
38                 {
39                         for (int var4 = 0; var4 < 9; ++var4)
40                         {
41                                 this.addSlotToContainer(new Slot(par1EntityPlayer.inventory, var4 + var3 * 9 + 9, 8 + var4 * 18, 85 + var3 * 18));
42                         }
43                 }
44
45                 for (var3 = 0; var3 < 9; ++var3)
46                 {
47                         this.addSlotToContainer(new Slot(par1EntityPlayer.inventory, var3, 8 + var3 * 18, 143));
48                 }
49
50         }
51
52         @Override
53         public boolean canInteractWith(EntityPlayer var1) {
54                 return true;
55         }
56
57 }