OSDN Git Service

Merge branch 'master' of git.sourceforge.jp:/gitroot/chemicraft/chemicraft
[chemicraft/chemicraft.git] / common / pcc / chemicraft / container / ContainerElectrolysisTable.java
index 79c722f..493692d 100644 (file)
@@ -8,13 +8,14 @@ import pcc.chemicraft.ChemiCraft;
 import pcc.chemicraft.inventory.InventoryElectrolysisFuel;
 import pcc.chemicraft.inventory.InventoryElectrolysisMaterial;
 import pcc.chemicraft.inventory.InventoryElectrolysisResult;
-import pcc.chemicraft.slot.SlotPyrolysisTableFuel;
-import pcc.chemicraft.slot.SlotPyrolysisTableMaterial;
+import pcc.chemicraft.slot.SlotElectrolysisFuel;
+import pcc.chemicraft.slot.SlotElectrolysisMaterial;
+import pcc.chemicraft.slot.SlotElectrolysisResult;
 import pcc.chemicraft.slot.SlotPyrolysisTableResult;
 import pcc.chemicraft.tileentity.TileEntityElectrolysisTable;
 
-public class ContainerElectrolysisTable extends Container
-{
+
+public class ContainerElectrolysisTable extends Container {
 
        private World worldObj;
 
@@ -22,12 +23,12 @@ public class ContainerElectrolysisTable extends Container
        private int posY;
        private int posZ;
 
+       private TileEntityElectrolysisTable tileentity;
+
        private InventoryElectrolysisMaterial invm;
        private InventoryElectrolysisResult invr;
        private InventoryElectrolysisFuel invf;
 
-       private TileEntityElectrolysisTable tileentity;
-
        public ContainerElectrolysisTable(EntityPlayer par1EntityPlayer, TileEntityElectrolysisTable par2) {
                super();
                this.tileentity = par2;
@@ -44,11 +45,11 @@ public class ContainerElectrolysisTable extends Container
 
                for (int i = 0; i < 4; i++) {
                        for (int j = 0; j < 4; j++) {
-                               this.addSlotToContainer(new SlotPyrolysisTableResult(this.invr, i*4 + j, 88+i*18, 17+j*18));
+                               this.addSlotToContainer(new SlotElectrolysisResult(this.tileentity.getInvResult(), i*4 + j, 88+i*18, 17+j*18));
                        }
                }
-               this.addSlotToContainer(new SlotPyrolysisTableMaterial(this.invm, 0, 27, 20));
-               this.addSlotToContainer(new SlotPyrolysisTableFuel(this.invf, 0, 27, 63));
+               this.addSlotToContainer(new SlotElectrolysisMaterial(this.tileentity.getInvMaterial(), 0, 27, 20));
+               this.addSlotToContainer(new SlotElectrolysisFuel(this.tileentity.getInvFuel(), 0, 27, 63));
 
                int var3;
                for (var3 = 0; var3 < 3; ++var3)
@@ -63,7 +64,6 @@ public class ContainerElectrolysisTable extends Container
                {
                        this.addSlotToContainer(new Slot(par1EntityPlayer.inventory, var3, 8 + var3 * 18, 179));
                }
-
        }
 
        @Override