Processing Ore code changes from Blood asps gt code

This commit is contained in:
Dream-Master 2016-09-28 23:09:15 +02:00
parent 125201371f
commit aad7dba1e5

View file

@ -32,7 +32,6 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
GT_ModHandler.addValuableOre(GT_Utility.getBlockFromStack(aOreStack), aOreStack.getItemDamage(), aMaterial.mOreValue); GT_ModHandler.addValuableOre(GT_Utility.getBlockFromStack(aOreStack), aOreStack.getItemDamage(), aMaterial.mOreValue);
Materials tMaterial = aMaterial.mOreReplacement; Materials tMaterial = aMaterial.mOreReplacement;
Materials tPrimaryByMaterial = null; Materials tPrimaryByMaterial = null;
Materials tSecondaryByMaterial = null;
aMultiplier = Math.max(1, aMultiplier); aMultiplier = Math.max(1, aMultiplier);
aOreStack = GT_Utility.copyAmount(1L, new Object[]{aOreStack}); aOreStack = GT_Utility.copyAmount(1L, new Object[]{aOreStack});
aOreStack.stackSize = 1; aOreStack.stackSize = 1;
@ -42,14 +41,10 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
ItemStack tGem = GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial, 1L); ItemStack tGem = GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial, 1L);
ItemStack tSmeltInto = tIngot == null ? null : aMaterial.contains(SubTag.SMELTING_TO_GEM) ? GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial.mDirectSmelting, GT_OreDictUnificator.get(OrePrefixes.crystal, tMaterial.mDirectSmelting, GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial, GT_OreDictUnificator.get(OrePrefixes.crystal, tMaterial, 1L), 1L), 1L), 1L) : tIngot; ItemStack tSmeltInto = tIngot == null ? null : aMaterial.contains(SubTag.SMELTING_TO_GEM) ? GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial.mDirectSmelting, GT_OreDictUnificator.get(OrePrefixes.crystal, tMaterial.mDirectSmelting, GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial, GT_OreDictUnificator.get(OrePrefixes.crystal, tMaterial, 1L), 1L), 1L), 1L) : tIngot;
ItemStack tSmall = GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMaterial, 1L);
ItemStack tDust = GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial, tGem, 1L); ItemStack tDust = GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial, tGem, 1L);
ItemStack tCleaned = GT_OreDictUnificator.get(OrePrefixes.crushedPurified, tMaterial, tDust, 1L); ItemStack tCleaned = GT_OreDictUnificator.get(OrePrefixes.crushedPurified, tMaterial, tDust, 1L);
ItemStack tCrushed = GT_OreDictUnificator.get(OrePrefixes.crushed, tMaterial, aMaterial.mOreMultiplier * aMultiplier); ItemStack tCrushed = GT_OreDictUnificator.get(OrePrefixes.crushed, tMaterial, aMaterial.mOreMultiplier * aMultiplier);
ItemStack tPrimaryByProduct = null; ItemStack tPrimaryByProduct = null;
ItemStack tPrimaryByProductSmall = null;
ItemStack tSecondaryByProduct = null;
ItemStack tSecondaryByProductSmall = null;
if (tCrushed == null) { if (tCrushed == null) {
tCrushed = GT_OreDictUnificator.get(OrePrefixes.dustImpure, tMaterial, GT_Utility.copyAmount(aMaterial.mOreMultiplier * aMultiplier, new Object[]{tCleaned, tDust, tGem}), aMaterial.mOreMultiplier * aMultiplier); tCrushed = GT_OreDictUnificator.get(OrePrefixes.dustImpure, tMaterial, GT_Utility.copyAmount(aMaterial.mOreMultiplier * aMultiplier, new Object[]{tCleaned, tDust, tGem}), aMaterial.mOreMultiplier * aMultiplier);
@ -63,17 +58,12 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
if (tPrimaryByProduct == null) { if (tPrimaryByProduct == null) {
tPrimaryByMaterial = tMat; tPrimaryByMaterial = tMat;
tPrimaryByProduct = GT_OreDictUnificator.get(OrePrefixes.dust, tMat, 1L); tPrimaryByProduct = GT_OreDictUnificator.get(OrePrefixes.dust, tMat, 1L);
tPrimaryByProductSmall = GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L); if (GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L) == null)
if (tPrimaryByProductSmall == null) GT_OreDictUnificator.get(OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L);
tPrimaryByProductSmall = GT_OreDictUnificator.get(OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L);
} }
if ((tSecondaryByProduct == null) || (tSecondaryByMaterial == tPrimaryByMaterial)) { GT_OreDictUnificator.get(OrePrefixes.dust, tMat, 1L);
tSecondaryByMaterial = tMat; if (GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L) == null) {
tSecondaryByProduct = GT_OreDictUnificator.get(OrePrefixes.dust, tMat, 1L); GT_OreDictUnificator.get(OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L);
tSecondaryByProductSmall = GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L);
if (tSecondaryByProductSmall == null) {
tSecondaryByProductSmall = GT_OreDictUnificator.get(OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L);
}
} }
} }
if ((!tByProductStacks.isEmpty()) && (!this.mAlreadyListedOres.contains(aMaterial))) { if ((!tByProductStacks.isEmpty()) && (!this.mAlreadyListedOres.contains(aMaterial))) {
@ -83,14 +73,6 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
if (tPrimaryByMaterial == null) tPrimaryByMaterial = tMaterial; if (tPrimaryByMaterial == null) tPrimaryByMaterial = tMaterial;
if (tPrimaryByProduct == null) tPrimaryByProduct = tDust; if (tPrimaryByProduct == null) tPrimaryByProduct = tDust;
if (tPrimaryByProductSmall == null) {
tPrimaryByProductSmall = tSmall;
}
if (tSecondaryByMaterial == null) tSecondaryByMaterial = tPrimaryByMaterial;
if (tSecondaryByProduct == null) tSecondaryByProduct = tPrimaryByProduct;
if (tSecondaryByProductSmall == null) {
tSecondaryByProductSmall = tPrimaryByProductSmall;
}
boolean tHasSmelting = false; boolean tHasSmelting = false;
if (tSmeltInto != null) { if (tSmeltInto != null) {
@ -110,7 +92,9 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
} }
if (!tHasSmelting) { if (!tHasSmelting) {
tHasSmelting = GT_ModHandler.addSmeltingRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial.mDirectSmelting, Math.max(1, aMultiplier * aMaterial.mSmeltingMultiplier / 2))); //dead code?
//tHasSmelting = GT_ModHandler.addSmeltingRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial.mDirectSmelting, Math.max(1, aMultiplier * aMaterial.mSmeltingMultiplier / 2)));
GT_ModHandler.addSmeltingRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial.mDirectSmelting, Math.max(1, aMultiplier * aMaterial.mSmeltingMultiplier / 2)));
} }
if (tCrushed != null) { if (tCrushed != null) {