From b24a09c6a2684be77aa7ee5e1255409051249fe0 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Mon, 18 Dec 2017 13:25:25 +1000 Subject: + Added Trinium and Trinium related Alloys. (#170) + Added more recycling recipes. $ Fixed bad materials in component assembler recipes. --- .../xmod/gregtech/loaders/RecipeGen_Recycling.java | 128 +++++++++++++++++---- 1 file changed, 107 insertions(+), 21 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/loaders') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java index f7e294ad0b..d0651f783c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java @@ -7,30 +7,40 @@ import java.util.Map; import org.apache.commons.lang3.reflect.FieldUtils; +import gregtech.api.enums.GT_Values; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.state.MaterialState; import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.array.Pair; import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; public class RecipeGen_Recycling implements Runnable { final Material toGenerate; - static Map mNameMap; + public static Map mNameMap; public RecipeGen_Recycling(final Material M) { this.toGenerate = M; - mNameMap = this.getNameMap(); + if (mNameMap == null){ + mNameMap = this.getNameMap(); + } + if (mNameMap != null){ + generateRecipes(this.toGenerate); + } } @Override public void run() { - generateRecipes(this.toGenerate); + } public static void generateRecipes(final Material material) { @@ -46,14 +56,20 @@ public class RecipeGen_Recycling implements Runnable { Utils.LOG_INFO("Found " + mValidPrefixesAsString.length + " valid OreDict prefixes."); if (mValidPrefixesAsString.length >= 1) { for (final OrePrefixes validPrefix : mValidPrefixesAsString) { - try { - final ItemStack tempStack = ItemUtils - .getItemStackOfAmountFromOreDict(validPrefix + material.getLocalizedName(), 1); - - if ((tempStack != null) && (tempStack != ItemUtils.getSimpleStack(ModItems.AAA_Broken))) { + + if (material.getState() != MaterialState.SOLID){ + continue; + } + + final ItemStack tempStack = get(validPrefix, material, 1); + final ItemStack mDust = getDust(material, validPrefix); + final Pair mData = getDustData(material, validPrefix); + int mFluidAmount = (int) GT_Utility.translateMaterialToFluidAmount(mData.getKey().mMaterialAmount, true); + + //Maceration + if (tempStack != null) { // mValidItems[mSlotIndex++] = tempStack; - final ItemStack mDust = getDust(material, validPrefix); if ((mDust != null) && GT_ModHandler.addPulverisationRecipe(tempStack, mDust)) { Utils.LOG_INFO("Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle " + tempStack.getDisplayName() + " and obtain " + mDust.getDisplayName()); @@ -65,9 +81,30 @@ public class RecipeGen_Recycling implements Runnable { } } } + + //Arc Furnace + if (tempStack != null) { + + } + + //Fluid Extractor + if (tempStack != null) { + // mValidItems[mSlotIndex++] = tempStack; + if ((mDust != null) && GT_Values.RA.addFluidExtractionRecipe(tempStack, null, material.getFluid(mFluidAmount), 0, 30, 8)) { + Utils.LOG_INFO("Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle " + + tempStack.getDisplayName() + " and obtain " + mDust.getDisplayName()); + } + else { + Utils.LOG_INFO("Recycle Recipe: " + material.getLocalizedName() + " - Failed"); + if (mDust == null) { + Utils.LOG_INFO("Invalid Dust output."); + } + } + } + } catch (final Throwable t) { - // t.printStackTrace(); + t.printStackTrace(); // Utils.LOG_INFO("Returning Null. Throwable Info: // "+t.getMessage()); // Utils.LOG_INFO("Throwable Info: "+t.toString()); @@ -79,28 +116,69 @@ public class RecipeGen_Recycling implements Runnable { } } + public static Pair getDustData(final Material aMaterial, final OrePrefixes aPrefix) { + return getDustData(aMaterial, aPrefix.mMaterialAmount); + } + + public static Pair getDustData(final Material aMaterial, final long aMaterialAmount) { + ItemStack mDust = null; + OrePrefixes mPrefix = null; + + if (aMaterial == null || aMaterialAmount <= 0) { + return null; + } + if ((((aMaterialAmount % M) == 0) || (aMaterialAmount >= (M * 16)))) { + mDust = get(OrePrefixes.dust, aMaterial, aMaterialAmount / M); + mPrefix = OrePrefixes.dust; + } + if ((mDust == null) && ((((aMaterialAmount * 4) % M) == 0) || (aMaterialAmount >= (M * 8)))) { + mDust = get(OrePrefixes.dustSmall, aMaterial, (aMaterialAmount * 4) / M); + mPrefix = OrePrefixes.dustSmall; + } + if ((mDust == null) && (((aMaterialAmount * 9) >= M))) { + mDust = get(OrePrefixes.dustTiny, aMaterial, (aMaterialAmount * 9) / M); + mPrefix = OrePrefixes.dustTiny; + } + + if (mPrefix != null && mDust != null){ + Utils.LOG_INFO("Built valid dust pair."); + return new Pair(mPrefix, mDust); + } + else { + Utils.LOG_INFO("mPrefix: "+(mPrefix!=null)); + Utils.LOG_INFO("mDust: "+(mDust!=null)); + } + Utils.LOG_INFO("Failed to build valid dust pair."); + return null; + } + public static ItemStack getDust(final Material aMaterial, final OrePrefixes aPrefix) { return aMaterial == null ? null : getDust(aMaterial, aPrefix.mMaterialAmount); } - + public static ItemStack getDust(final Material aMaterial, final long aMaterialAmount) { if (aMaterialAmount <= 0) { return null; } ItemStack rStack = null; if ((((aMaterialAmount % M) == 0) || (aMaterialAmount >= (M * 16)))) { + Utils.LOG_INFO("Trying to get a Dust"); rStack = get(OrePrefixes.dust, aMaterial, aMaterialAmount / M); } if ((rStack == null) && ((((aMaterialAmount * 4) % M) == 0) || (aMaterialAmount >= (M * 8)))) { + Utils.LOG_INFO("Trying to get a Small Dust"); rStack = get(OrePrefixes.dustSmall, aMaterial, (aMaterialAmount * 4) / M); } if ((rStack == null) && (((aMaterialAmount * 9) >= M))) { + Utils.LOG_INFO("Trying to get a Tiny Dust"); rStack = get(OrePrefixes.dustTiny, aMaterial, (aMaterialAmount * 9) / M); } if (rStack == null) { Utils.LOG_INFO("Returning Null. Method: " + ReflectionUtils.getMethodName(0)); Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(1)); Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(2)); + Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(3)); + Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(4)); } return rStack; @@ -114,18 +192,13 @@ public class RecipeGen_Recycling implements Runnable { return get(aName, aReplacement, aAmount, true, true); } - public static ItemStack get(final OrePrefixes aPrefix, final Object aMaterial, final long aAmount) { + public static ItemStack get(final OrePrefixes aPrefix, final Material aMaterial, final long aAmount) { return get(aPrefix, aMaterial, null, aAmount); } - public static ItemStack get(final OrePrefixes aPrefix, final Object aMaterial, final ItemStack aReplacement, + public static ItemStack get(final OrePrefixes aPrefix, final Material aMaterial, final ItemStack aReplacement, final long aAmount) { - /* - * if (OrePrefixes.mPreventableComponents.contains(aPrefix) && - * aPrefix.mDisabledItems.contains(aMaterial)) { return aReplacement; - * //TODO } - */ - return get(aPrefix.get(aMaterial), aReplacement, aAmount, false, true); + return get(aPrefix.name()+Utils.sanitizeString(aMaterial.getLocalizedName()), aReplacement, aAmount, false, true); } public static ItemStack get(final Object aName, final ItemStack aReplacement, final long aAmount, @@ -134,6 +207,8 @@ public class RecipeGen_Recycling implements Runnable { Utils.LOG_INFO("Returning Null. Method: " + ReflectionUtils.getMethodName(0)); Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(1)); Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(2)); + Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(3)); + Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(4)); return null; } if (!mNameMap.containsKey(aName.toString()) && aMentionPossibleTypos) { @@ -148,10 +223,13 @@ public class RecipeGen_Recycling implements Runnable { Utils.LOG_INFO("Returning Null. Method: " + ReflectionUtils.getMethodName(0)); Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(1)); Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(2)); + Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(3)); + Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(4)); return null; } final ItemStack tStack = (ItemStack) mNameMap.get(aName.toString()); if (GT_Utility.isStackValid(tStack)) { + Utils.LOG_INFO("Found valid stack."); return GT_Utility.copyAmount(aAmount, new Object[] { tStack }); } return GT_Utility.copyAmount(aAmount, getOres(aName).toArray()); @@ -161,17 +239,25 @@ public class RecipeGen_Recycling implements Runnable { final String aName = (aOreName == null) ? "" : aOreName.toString(); final ArrayList rList = new ArrayList(); if (GT_Utility.isStringValid(aName)) { - rList.addAll(getOres(aName)); + Utils.LOG_INFO("Making a list of all OreDict entries for "+aOreName+"."); + if (rList.addAll(OreDictionary.getOres(aName))){ + Utils.LOG_INFO("Added "+rList.size()+" elements to list."); + } + else { + Utils.LOG_INFO("Failed to Add Collection from oreDictionary, forcing an entry."); + rList.add(ItemUtils.getItemStackOfAmountFromOreDict((String) aOreName, 1)); + } } return rList; } - public Map getNameMap() { + public Map getNameMap() { Map tempMap; try { tempMap = (Map) FieldUtils.readStaticField(GT_OreDictUnificator.class, "sName2StackMap", true); if (tempMap != null) { + Utils.LOG_INFO("Found 'sName2StackMap' in GT_OreDictUnificator.class."); return tempMap; } } -- cgit From 2a4795f65d98ff60a177d7d6a5552fd687d9f6e8 Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Wed, 20 Dec 2017 17:30:21 +1000 Subject: + Added support for GTNH Trinium. $ Fixed excessive fluid cells being generated. $ Further improve material recycling recipes. --- .../gregtech/loaders/RecipeGen_DustGeneration.java | 28 +++++----- .../xmod/gregtech/loaders/RecipeGen_Recycling.java | 64 +++++++++++++++++----- 2 files changed, 63 insertions(+), 29 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/loaders') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java index 46bf36c445..b7af6eadac 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java @@ -114,12 +114,12 @@ public class RecipeGen_DustGeneration implements Runnable{ //Is this a composite? if ((inputStacks != null) && !disableOptional){ //Is this a composite? - Utils.LOG_INFO("mixer length: "+inputStacks.length); + Utils.LOG_WARNING("mixer length: "+inputStacks.length); if ((inputStacks.length != 0) && (inputStacks.length <= 4)){ //Log Input items Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks)); final long[] inputStackSize = material.vSmallestRatio; - Utils.LOG_INFO("mixer is stacksizeVar null? "+(inputStackSize != null)); + Utils.LOG_WARNING("mixer is stacksizeVar null? "+(inputStackSize != null)); //Is smallest ratio invalid? if (inputStackSize != null){ //set stack sizes on an input ItemStack[] @@ -168,19 +168,19 @@ public class RecipeGen_DustGeneration implements Runnable{ (int) Math.max(material.getMass() * 2L * 1, 1), 2 * material.vVoltageMultiplier)) //Was 6, but let's try 2. This makes Potin LV, for example. { - Utils.LOG_INFO("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success"); + Utils.LOG_WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_INFO("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed"); + Utils.LOG_WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed"); } //Add Shapeless recipe for low tier alloys. if (tVoltageMultiplier <= 30){ if (RecipeUtils.addShapedGregtechRecipe(inputStacks, outputStacks)){ - Utils.LOG_INFO("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Success"); + Utils.LOG_WARNING("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_INFO("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Failed"); + Utils.LOG_WARNING("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Failed"); } } } @@ -200,12 +200,12 @@ public class RecipeGen_DustGeneration implements Runnable{ //Is this a composite? if ((inputStacks != null)){ //Is this a composite? - Utils.LOG_INFO("mixer length: "+inputStacks.length); + Utils.LOG_WARNING("mixer length: "+inputStacks.length); if ((inputStacks.length >= 1) && (inputStacks.length <= 4)){ //Log Input items Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks)); final long[] inputStackSize = material.vSmallestRatio; - Utils.LOG_INFO("mixer is stacksizeVar not null? "+(inputStackSize != null)); + Utils.LOG_WARNING("mixer is stacksizeVar not null? "+(inputStackSize != null)); //Is smallest ratio invalid? if (inputStackSize != null){ //set stack sizes on an input ItemStack[] @@ -215,7 +215,7 @@ public class RecipeGen_DustGeneration implements Runnable{ } } //Relog input values, with stack sizes - Utils.LOG_INFO(ItemUtils.getArrayStackNames(inputStacks)); + Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks)); //Get us four ItemStacks to input into the mixer ItemStack input1, input2, input3, input4; @@ -254,24 +254,24 @@ public class RecipeGen_DustGeneration implements Runnable{ (int) Math.max(material.getMass() * 2L * 1, 1), 2 * material.vVoltageMultiplier)) //Was 6, but let's try 2. This makes Potin LV, for example. { - Utils.LOG_INFO("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success"); + Utils.LOG_WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success"); return true; } else { - Utils.LOG_INFO("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed"); + Utils.LOG_WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed"); return false; } } else { - Utils.LOG_INFO("inputStackSize == NUll - "+material.getLocalizedName()); + Utils.LOG_WARNING("inputStackSize == NUll - "+material.getLocalizedName()); } } else { - Utils.LOG_INFO("InputStacks is out range 1-4 - "+material.getLocalizedName()); + Utils.LOG_WARNING("InputStacks is out range 1-4 - "+material.getLocalizedName()); } } else { - Utils.LOG_INFO("InputStacks == NUll - "+material.getLocalizedName()); + Utils.LOG_WARNING("InputStacks == NUll - "+material.getLocalizedName()); } return false; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java index d0651f783c..f48d9822f0 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java @@ -9,10 +9,7 @@ import org.apache.commons.lang3.reflect.FieldUtils; import gregtech.api.enums.GT_Values; import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.item.ModItems; +import gregtech.api.util.*; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.state.MaterialState; import gtPlusPlus.core.util.Utils; @@ -20,7 +17,6 @@ import gtPlusPlus.core.util.array.Pair; import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; public class RecipeGen_Recycling implements Runnable { @@ -51,21 +47,59 @@ public class RecipeGen_Recycling implements Runnable { OrePrefixes.plate, OrePrefixes.plateDense, OrePrefixes.plateDouble, OrePrefixes.plateTriple, OrePrefixes.plateQuadruple, OrePrefixes.plateQuintuple, OrePrefixes.stick, OrePrefixes.stickLong, OrePrefixes.bolt, OrePrefixes.screw, OrePrefixes.ring, OrePrefixes.rotor, OrePrefixes.gearGt, - OrePrefixes.gearGtSmall }; + OrePrefixes.gearGtSmall, OrePrefixes.gear, OrePrefixes.block, OrePrefixes.cableGt01, OrePrefixes.cableGt02, + OrePrefixes.cableGt04, OrePrefixes.cableGt08, OrePrefixes.cableGt12, OrePrefixes.wireFine, OrePrefixes.wireGt01, + OrePrefixes.wireGt02, OrePrefixes.wireGt04, OrePrefixes.wireGt08, OrePrefixes.wireGt12, OrePrefixes.wireGt16, + OrePrefixes.foil, OrePrefixes.frameGt, OrePrefixes.pipeHuge, OrePrefixes.pipeLarge, OrePrefixes.pipeMedium, OrePrefixes.pipeSmall, OrePrefixes.pipeTiny, + }; - Utils.LOG_INFO("Found " + mValidPrefixesAsString.length + " valid OreDict prefixes."); + int mSlotIndex = 0; + Pair[] mValidPairs = new Pair[mValidPrefixesAsString.length]; + + for (int r=0;r(mValidPrefixesAsString[r], temp.copy()); + } + else { + Utils.LOG_INFO("Invalid Item: "+mValidPrefixesAsString[r].name()+Utils.sanitizeString(material.getLocalizedName())); + } + } + + if (mValidPairs.length > 0){ + int validCounter = 0; + Pair[] temp = mValidPairs; + for (Pair temp2 : mValidPairs){ + if (temp2 != null){ + Utils.LOG_INFO("Valid: "+temp2.getValue().getDisplayName()); + validCounter++; + } + } + Pair temp3[] = new Pair[validCounter]; + int temp4 = 0; + for (Pair r : mValidPairs){ + if (r != null){ + temp3[temp4++] = r; + } + } + if (temp3.length > 0){ + mValidPairs = temp3.clone(); + } + } + + Utils.LOG_INFO("Found " + mValidPairs.length + " valid OreDict prefixes."); if (mValidPrefixesAsString.length >= 1) { - for (final OrePrefixes validPrefix : mValidPrefixesAsString) { + for (final Pair validPrefix : mValidPairs) { try { if (material.getState() != MaterialState.SOLID){ continue; } - final ItemStack tempStack = get(validPrefix, material, 1); - final ItemStack mDust = getDust(material, validPrefix); - final Pair mData = getDustData(material, validPrefix); - int mFluidAmount = (int) GT_Utility.translateMaterialToFluidAmount(mData.getKey().mMaterialAmount, true); + final ItemStack tempStack = validPrefix.getValue(); + final ItemStack mDust = getDust(material, validPrefix.getKey()); + final Pair mData = getDustData(material, validPrefix.getKey()); + int mFluidAmount = (int) GT_Utility.translateMaterialToFluidAmount(validPrefix.getKey().mMaterialAmount, true); //Maceration if (tempStack != null) { @@ -91,11 +125,11 @@ public class RecipeGen_Recycling implements Runnable { if (tempStack != null) { // mValidItems[mSlotIndex++] = tempStack; if ((mDust != null) && GT_Values.RA.addFluidExtractionRecipe(tempStack, null, material.getFluid(mFluidAmount), 0, 30, 8)) { - Utils.LOG_INFO("Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle " - + tempStack.getDisplayName() + " and obtain " + mDust.getDisplayName()); + Utils.LOG_INFO("Fluid Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle " + + tempStack.getDisplayName() + " and obtain " + mFluidAmount+"mb of "+material.getFluid(1).getLocalizedName()+"."); } else { - Utils.LOG_INFO("Recycle Recipe: " + material.getLocalizedName() + " - Failed"); + Utils.LOG_INFO("Fluid Recycle Recipe: " + material.getLocalizedName() + " - Failed"); if (mDust == null) { Utils.LOG_INFO("Invalid Dust output."); } -- cgit From 5715a32d2901922503fd850f3a68503fb77467c3 Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Wed, 20 Dec 2017 23:39:49 +1000 Subject: - Disabled some logging. % Minor Project Clean-up, added missing Override annotations to 100+ methods & removed pointless casts. % Moved Logging to it's own class. $ Fixed Multi-block handling of Pollution. $ Fixed the GT 5.09 material enabler system. (From My Side, it's still borked on GTs). + Added a Dynamic Proxy invocation for IMaterialHandler. + Added an AutoMap data type, which is a Auto-incremental ID'd Hashmap wrapper. --- .../xmod/gregtech/loaders/GT_Material_Loader.java | 292 +++++++++++++++++++++ .../xmod/gregtech/loaders/Gregtech_Blocks.java | 8 +- .../loaders/ProcessingToolHeadChoocher.java | 16 +- .../gregtech/loaders/RecipeGen_BlastSmelter.java | 60 ++--- .../loaders/RecipeGen_BlastSmelterGT_Ex.java | 5 +- .../gregtech/loaders/RecipeGen_DustGeneration.java | 58 ++-- .../xmod/gregtech/loaders/RecipeGen_Extruder.java | 32 +-- .../xmod/gregtech/loaders/RecipeGen_Fluids.java | 42 +-- .../xmod/gregtech/loaders/RecipeGen_Plates.java | 24 +- .../xmod/gregtech/loaders/RecipeGen_Recycling.java | 88 ++++--- .../gregtech/loaders/RecipeGen_ShapedCrafting.java | 44 ++-- 11 files changed, 481 insertions(+), 188 deletions(-) create mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java (limited to 'src/Java/gtPlusPlus/xmod/gregtech/loaders') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java new file mode 100644 index 0000000000..c57ad71fc7 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java @@ -0,0 +1,292 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import java.lang.reflect.*; +import java.util.HashMap; +import java.util.Map; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.array.AutoMap; +import gtPlusPlus.core.util.materials.MaterialUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class GT_Material_Loader { + + private volatile static GT_Material_Loader instance = new GT_Material_Loader(); + private volatile Object mProxyObject; + private static AutoMap mMaterials = new AutoMap(); + private static volatile boolean mHasRun = false; + + public synchronized GT_Material_Loader getInstance(){ + return GT_Material_Loader.instance; + } + + public synchronized boolean getRunAbility(){ + return (mHasRun ? false : true); + } + public synchronized void setRunAbility(boolean b){ + mHasRun = Utils.invertBoolean(b); + } + + public GT_Material_Loader() { + if (getRunAbility()){ + //Set Singleton Instance + instance = this; + + //Try Reflectively add ourselves to the GT loader. + try { + Class mInterface = Class.forName("gregtech.api.interfaces.IMaterialHandler"); + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && mInterface != null){ + + //Make this class Dynamically implement IMaterialHandler + if (mProxyObject == null){ + mProxyObject = Proxy.newProxyInstance( + mInterface.getClassLoader(), new Class[] { mInterface }, + new MaterialHandler(getInstance())); + } + + if (ReflectionUtils.invoke(Materials.class, "add", new Class[]{Class.forName("gregtech.api.interfaces.IMaterialHandler")}, new Object[]{mProxyObject})){ + Logger.REFLECTION("Successfully invoked add, on the proxied object implementing IMaterialHandler."); + + + Logger.REFLECTION("Examining Proxy to ensure it implements the correct Interface."); + Class[] i = mProxyObject.getClass().getInterfaces(); + for (int r=0;r 0){ + Logger.DEBUG_MATERIALS("Success - Re-enabled all components for "+MaterialUtils.getMaterialName(material)); + } + else { + Logger.DEBUG_MATERIALS("Failure - Did not enable any components for "+MaterialUtils.getMaterialName(material)); + } + return mValid > 0; + } + catch (SecurityException | IllegalArgumentException e) { + Logger.DEBUG_MATERIALS("Total Failure - Unable to re-enable "+MaterialUtils.getMaterialName(material)+". Most likely an IllegalArgumentException, but small chance it's a SecurityException."); + return false; + } + } + + + + + + + + + + /** + * Special Dynamic Interface Class + */ + + public class MaterialHandler implements InvocationHandler { + + private final Map methods = new HashMap(); + private Object target; + + public MaterialHandler(Object target) { + Logger.REFLECTION("Created a Proxy Interface which implements IMaterialHandler."); + this.target = target; + for(Method method: target.getClass().getDeclaredMethods()) { + Logger.REFLECTION("Adding "+method.getName()+" to internal method map."); + this.methods.put(method.getName(), method); + } + } + + @Override + public Object invoke(Object proxy, Method method, Object[] args) + throws Throwable { + long start = System.nanoTime(); + Object result = methods.get(method.getName()).invoke(target, args); + long elapsed = System.nanoTime() - start; + Logger.INFO("[Debug] Executed "+method.getName()+" in "+elapsed+" ns"); + return result; + } + } + + + /* + public static class ProxyListener implements java.lang.reflect.InvocationHandler { + + public static Object IMaterialHandlerProxy; + + ProxyListener(){ + + Logger.REFLECTION("Failed setting IMaterialHandler Proxy instance."); + } + + //Loading the class at runtime + public static void main(String[] args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException { + Class someInterface = Class.forName("gregtech.api.interfaces.IMaterialHandler"); + Object instance = Proxy.newProxyInstance(someInterface.getClassLoader(), new Class[]{someInterface}, new InvocationHandler() { + + @Override + public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { + //Handle the invocations + if(method.getName().equals("onMaterialsInit")){ + Logger.REFLECTION("Invoked onMaterialsInit() via IMaterialHandler proxy"); + return 1; + } + else if(method.getName().equals("onComponentInit")){ + Logger.REFLECTION("Invoked onComponentInit() via IMaterialHandler proxy"); + return 2; + } + else if(method.getName().equals("onComponentIteration")){ + Logger.REFLECTION("Invoked onComponentIteration() via IMaterialHandler proxy"); + return 3; + } + else { + return -1; + } + } + }); + System.out.println(instance.getClass().getDeclaredMethod("someMethod", (Class[])null).invoke(instance, new Object[]{})); + } + + private static class MaterialHandler implements InvocationHandler { + private final Object original; + + public MaterialHandler(Object original) { + this.original = original; + } + + @Override + public Object invoke(Object proxy, Method method, Object[] args) + throws IllegalAccessException, IllegalArgumentException, + InvocationTargetException { + System.out.println("BEFORE"); + method.invoke(original, args); + System.out.println("AFTER"); + return null; + } + } + + public static void init(){ + + Class someInterface = Class.forName("gregtech.api.interfaces.IMaterialHandler"); + GT_Material_Loader original = GT_Material_Loader.instance; + MaterialHandler handler = new MaterialHandler(original); + + Object f = Proxy.newProxyInstance(someInterface.getClassLoader(), + new Class[] { someInterface }, + handler); + + f.originalMethod("Hallo"); + } + + + + } + + */ +} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java index aff10c9b37..90faa9b83a 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java @@ -2,8 +2,8 @@ package gtPlusPlus.xmod.gregtech.loaders; import gregtech.api.enums.TAE; import gregtech.api.enums.Textures; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks2; @@ -11,10 +11,10 @@ public class Gregtech_Blocks { public static void run(){ - Utils.LOG_INFO("Expanding Gregtech Texture Array from 128 -> 1024."); + Logger.INFO("Expanding Gregtech Texture Array from 128 -> 1024."); boolean didExpand = TAE.hookGtTextures(); - Utils.LOG_INFO("Did Texture Array expand correctly? "+didExpand); - Utils.LOG_INFO("|======| Texture Array New Length: "+Textures.BlockIcons.CASING_BLOCKS.length+" |======|"); + Logger.INFO("Did Texture Array expand correctly? "+didExpand); + Logger.INFO("|======| Texture Array New Length: "+Textures.BlockIcons.CASING_BLOCKS.length+" |======|"); //Casing Blocks ModBlocks.blockCasingsMisc = new GregtechMetaCasingBlocks(); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java index 190cf416f3..332fa18281 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java @@ -3,7 +3,7 @@ package gtPlusPlus.xmod.gregtech.loaders; import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.core.util.Utils; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.util.recipe.RecipeUtils; import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; @@ -38,14 +38,14 @@ public class ProcessingToolHeadChoocher implements Interface_OreRecipeRegistrato public void materialsLoops(){ final Materials[] i = Materials.values(); final int size = i.length; - Utils.LOG_WARNING("Materials to attempt tool gen. with: "+size); + Logger.WARNING("Materials to attempt tool gen. with: "+size); int used = 0; Materials aMaterial = null; for (int r=0;r= 2800 ? 60 : 15; - Utils.LOG_WARNING("Generating Shaped Crafting recipes for "+material.getLocalizedName()); //TODO + Logger.WARNING("Generating Shaped Crafting recipes for "+material.getLocalizedName()); //TODO //Ring Recipe if (RecipeUtils.addShapedGregtechRecipe( @@ -39,10 +39,10 @@ public class RecipeGen_DustGeneration implements Runnable{ null, material.getRod(1), null, null, null, null, material.getRing(1))){ - Utils.LOG_WARNING("Ring Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("Ring Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("Ring Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("Ring Recipe: "+material.getLocalizedName()+" - Failed"); } @@ -58,10 +58,10 @@ public class RecipeGen_DustGeneration implements Runnable{ tinyDust, tinyDust, tinyDust, tinyDust, tinyDust, tinyDust, normalDust)){ - Utils.LOG_WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); } if (RecipeUtils.recipeBuilder( @@ -69,10 +69,10 @@ public class RecipeGen_DustGeneration implements Runnable{ null, null, null, null, null, null, material.getTinyDust(9))){ - Utils.LOG_WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Failed"); } @@ -81,10 +81,10 @@ public class RecipeGen_DustGeneration implements Runnable{ smallDust, smallDust, null, null, null, null, normalDust)){ - Utils.LOG_WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); } @@ -93,10 +93,10 @@ public class RecipeGen_DustGeneration implements Runnable{ null, null, null, null, null, null, material.getSmallDust(4))){ - Utils.LOG_WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); } //Macerate blocks back to dusts. @@ -114,12 +114,12 @@ public class RecipeGen_DustGeneration implements Runnable{ //Is this a composite? if ((inputStacks != null) && !disableOptional){ //Is this a composite? - Utils.LOG_WARNING("mixer length: "+inputStacks.length); + Logger.WARNING("mixer length: "+inputStacks.length); if ((inputStacks.length != 0) && (inputStacks.length <= 4)){ //Log Input items - Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks)); + Logger.WARNING(ItemUtils.getArrayStackNames(inputStacks)); final long[] inputStackSize = material.vSmallestRatio; - Utils.LOG_WARNING("mixer is stacksizeVar null? "+(inputStackSize != null)); + Logger.WARNING("mixer is stacksizeVar null? "+(inputStackSize != null)); //Is smallest ratio invalid? if (inputStackSize != null){ //set stack sizes on an input ItemStack[] @@ -129,7 +129,7 @@ public class RecipeGen_DustGeneration implements Runnable{ } } //Relog input values, with stack sizes - Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks)); + Logger.WARNING(ItemUtils.getArrayStackNames(inputStacks)); //Get us four ItemStacks to input into the mixer ItemStack input1, input2, input3, input4; @@ -168,19 +168,19 @@ public class RecipeGen_DustGeneration implements Runnable{ (int) Math.max(material.getMass() * 2L * 1, 1), 2 * material.vVoltageMultiplier)) //Was 6, but let's try 2. This makes Potin LV, for example. { - Utils.LOG_WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed"); } //Add Shapeless recipe for low tier alloys. if (tVoltageMultiplier <= 30){ if (RecipeUtils.addShapedGregtechRecipe(inputStacks, outputStacks)){ - Utils.LOG_WARNING("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Failed"); } } } @@ -200,12 +200,12 @@ public class RecipeGen_DustGeneration implements Runnable{ //Is this a composite? if ((inputStacks != null)){ //Is this a composite? - Utils.LOG_WARNING("mixer length: "+inputStacks.length); + Logger.WARNING("mixer length: "+inputStacks.length); if ((inputStacks.length >= 1) && (inputStacks.length <= 4)){ //Log Input items - Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks)); + Logger.WARNING(ItemUtils.getArrayStackNames(inputStacks)); final long[] inputStackSize = material.vSmallestRatio; - Utils.LOG_WARNING("mixer is stacksizeVar not null? "+(inputStackSize != null)); + Logger.WARNING("mixer is stacksizeVar not null? "+(inputStackSize != null)); //Is smallest ratio invalid? if (inputStackSize != null){ //set stack sizes on an input ItemStack[] @@ -215,7 +215,7 @@ public class RecipeGen_DustGeneration implements Runnable{ } } //Relog input values, with stack sizes - Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks)); + Logger.WARNING(ItemUtils.getArrayStackNames(inputStacks)); //Get us four ItemStacks to input into the mixer ItemStack input1, input2, input3, input4; @@ -254,24 +254,24 @@ public class RecipeGen_DustGeneration implements Runnable{ (int) Math.max(material.getMass() * 2L * 1, 1), 2 * material.vVoltageMultiplier)) //Was 6, but let's try 2. This makes Potin LV, for example. { - Utils.LOG_WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success"); return true; } else { - Utils.LOG_WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed"); return false; } } else { - Utils.LOG_WARNING("inputStackSize == NUll - "+material.getLocalizedName()); + Logger.WARNING("inputStackSize == NUll - "+material.getLocalizedName()); } } else { - Utils.LOG_WARNING("InputStacks is out range 1-4 - "+material.getLocalizedName()); + Logger.WARNING("InputStacks is out range 1-4 - "+material.getLocalizedName()); } } else { - Utils.LOG_WARNING("InputStacks == NUll - "+material.getLocalizedName()); + Logger.WARNING("InputStacks == NUll - "+material.getLocalizedName()); } return false; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java index 5cf36796bb..198c22fb8e 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java @@ -3,8 +3,8 @@ package gtPlusPlus.xmod.gregtech.loaders; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.util.GT_Recipe; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.Utils; import net.minecraft.item.ItemStack; public class RecipeGen_Extruder implements Runnable{ @@ -35,7 +35,7 @@ public class RecipeGen_Extruder implements Runnable{ final ItemStack shape_Block = ItemList.Shape_Extruder_Block.get(0); final ItemStack shape_Ingot = ItemList.Shape_Extruder_Ingot.get(0); - Utils.LOG_WARNING("Generating Extruder recipes for "+material.getLocalizedName()); + Logger.WARNING("Generating Extruder recipes for "+material.getLocalizedName()); //Ingot Recipe if (addExtruderRecipe( @@ -44,10 +44,10 @@ public class RecipeGen_Extruder implements Runnable{ material.getIngot(9), (int) Math.max(material.getMass() * 2L * 1, 1), 4 * material.vVoltageMultiplier)){ - Utils.LOG_WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Failed"); } //Block Recipe @@ -57,10 +57,10 @@ public class RecipeGen_Extruder implements Runnable{ material.getBlock(1), (int) Math.max(material.getMass() * 2L * 1, 1), 8 * material.vVoltageMultiplier)){ - Utils.LOG_WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Failed"); } //Plate Recipe @@ -69,10 +69,10 @@ public class RecipeGen_Extruder implements Runnable{ shape_Plate, plate_Single, 10, 4 * tVoltageMultiplier)){ - Utils.LOG_WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Failed"); } //Ring Recipe @@ -83,10 +83,10 @@ public class RecipeGen_Extruder implements Runnable{ material.getRing(4), (int) Math.max(material.getMass() * 2L * 1, 1), 6 * material.vVoltageMultiplier)){ - Utils.LOG_WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Failed"); } } @@ -99,10 +99,10 @@ public class RecipeGen_Extruder implements Runnable{ itemGear, (int) Math.max(material.getMass() * 5L, 1), 8 * material.vVoltageMultiplier)){ - Utils.LOG_WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Failed"); } } @@ -114,10 +114,10 @@ public class RecipeGen_Extruder implements Runnable{ material.getRod(2), (int) Math.max(material.getMass() * 2L * 1, 1), 6 * material.vVoltageMultiplier)){ - Utils.LOG_WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Failed"); } @@ -129,10 +129,10 @@ public class RecipeGen_Extruder implements Runnable{ material.getBolt(8), (int) Math.max(material.getMass() * 2L * 1, 1), 6 * material.vVoltageMultiplier)){ - Utils.LOG_WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Failed"); } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java index 1b9247ee3e..5388f68146 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java @@ -2,8 +2,8 @@ package gtPlusPlus.xmod.gregtech.loaders; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.Utils; public class RecipeGen_Fluids implements Runnable{ @@ -48,10 +48,10 @@ public class RecipeGen_Fluids implements Runnable{ 1*20, //Duration 16 //Eu Tick )){ - Utils.LOG_WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Success"); } else { - Utils.LOG_WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Failed"); } //Plate @@ -62,10 +62,10 @@ public class RecipeGen_Fluids implements Runnable{ 1*20, //Duration 16 //Eu Tick )){ - Utils.LOG_WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Success"); } else { -