OSDN Git Service

競合確認
[chemicraft/chemicraft.git] / common / chemicraft / tileentity / TileEntityPyrolysisTable.java
index 02b592d..9a451cb 100644 (file)
@@ -87,7 +87,7 @@ public class TileEntityPyrolysisTable extends TileEntity {
                                } else if (this.worldObj.isThundering() && var1) {
                                        this.heat += 0.25F;
                                } else {
-                                       this.heat += 3F;
+                                       this.heat += 0.5F;
                                }
                        } else {
                                this.heat = 1700;
@@ -121,7 +121,7 @@ public class TileEntityPyrolysisTable extends TileEntity {
                                                //var2 = true;
                                                if (itemstackMaterial.itemID == materialItem.itemID && itemstackMaterial.getItemDamage() == materialItem.getItemDamage()) {
                                                        this.inItem(itemstackMaterial);
-                                                       if (materialItem.stackSize >= 1) {
+                                                       if (materialItem.stackSize > 1) {
                                                                this.invm.setInventorySlotContents(0, new ItemStack(materialItem.itemID, --materialItem.stackSize, materialItem.getItemDamage()));
                                                        } else {
                                                                this.invm.setInventorySlotContents(0, null);
@@ -153,7 +153,7 @@ public class TileEntityPyrolysisTable extends TileEntity {
                                                                        if (fuelItem != null) {
                                                                                if (itemstackFuel.itemID == fuelItem.itemID && itemstackFuel.getItemDamage() == fuelItem.getItemDamage()) {
                                                                                        this.fuelRestTime = fuelList.get(itemstackFuel);
-                                                                                       if (fuelItem.stackSize >= 1) {
+                                                                                       if (fuelItem.stackSize > 1) {
                                                                                                this.invf.setInventorySlotContents(0, new ItemStack(fuelItem.itemID, --fuelItem.stackSize, fuelItem.getItemDamage()));
                                                                                                break;
                                                                                        } else {
@@ -417,8 +417,8 @@ public class TileEntityPyrolysisTable extends TileEntity {
        public boolean isInItemCheck(ItemStack key) {
                ItemStack[] results = recipeList.get(key).clone();
                ItemStack[] containerResults = new ItemStack[this.invr.getSizeInventory()];
-               for (int i = 0; i < this.invr.getSizeInventory(); i++) {
-                       containerResults[i] = this.invr.getStackInSlot(i);
+               for (int j = 0; j < this.invr.getSizeInventory(); j++) {
+                       containerResults[j] = this.invr.getStackInSlot(j);
                }
 
                for (int i = 0; i < results.length; i++) {
@@ -427,6 +427,7 @@ public class TileEntityPyrolysisTable extends TileEntity {
                        int var5 = results[i].stackSize;
                        for (int j = 0; j < containerResults.length; j++) {
                                if (containerResults[j] == null) {
+                                       containerResults[j] = results[i];
                                        results[i] = null;
                                        break;
                                } else {
@@ -436,6 +437,7 @@ public class TileEntityPyrolysisTable extends TileEntity {
                                        int var7 = containerResults[j].getMaxStackSize();
                                        if (var1 == var2 && var3 == var4) {
                                                if (var5 + var6 <= var7) {
+                                                       containerResults[j] = results[i];
                                                        results[i] = null;
                                                        break;
                                                } else {
@@ -455,12 +457,12 @@ public class TileEntityPyrolysisTable extends TileEntity {
 
        public void inItem(ItemStack key) {
                ItemStack[] results = recipeList.get(key);
-               ItemStack[] containerResults = new ItemStack[this.invr.getSizeInventory()];
-               for (int i = 0; i < this.invr.getSizeInventory(); i++) {
-                       containerResults[i] = this.invr.getStackInSlot(i);
-               }
 
                for (int i = 0; i < results.length; i++) {
+                       ItemStack[] containerResults = new ItemStack[this.invr.getSizeInventory()];
+                       for (int j = 0; j < this.invr.getSizeInventory(); j++) {
+                               containerResults[j] = this.invr.getStackInSlot(j);
+                       }
                        int var1 = results[i].itemID;
                        int var3 = results[i].getItemDamage();
                        int var5 = results[i].stackSize;
@@ -475,11 +477,6 @@ public class TileEntityPyrolysisTable extends TileEntity {
                                        int var7 = containerResults[j].getMaxStackSize();
                                        if (var1 == var2 && var3 == var4) {
                                                if (var5 + var6 <= var7) {
-                                                       System.out.println(var5);
-                                                       System.out.println(var6);
-                                                       System.out.println(var5 + var6);
-                                                       System.out.println(i);
-                                                       System.out.println(j);
                                                        this.invr.setInventorySlotContents(j, new ItemStack(results[i].itemID, var5 + var6, results[i].getItemDamage()));
                                                        break;
                                                } else {