Pull exp commit

This commit is contained in:
Muramasa 2016-09-30 21:43:18 +01:00
commit 2f1026cf31
3 changed files with 93 additions and 153 deletions

View file

@ -447,7 +447,7 @@ public class GT_Mod implements IGT_Mod {
GT_Log.out.println("GT_Mod: List of Lists of Tool Recipes: "+GT_ModHandler.sSingleNonBlockDamagableRecipeList_list.toString()); GT_Log.out.println("GT_Mod: List of Lists of Tool Recipes: "+GT_ModHandler.sSingleNonBlockDamagableRecipeList_list.toString());
GT_Log.out.println("GT_Mod: Vanilla Recipe List -> Outputs null or stackSize <=0: " + GT_ModHandler.sVanillaRecipeList_warntOutput.toString()); GT_Log.out.println("GT_Mod: Vanilla Recipe List -> Outputs null or stackSize <=0: " + GT_ModHandler.sVanillaRecipeList_warntOutput.toString());
GT_Log.out.println("GT_Mod: Single Non Block Damagable Recipe List -> Outputs null or stackSize <=0: " + GT_ModHandler.sSingleNonBlockDamagableRecipeList_warntOutput.toString()); GT_Log.out.println("GT_Mod: Single Non Block Damagable Recipe List -> Outputs null or stackSize <=0: " + GT_ModHandler.sSingleNonBlockDamagableRecipeList_warntOutput.toString());
GT_Log.out.println("GT_Mod: sRodMaterialList cycles: " + GT_RecipeRegistrator.sRodMaterialList_cycles); //GT_Log.out.println("GT_Mod: sRodMaterialList cycles: " + GT_RecipeRegistrator.sRodMaterialList_cycles);
if (GT_Values.D1) { if (GT_Values.D1) {
IRecipe tRecipe; IRecipe tRecipe;
for (Iterator i$ = GT_ModHandler.sSingleNonBlockDamagableRecipeList.iterator(); i$.hasNext(); GT_Log.out.println("=> " + tRecipe.getRecipeOutput().getDisplayName())) { for (Iterator i$ = GT_ModHandler.sSingleNonBlockDamagableRecipeList.iterator(); i$.hasNext(); GT_Log.out.println("=> " + tRecipe.getRecipeOutput().getDisplayName())) {

View file

@ -1256,12 +1256,11 @@ public class GT_ModHandler {
sAllRecipeList.clear(); sAllRecipeList.clear();
sAllRecipeList.addAll(tList); sAllRecipeList.addAll(tList);
} }
int sAllRecipeList_sS=sAllRecipeList.size(); for (int i = 0, j = sAllRecipeList.size(); i < j; i++) {
for (int i = 0, j = sAllRecipeList_sS; i < j; i++) {
IRecipe tRecipe = sAllRecipeList.get(i); IRecipe tRecipe = sAllRecipeList.get(i);
if (tRecipe.matches(aCrafting, aWorld)) { if (tRecipe.matches(aCrafting, aWorld)) {
if (i > 10) { if (i > 10) {
sAllRecipeList.remove(i); sAllRecipeList_sS=sAllRecipeList.size(); sAllRecipeList.remove(i);
sAllRecipeList.add(i - 10, tRecipe); sAllRecipeList.add(i - 10, tRecipe);
} }
return tRecipe.getCraftingResult(aCrafting); return tRecipe.getCraftingResult(aCrafting);
@ -1321,11 +1320,13 @@ public class GT_ModHandler {
}, 3, 3); }, 3, 3);
for (int i = 0; i < 9 && i < aRecipe.length; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]); for (int i = 0; i < 9 && i < aRecipe.length; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]);
ArrayList<IRecipe> tList = (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); ArrayList<IRecipe> tList = (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList();
int tList_sS=tList.size(); for (int i = 0; i < tList.size(); i++) {
try {
for (int i = 0; i < tList_sS; i++) {
temp = false; temp = false;
try {
temp = tList.get(i).matches(aCrafting, DW); temp = tList.get(i).matches(aCrafting, DW);
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
}
if (temp) { if (temp) {
ItemStack tOutput = aUncopiedStack ? tList.get(i).getRecipeOutput() : tList.get(i).getCraftingResult(aCrafting); ItemStack tOutput = aUncopiedStack ? tList.get(i).getRecipeOutput() : tList.get(i).getCraftingResult(aCrafting);
if (tOutput == null || tOutput.stackSize <= 0) { if (tOutput == null || tOutput.stackSize <= 0) {
@ -1337,7 +1338,7 @@ public class GT_ModHandler {
return GT_Utility.copy(tOutput); return GT_Utility.copy(tOutput);
} }
} }
}} catch (Throwable e) {e.printStackTrace(GT_Log.err);} }
return null; return null;
} }
@ -1347,18 +1348,16 @@ public class GT_ModHandler {
* This also removes old Recipes from the List. * This also removes old Recipes from the List.
*/ */
public static ArrayList<ItemStack> getVanillyToolRecipeOutputs(ItemStack... aRecipe) { public static ArrayList<ItemStack> getVanillyToolRecipeOutputs(ItemStack... aRecipe) {
ArrayList<ItemStack> rList = new ArrayList<ItemStack>(); if (!GregTech_API.sPostloadStarted || GregTech_API.sPostloadFinished)
if (aRecipe == null) {return rList;} sSingleNonBlockDamagableRecipeList.clear();
if (!GregTech_API.sPostloadStarted || GregTech_API.sPostloadFinished) { if (sSingleNonBlockDamagableRecipeList.isEmpty()) {
sSingleNonBlockDamagableRecipeList.clear();sSingleNonBlockDamagableRecipeList_create = true;sSingleNonBlockDamagableRecipeList_validsShapes1.clear();}
if (sSingleNonBlockDamagableRecipeList_create/*sSingleNonBlockDamagableRecipeList.isEmpty()*/) {
for (IRecipe tRecipe : (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList()) { for (IRecipe tRecipe : (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
ItemStack tStack = tRecipe.getRecipeOutput(); ItemStack tStack = tRecipe.getRecipeOutput();
if (GT_Utility.isStackValid(tStack) && tStack.getMaxStackSize() == 1 && tStack.getMaxDamage() > 0 && !(tStack.getItem() instanceof ItemBlock) && !(tStack.getItem() instanceof IReactorComponent) && !isElectricItem(tStack) && !GT_Utility.isStackInList(tStack, sNonReplaceableItems)) { if (GT_Utility.isStackValid(tStack) && tStack.getMaxStackSize() == 1 && tStack.getMaxDamage() > 0 && !(tStack.getItem() instanceof ItemBlock) && !(tStack.getItem() instanceof IReactorComponent) && !isElectricItem(tStack) && !GT_Utility.isStackInList(tStack, sNonReplaceableItems)) {
//if (!(tRecipe instanceof ShapelessRecipes) || tRecipe instanceof ShapelessOreRecipe) { if (!(tRecipe instanceof ShapelessRecipes || tRecipe instanceof ShapelessOreRecipe)) {
if (tRecipe instanceof ShapedOreRecipe) { if (tRecipe instanceof ShapedOreRecipe) {
boolean temp = true; boolean temp = true;
for (Object tObject : ((ShapedOreRecipe) tRecipe).getInput()) { for (Object tObject : ((ShapedOreRecipe) tRecipe).getInput())
if (tObject != null) { if (tObject != null) {
if (tObject instanceof ItemStack && (((ItemStack) tObject).getItem() == null || ((ItemStack) tObject).getMaxStackSize() < 2 || ((ItemStack) tObject).getMaxDamage() > 0 || ((ItemStack) tObject).getItem() instanceof ItemBlock)) { if (tObject instanceof ItemStack && (((ItemStack) tObject).getItem() == null || ((ItemStack) tObject).getMaxStackSize() < 2 || ((ItemStack) tObject).getMaxDamage() > 0 || ((ItemStack) tObject).getItem() instanceof ItemBlock)) {
temp = false; temp = false;
@ -1368,8 +1367,8 @@ public class GT_ModHandler {
temp = false; temp = false;
break; break;
} }
}} }
if (temp) {sSingleNonBlockDamagableRecipeList.add(tRecipe);} if (temp) sSingleNonBlockDamagableRecipeList.add(tRecipe);
} else if (tRecipe instanceof ShapedRecipes) { } else if (tRecipe instanceof ShapedRecipes) {
boolean temp = true; boolean temp = true;
for (ItemStack tObject : ((ShapedRecipes) tRecipe).recipeItems) { for (ItemStack tObject : ((ShapedRecipes) tRecipe).recipeItems) {
@ -1378,38 +1377,18 @@ public class GT_ModHandler {
break; break;
} }
} }
if (temp) {sSingleNonBlockDamagableRecipeList.add(tRecipe);} if (temp) sSingleNonBlockDamagableRecipeList.add(tRecipe);
} else { } else {
sSingleNonBlockDamagableRecipeList.add(tRecipe); sSingleNonBlockDamagableRecipeList.add(tRecipe);
} }
//} }
} }
} }
GT_Log.out.println("GT_Mod: Created a List of Tool Recipes containing " + sSingleNonBlockDamagableRecipeList.size() + " Recipes for recycling." + (sSingleNonBlockDamagableRecipeList.size() > 1024 ? " Scanning all these Recipes is the reason for the startup Lag you receive right now." : E)); GT_Log.out.println("GT_Mod: Created a List of Tool Recipes containing " + sSingleNonBlockDamagableRecipeList.size() + " Recipes for recycling." + (sSingleNonBlockDamagableRecipeList.size() > 1024 ? " Scanning all these Recipes is the reason for the startup Lag you receive right now." : E));
int aList_move = sSingleNonBlockDamagableRecipeList.size();
sSingleNonBlockDamagableRecipeList_list.add(aList_move);
sSingleNonBlockDamagableRecipeList_create = false;
sSingleNonBlockDamagableRecipeList_validsShapes1_update = true;
InventoryCrafting aCrafting = new InventoryCrafting(new Container() {
@Override
public boolean canInteractWith(EntityPlayer var1) {return false;}}, 3, 3);
for (int i = 0; i < aList_move; i++) {
for (int j = 0; j < sShapes1.length; j++) {
ItemStack[] sRecipe = sShapes1[j];
for (int l = 0; l < 9 && l < sRecipe.length; l++) {aCrafting.setInventorySlotContents(l, sRecipe[l]);}
IRecipe vRecipe = sSingleNonBlockDamagableRecipeList.get(i);
if (vRecipe.matches(aCrafting, DW)) {
if (!(sSingleNonBlockDamagableRecipeList_validsShapes1.contains(j))) {sSingleNonBlockDamagableRecipeList_validsShapes1.add(j);}
sSingleNonBlockDamagableRecipeList_verified.add(vRecipe);
} }
} ArrayList<ItemStack> rList = getRecipeOutputs(sSingleNonBlockDamagableRecipeList, true, aRecipe);
} if (!GregTech_API.sPostloadStarted || GregTech_API.sPostloadFinished)
sSingleNonBlockDamagableRecipeList.clear();
}
/*ArrayList<ItemStack> */
if (sSingleNonBlockDamagableRecipeList_verified.size() != 0) {rList = getRecipeOutputs(sSingleNonBlockDamagableRecipeList_verified, true, aRecipe);}
if (!GregTech_API.sPostloadStarted || GregTech_API.sPostloadFinished) {
sSingleNonBlockDamagableRecipeList.clear();sSingleNonBlockDamagableRecipeList_create = true;sSingleNonBlockDamagableRecipeList_validsShapes1.clear();}
return rList; return rList;
} }
@ -1427,7 +1406,7 @@ public class GT_ModHandler {
*/ */
public static ArrayList<ItemStack> getRecipeOutputs(List<IRecipe> aList, boolean aDeleteFromList, ItemStack... aRecipe) { public static ArrayList<ItemStack> getRecipeOutputs(List<IRecipe> aList, boolean aDeleteFromList, ItemStack... aRecipe) {
ArrayList<ItemStack> rList = new ArrayList<ItemStack>(); ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
if (aRecipe == null || aList.size() == 0) {return rList;} if (aRecipe == null) return rList;
boolean temp = false; boolean temp = false;
for (byte i = 0; i < aRecipe.length; i++) { for (byte i = 0; i < aRecipe.length; i++) {
if (aRecipe[i] != null) { if (aRecipe[i] != null) {
@ -1435,51 +1414,33 @@ public class GT_ModHandler {
break; break;
} }
} }
if (!temp) {return rList;} if (!temp) return rList;
InventoryCrafting aCrafting = new InventoryCrafting(new Container() { InventoryCrafting aCrafting = new InventoryCrafting(new Container() {
@Override @Override
public boolean canInteractWith(EntityPlayer var1) { public boolean canInteractWith(EntityPlayer var1) {
return false; return false;
} }
}, 3, 3); }, 3, 3);
for (int i = 0; i < 9 && i < aRecipe.length; i++) {aCrafting.setInventorySlotContents(i, aRecipe[i]);} for (int i = 0; i < 9 && i < aRecipe.length; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]);
int aList_sS=aList.size(); for (int i = 0; i < aList.size(); i++) {
ArrayList<Integer> tempaList_list = new ArrayList<Integer>(); temp = false;
if(!aDeleteFromList) { try {
for (int i = 0; i < aList_sS; i++) { temp = aList.get(i).matches(aCrafting, DW);
IRecipe tempALg0 = aList.get(i); } catch (Throwable e) {
if (tempALg0.matches(aCrafting, DW)) { e.printStackTrace(GT_Log.err);
ItemStack tOutput = tempALg0.getCraftingResult(aCrafting); }
if (temp) {
ItemStack tOutput = aList.get(i).getCraftingResult(aCrafting);
if (tOutput == null || tOutput.stackSize <= 0) { if (tOutput == null || tOutput.stackSize <= 0) {
if (!(sVanillaRecipeList_warntOutput.contains(i))) {sVanillaRecipeList_warntOutput.add(i);} // Seriously, who would ever do that shit?
if (!GregTech_API.sPostloadFinished)
throw new GT_ItsNotMyFaultException("Seems another Mod added a Crafting Recipe with null Output. Tell the Developer of said Mod to fix that.");
} else { } else {
rList.add(GT_Utility.copy(tOutput)); rList.add(GT_Utility.copy(tOutput));
if (aDeleteFromList) {tempaList_list.add(i);} if (aDeleteFromList) aList.remove(i--);
} }
} }
} }
} else {
for (int i = 0; i < aList_sS; i++) {
IRecipe tempALg0 = aList.get(i);
ItemStack tOutput = tempALg0.getCraftingResult(aCrafting);
if (tOutput == null || tOutput.stackSize <= 0) {
if (!(sSingleNonBlockDamagableRecipeList_warntOutput.contains(i))) {sSingleNonBlockDamagableRecipeList_warntOutput.add(i);}
} else {
rList.add(GT_Utility.copy(tOutput));
if (aDeleteFromList) {tempaList_list.add(i);}
}
}
}
//boolean tempaList_list_b = tempaList_list.size() != 0 ? true : false;
if (aDeleteFromList && tempaList_list.size() != 0) {
List<IRecipe> tempaList_2 = new ArrayList<IRecipe>();
for (int i = 0; i < aList_sS; i++) {
int k = 0, l = 0;
if (tempaList_list.get(k) == i) {k++;continue;}
tempaList_2.add(aList.get(l));l++;
}
aList = tempaList_2;
}
return rList; return rList;
} }

View file

@ -121,8 +121,6 @@ public class GT_RecipeRegistrator {
{"Scythe", s_H + s_P + s_I, s_P + s_F + s_R, " " + " " + s_R} {"Scythe", s_H + s_P + s_I, s_P + s_F + s_R, " " + " " + s_R}
}; };
public static volatile int VERSION = 509; public static volatile int VERSION = 509;
public static int sRodMaterialList_cycles = 0;
private static int i_count = 0;
public static void registerMaterialRecycling(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByproduct) { public static void registerMaterialRecycling(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByproduct) {
if (GT_Utility.isStackInvalid(aStack)) return; if (GT_Utility.isStackInvalid(aStack)) return;
@ -178,7 +176,7 @@ public class GT_RecipeRegistrator {
} }
public static void registerReverseArcSmelting(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03) { public static void registerReverseArcSmelting(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03) {
registerReverseArcSmelting(aStack, new ItemData(new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03)); registerReverseArcSmelting(aStack, new ItemData(aMaterial == null ? null : new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03));
} }
public static void registerReverseArcSmelting(ItemStack aStack, ItemData aData) { public static void registerReverseArcSmelting(ItemStack aStack, ItemData aData) {
@ -212,11 +210,7 @@ public class GT_RecipeRegistrator {
continue; continue;
} }
if (tMaterial.mMaterial.contains(SubTag.METAL)) { if (tMaterial.mMaterial.contains(SubTag.METAL)) {
if(GT_Mod.gregtechproxy.mArcSmeltIntoAnnealed){
tMaterial.mMaterial = tMaterial.mMaterial.mSmeltInto.mArcSmeltInto; tMaterial.mMaterial = tMaterial.mMaterial.mSmeltInto.mArcSmeltInto;
}else{
tMaterial.mMaterial = tMaterial.mMaterial.mSmeltInto.mSmeltInto;
}
continue; continue;
} }
tMaterial.mAmount = 0; tMaterial.mAmount = 0;
@ -240,7 +234,7 @@ public class GT_RecipeRegistrator {
} }
public static void registerReverseMacerating(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03, boolean aAllowHammer) { public static void registerReverseMacerating(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03, boolean aAllowHammer) {
registerReverseMacerating(aStack, new ItemData(new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03), aAllowHammer); registerReverseMacerating(aStack, new ItemData(aMaterial == null ? null : new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03), aAllowHammer);
} }
public static void registerReverseMacerating(ItemStack aStack, ItemData aData, boolean aAllowHammer) { public static void registerReverseMacerating(ItemStack aStack, ItemData aData, boolean aAllowHammer) {
@ -278,7 +272,7 @@ public class GT_RecipeRegistrator {
* You give this Function a Material and it will scan almost everything for adding recycling Recipes * You give this Function a Material and it will scan almost everything for adding recycling Recipes
* *
* @param aMat a Material, for example an Ingot or a Gem. * @param aMat a Material, for example an Ingot or a Gem.
* @param aPlate the Dust you usually get from macerating aMat * @param aOutput the Dust you usually get from macerating aMat
* @param aRecipeReplacing allows to replace the Recipe with a Plate variant * @param aRecipeReplacing allows to replace the Recipe with a Plate variant
*/ */
public static synchronized void registerUsagesForMaterials(ItemStack aMat, String aPlate, boolean aRecipeReplacing) { public static synchronized void registerUsagesForMaterials(ItemStack aMat, String aPlate, boolean aRecipeReplacing) {
@ -286,11 +280,8 @@ public class GT_RecipeRegistrator {
aMat = GT_Utility.copy(aMat); aMat = GT_Utility.copy(aMat);
ItemStack tStack; ItemStack tStack;
ItemData aItemData = GT_OreDictUnificator.getItemData(aMat); ItemData aItemData = GT_OreDictUnificator.getItemData(aMat);
boolean aItemData_b_0 = aItemData != null ? true : false; if (aItemData == null || aItemData.mPrefix != OrePrefixes.ingot) aPlate = null;
if (!aItemData_b_0 || aItemData.mPrefix != OrePrefixes.ingot) {aPlate = null;}
if (aPlate != null && GT_OreDictUnificator.getFirstOre(aPlate, 1) == null) aPlate = null; if (aPlate != null && GT_OreDictUnificator.getFirstOre(aPlate, 1) == null) aPlate = null;
boolean aItemData_b_1 = aItemData.hasValidPrefixMaterialData() ? true : false;
boolean aPlate_b_0 = aPlate != null ? true : false;
sMt1.func_150996_a(aMat.getItem()); sMt1.func_150996_a(aMat.getItem());
sMt1.stackSize = 1; sMt1.stackSize = 1;
@ -305,13 +296,12 @@ public class GT_RecipeRegistrator {
for (ItemStack tMat : tRecipe) { for (ItemStack tMat : tRecipe) {
if (tMat == sMt1) tAmount1++; if (tMat == sMt1) tAmount1++;
} }
if (aItemData_b_0 && aItemData_b_1) if (aItemData != null && aItemData.hasValidPrefixMaterialData())
for (ItemStack tCrafted : GT_ModHandler.getRecipeOutputs(tRecipe)) { for (ItemStack tCrafted : GT_ModHandler.getRecipeOutputs(tRecipe)) {
GT_OreDictUnificator.addItemData(tCrafted, new ItemData(aItemData.mMaterial.mMaterial, aItemData.mMaterial.mAmount * tAmount1)); GT_OreDictUnificator.addItemData(tCrafted, new ItemData(aItemData.mMaterial.mMaterial, aItemData.mMaterial.mAmount * tAmount1));
} }
} }
GT_ModHandler.getVanillyToolRecipeOutputs(sShapes1[0]);
for (Materials tMaterial : sRodMaterialList) { for (Materials tMaterial : sRodMaterialList) {
ItemStack tMt2 = GT_OreDictUnificator.get(OrePrefixes.stick, tMaterial, 1); ItemStack tMt2 = GT_OreDictUnificator.get(OrePrefixes.stick, tMaterial, 1);
if (tMt2 != null) { if (tMt2 != null) {
@ -319,40 +309,31 @@ public class GT_RecipeRegistrator {
sMt2.stackSize = 1; sMt2.stackSize = 1;
Items.feather.setDamage(sMt2, Items.feather.getDamage(tMt2)); Items.feather.setDamage(sMt2, Items.feather.getDamage(tMt2));
if (GT_ModHandler.sSingleNonBlockDamagableRecipeList.size() == 0 || GT_ModHandler.sSingleNonBlockDamagableRecipeList_validsShapes1.size() == 0 || GT_ModHandler.sSingleNonBlockDamagableRecipeList_verified.size() == 0) { sRodMaterialList_cycles++;continue;} for (int i = 0; i < sShapes1.length; i++) {
int sShapes1_len = GT_ModHandler.sSingleNonBlockDamagableRecipeList_validsShapes1.size(); ItemStack[] tRecipe = sShapes1[i];
for (int i = 0; i < sShapes1_len; i++) {
int i2 = GT_ModHandler.sSingleNonBlockDamagableRecipeList_validsShapes1.get(i);
ItemStack[] tRecipe = sShapes1[i2];
if (tRecipe == null) continue;
int tAmount1 = 0, tAmount2 = 0; int tAmount1 = 0, tAmount2 = 0;
for (ItemStack tMat : tRecipe) { for (ItemStack tMat : tRecipe) {
if (tMat == sMt1) tAmount1++; if (tMat == sMt1) tAmount1++;
if (tMat == sMt2) tAmount2++; if (tMat == sMt2) tAmount2++;
} }
List<ItemStack> tempTest = GT_ModHandler.getVanillyToolRecipeOutputs(tRecipe); for (ItemStack tCrafted : GT_ModHandler.getVanillyToolRecipeOutputs(tRecipe)) {
if (GT_ModHandler.sSingleNonBlockDamagableRecipeList_validsShapes1_update && GT_ModHandler.sSingleNonBlockDamagableRecipeList_validsShapes1.size() != 0) {sShapes1_len = GT_ModHandler.sSingleNonBlockDamagableRecipeList_validsShapes1.size();GT_ModHandler.sSingleNonBlockDamagableRecipeList_validsShapes1_update = false;} if (aItemData != null && aItemData.hasValidPrefixMaterialData())
int tempTest_size_sS = tempTest.size();
if (tempTest_size_sS > 0) {
for (ItemStack tCrafted : tempTest/*GT_ModHandler.getVanillyToolRecipeOutputs(tRecipe)*/) {
if (aItemData_b_0 && aItemData_b_1) {
GT_OreDictUnificator.addItemData(tCrafted, new ItemData(aItemData.mMaterial.mMaterial, aItemData.mMaterial.mAmount * tAmount1, new MaterialStack(tMaterial, OrePrefixes.stick.mMaterialAmount * tAmount2))); GT_OreDictUnificator.addItemData(tCrafted, new ItemData(aItemData.mMaterial.mMaterial, aItemData.mMaterial.mAmount * tAmount1, new MaterialStack(tMaterial, OrePrefixes.stick.mMaterialAmount * tAmount2)));
}
if (aRecipeReplacing && aPlate_b_0 && sShapesA[i2] != null && sShapesA[i2].length > 1) { if (aRecipeReplacing && aPlate != null && sShapesA[i] != null && sShapesA[i].length > 1) {
//assert aItemData != null;//dead dev code or decomp JAD? assert aItemData != null;
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, new StringBuilder().append(aItemData.mMaterial.mMaterial).append('.').append(sShapesA[i2][0]).toString(), true)) { if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, aItemData.mMaterial.mMaterial + "." + sShapesA[i][0], true)) {
if (null != (tStack = GT_ModHandler.removeRecipe(tRecipe))) { if (null != (tStack = GT_ModHandler.removeRecipe(tRecipe))) {
switch (sShapesA[i].length) { switch (sShapesA[i].length) {
case 2: case 2:
GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[]{sShapesA[i2][1], s_P.charAt(0), aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData}); GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[]{sShapesA[i][1], s_P.charAt(0), aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData});
break; break;
case 3: case 3:
GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[]{sShapesA[i2][1], sShapesA[i2][2], s_P.charAt(0), aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData}); GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[]{sShapesA[i][1], sShapesA[i][2], s_P.charAt(0), aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData});
break; break;
default: default:
GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[]{sShapesA[i2][1], sShapesA[i2][2], sShapesA[i2][3], s_P.charAt(0), aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData}); GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[]{sShapesA[i][1], sShapesA[i][2], sShapesA[i][3], s_P.charAt(0), aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData});
break; break;
} }
} }
@ -360,8 +341,6 @@ public class GT_RecipeRegistrator {
} }
} }
} }
sRodMaterialList_cycles++;
}
} }
} }
} }