OSDN Git Service

テクスチャ修正
[chemicraft/chemicraft.git] / common / chemicraft / gui / GuiDecompositionTable.java
1 package chemicraft.gui;
2
3 import net.minecraft.src.EntityPlayer;
4 import net.minecraft.src.GuiButton;
5 import net.minecraft.src.GuiContainer;
6 import net.minecraft.src.InventoryPlayer;
7 import chemicraft.ChemiCraft;
8 import chemicraft.container.ContainerDecompositionTable;
9 import chemicraft.tileentity.TileEntityDecompositionTable;
10 import cpw.mods.fml.common.Side;
11 import cpw.mods.fml.common.asm.SideOnly;
12
13 @SideOnly(Side.CLIENT)
14 public class GuiDecompositionTable extends GuiContainer {
15
16         /**
17          * the TileEntity.
18          */
19         private TileEntityDecompositionTable tileEntity;
20
21
22         /**
23          * the InventoryPlayer.
24          */
25         private InventoryPlayer inventoryPlayer;
26
27
28         /**
29          * the Container
30          */
31         private ContainerDecompositionTable container;
32
33
34
35         public GuiDecompositionTable(EntityPlayer par1EntityPlayer, TileEntityDecompositionTable par2){
36                 super(new ContainerDecompositionTable(par1EntityPlayer, par2));
37                 this.inventoryPlayer = par1EntityPlayer.inventory;
38                 this.tileEntity = par2;
39                 this.container = (ContainerDecompositionTable) this.inventorySlots;
40         }
41
42
43
44         @Override
45         public void initGui(){
46                 super.initGui();
47                 this.controlList.add(new GuiButton(0, this.guiLeft + 17, this.guiTop+4, 60, 16,"TakeOut"));
48         }
49
50
51
52
53         @Override
54         protected void drawGuiContainerForegroundLayer()
55         {
56         }
57
58
59
60         @Override
61         protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3){
62                 this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.guiDecompositionTexture));
63                 this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
64         }
65
66
67
68         @Override
69         protected void actionPerformed(GuiButton par1GuiButton){
70                 this.container.onButtonClick(par1GuiButton.id);
71         }
72
73 }