OSDN Git Service

分解台のレシピ機構できたのでコミット
[chemicraft/chemicraft.git] / common / chemicraft / GuiDecompositionTable.java
1 package chemicraft;
2
3 import java.util.ArrayList;
4 import java.util.HashMap;
5
6 import net.minecraft.src.Block;
7 import net.minecraft.src.EntityPlayer;
8 import net.minecraft.src.GuiButton;
9 import net.minecraft.src.GuiContainer;
10 import net.minecraft.src.InventoryBasic;
11 import net.minecraft.src.InventoryPlayer;
12 import net.minecraft.src.Item;
13 import net.minecraft.src.ItemStack;
14 import net.minecraft.src.StatCollector;
15 import cpw.mods.fml.common.Side;
16 import cpw.mods.fml.common.asm.SideOnly;
17 import cpw.mods.fml.common.network.PacketDispatcher;
18 import cpw.mods.fml.common.network.Player;
19
20 @SideOnly(Side.CLIENT)
21 public class GuiDecompositionTable extends GuiContainer {
22
23         /**
24          * the TileEntity.
25          */
26         private TileEntityDecompositionTable tileEntity;
27
28
29         /**
30          * the InventoryPlayer.
31          */
32         private InventoryPlayer inventoryPlayer;
33
34
35         /**
36          * the Container
37          */
38         private ContainerDecompositionTable container;
39
40
41
42         public GuiDecompositionTable(EntityPlayer par1EntityPlayer, TileEntityDecompositionTable par2){
43                 super(new ContainerDecompositionTable(par1EntityPlayer, par2));
44                 this.inventoryPlayer = par1EntityPlayer.inventory;
45                 this.tileEntity = par2;
46                 this.container = (ContainerDecompositionTable) this.inventorySlots;
47         }
48
49
50
51         @Override
52         public void initGui(){
53                 super.initGui();
54                 this.controlList.add(new GuiButton(0, this.guiLeft + 17, this.guiTop+4, 60, 16,"TakeOut"));
55         }
56
57
58
59
60         @Override
61         protected void drawGuiContainerForegroundLayer()
62         {
63         }
64
65
66
67         @Override
68         protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3){
69                 this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.guiDecompositionTexture));
70                 this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
71         }
72
73
74
75         @Override
76         protected void actionPerformed(GuiButton par1GuiButton){
77                 this.container.onButtonClick(par1GuiButton.id);
78         }
79
80 }