OSDN Git Service

変更点をそのままにして修正し、間違っているところを消去&修正
[chemicraft/chemicraft.git] / common / chemicraft / GuiScienceCraftingTable.java
1 package chemicraft;
2
3 import java.util.ArrayList;
4
5 import net.minecraft.src.GuiContainer;
6 import net.minecraft.src.InventoryPlayer;
7 import net.minecraft.src.MinecraftException;
8 import net.minecraft.src.World;
9
10 import org.lwjgl.opengl.GL11;
11
12 import cpw.mods.fml.common.Side;
13 import cpw.mods.fml.common.asm.SideOnly;
14
15 @SideOnly(Side.CLIENT)
16 public class GuiScienceCraftingTable extends GuiContainer
17 {
18
19         private ArrayList<ChemiCraftTabs> tabList = new ArrayList<ChemiCraftTabs>();
20
21         public GuiScienceCraftingTable(InventoryPlayer par1InventoryPlayer, World par2World, int par3, int par4, int par5)
22         {
23                 super(new ContainerScienceCraftingTable(par1InventoryPlayer, par2World, par3, par4, par5));
24         }
25
26         @Override
27         protected void drawGuiContainerForegroundLayer()
28         {
29                 //this.fontRenderer.drawString(StatCollector.translateToLocal("container.crafting"), 28, 6, 4210752);
30                 //this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
31         }
32
33         @Override
34         protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
35         {
36                 int var4 = this.mc.renderEngine.getTexture("/ChemiCraft/guis/Decomposition.png");
37                 int var7 = this.mc.renderEngine.getTexture("/gui/allitems.png");
38                 GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
39                 this.mc.renderEngine.bindTexture(var4);
40                 int var5 = (this.width - this.xSize) / 2;
41                 int var6 = (this.height - this.ySize) / 2;
42                 this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
43
44                 for(int i = 0;i < tabList.size();i++){
45                         this.mc.renderEngine.bindTexture(var7);
46                         int var8 = var5 + tabList.get(i).getID() * 28;
47                         int var9 = var6 - 32;
48                         this.drawTexturedModalRect(var8, var9, 0, 0, 28, 32);
49                 }
50         }
51
52         private void addTabs(int id, int Texture, String name){
53                 for(int i = 0;i < tabList.size();i++){
54                         if(id == tabList.get(i).getID()){
55                                 try {
56                                         throw new Exception("ChemiCraft\93à\82Å\83G\83\89\81[:ChemiCraftTabs\82ÌID\82ª\8fd\95¡\82µ\82Ä\82¢\82Ü\82·");
57                                 } catch (Exception e) {
58                                         e.printStackTrace();
59                                 }
60                         }
61                 }
62                 tabList.add(new ChemiCraftTabs(id, Texture, name));
63         }
64
65 }