diff options
Diffstat (limited to 'src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java')
-rw-r--r-- | src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java index 40333c0886..38bcf2d7eb 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java @@ -30,20 +30,29 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), Materials.SeedOil.getFluid(250L), ItemList.FR_Casing_Impregnated.get(1L, new Object[0]), 64, 16); GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Creosote.getFluid(1000L), GT_ModHandler.getModItem("Railcraft", "tile.railcraft.cube", 1L, 8), null, null, null, 16, 16); - int aMeta = aStack.getItemDamage(); + short aMeta = (short) aStack.getItemDamage(); - if (aMeta == 32767) { - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, null), new ItemStack(Items.coal, 1, 1))) && - (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", false))) { - GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[]{aStack})); + if (aMeta == Short.MAX_VALUE) { + if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, null), new ItemStack(Items.coal, 1, 1)))) { + if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { + GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[]{aStack})); + } } - for (int i = 0; i < 16; i++) { - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(new ItemStack(aStack.getItem(), 1, i), false, null), new ItemStack(Items.coal, 1, 1))) && - (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", false))) { - GT_ModHandler.removeFurnaceSmelting(new ItemStack(aStack.getItem(), 1, i)); + for (int i = 0; i < 32767; i++) { + if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(new ItemStack(aStack.getItem(), 1, i), false, null), new ItemStack(Items.coal, 1, 1)))) { + if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { + GT_ModHandler.removeFurnaceSmelting(new ItemStack(aStack.getItem(), 1, i)); + } } ItemStack tStack = GT_ModHandler.getRecipeOutput(new ItemStack[]{new ItemStack(aStack.getItem(), 1, i)}); - if (tStack != null) { + if (tStack == null) { + if (i >= 16) { + break; + } + } + else + { + ItemStack tPlanks = GT_Utility.copy(new Object[]{tStack}); tPlanks.stackSize = (tPlanks.stackSize * 3 / 2); GT_Values.RA.addCutterRecipe(new ItemStack(aStack.getItem(), 1, i), Materials.Lubricant.getFluid(1L), GT_Utility.copy(new Object[]{tPlanks}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 200, 8); @@ -55,9 +64,10 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra } } } else { - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, null), new ItemStack(Items.coal, 1, 1))) && - (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", false))) { - GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[]{aStack})); + if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, null), new ItemStack(Items.coal, 1, 1)))) { + if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { + GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[]{aStack})); + } } ItemStack tStack = GT_ModHandler.getRecipeOutput(new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{aStack})}); if (tStack != null) { @@ -72,8 +82,9 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra } } - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, null), new ItemStack(Items.coal, 1, 1))) && - (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", false))) - GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[]{aStack})); + if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, null), new ItemStack(Items.coal, 1, 1)))) { + if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) + GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[]{aStack})); + } } -} +}
\ No newline at end of file |