aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlkalus <Draknyte1@hotmail.com>2020-05-28 02:22:23 +0100
committerAlkalus <Draknyte1@hotmail.com>2020-05-28 02:22:23 +0100
commitf2dc49bca798bfeae60a86da35ac0682357cc6d3 (patch)
tree5c7ba302b3948df268e45faac9ce13bc8254a071 /src
parent59c6a1bf700132d0f5b7da49f59b05ac8b9f2894 (diff)
downloadGT5-Unofficial-f2dc49bca798bfeae60a86da35ac0682357cc6d3.tar.gz
GT5-Unofficial-f2dc49bca798bfeae60a86da35ac0682357cc6d3.tar.bz2
GT5-Unofficial-f2dc49bca798bfeae60a86da35ac0682357cc6d3.zip
+ Added ASM debugging for NEI.
- Broke NEI handling for some Multis. (To fix next commit) $ Fixed Handling of broken recipe handlers for CryoFreezer, Large Electro & Large Centrifuge. $ Fixed owner of some NEI handlers. (Was still Gregtech, oops)
Diffstat (limited to 'src')
-rw-r--r--src/Java/gregtech/api/util/GTPP_Recipe.java14
-rw-r--r--src/Java/gtPlusPlus/GTplusplus.java12
-rw-r--r--src/Java/gtPlusPlus/nei/GTPP_NEI_CustomMapHandler.java2
-rw-r--r--src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java6
-rw-r--r--src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandlerEx.java2
-rw-r--r--src/Java/gtPlusPlus/nei/NEI_GT_Config.java29
-rw-r--r--src/Java/gtPlusPlus/preloader/asm/helpers/MethodHelper_CC.java29
-rw-r--r--src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_CC_GuiContainerManager.java121
-rw-r--r--src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java16
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java12
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java48
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java2
13 files changed, 253 insertions, 46 deletions
diff --git a/src/Java/gregtech/api/util/GTPP_Recipe.java b/src/Java/gregtech/api/util/GTPP_Recipe.java
index ab6207299b..06e81070de 100644
--- a/src/Java/gregtech/api/util/GTPP_Recipe.java
+++ b/src/Java/gregtech/api/util/GTPP_Recipe.java
@@ -428,12 +428,14 @@ public class GTPP_Recipe extends GT_Recipe implements IComparableRecipe {
//Special Maps for Multis
public static final GTPP_Recipe_Map_Internal sFishPondRecipes = new GTPP_Recipe_Map_Internal(new HashSet<GT_Recipe>(3), "gt.recipe.fishpond", "Zhuhai - Fishing Port", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 0, 1, 0, 0, 1, "Requires Circuit: ", 1, ".", true, true);
- public static final GTPP_Recipe_Map sMultiblockCentrifugeRecipes = new GT_Recipe_Map_LargeCentrifuge();
- public static final GTPP_Recipe_Map sMultiblockElectrolyzerRecipes = new GT_Recipe_Map_LargeElectrolyzer();
- public static final GTPP_Recipe_Map sAdvFreezerRecipes = new GT_Recipe_Map_AdvancedVacuumFreezer();
- public static final GTPP_Recipe_Map_Internal sAdvFreezerRecipes_GT = new GTPP_Recipe_Map_Internal(new HashSet<GT_Recipe>(2000), "gt.recipe.temp", "temp", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 0, 0, 0, 0, 0, "", 0, "", false, false);
- public static final GTPP_Recipe_Map_Internal sMultiblockCentrifugeRecipes_GT = new GTPP_Recipe_Map_Internal(new HashSet<GT_Recipe>(2000), "gt.recipe.temp2", "temp2", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 0, 0, 0, 0, 0, "", 0, "", false, false);
- public static final GTPP_Recipe_Map_Internal sMultiblockElectrolyzerRecipes_GT = new GTPP_Recipe_Map_Internal(new HashSet<GT_Recipe>(2000), "gt.recipe.temp3", "temp3", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 0, 0, 0, 0, 0, "", 0, "", false, false);
+
+ //public static final GTPP_Recipe_Map sMultiblockCentrifugeRecipes = new GT_Recipe_Map_LargeCentrifuge();
+ //public static final GTPP_Recipe_Map sMultiblockElectrolyzerRecipes = new GT_Recipe_Map_LargeElectrolyzer();
+ //public static final GTPP_Recipe_Map sAdvFreezerRecipes = new GT_Recipe_Map_AdvancedVacuumFreezer();
+
+ public static final GTPP_Recipe_Map_Internal sAdvFreezerRecipes_GT = new GTPP_Recipe_Map_Internal(new HashSet<GT_Recipe>(2000), "gt.recipe.cryogenicfreezer", "Cryogenic Freezer", null, RES_PATH_GUI + "multimachines/LFTR", 0, 0, 0, 0, 0, "", 0, "", false, true);
+ public static final GTPP_Recipe_Map_Internal sMultiblockCentrifugeRecipes_GT = new GTPP_Recipe_Map_Internal(new HashSet<GT_Recipe>(2000), "gt.recipe.multicentrifuge", "Multiblock Centrifuge", null, RES_PATH_GUI + "multimachines/LFTR", 0, 0, 0, 0, 0, "", 0, "", false, true);
+ public static final GTPP_Recipe_Map_Internal sMultiblockElectrolyzerRecipes_GT = new GTPP_Recipe_Map_Internal(new HashSet<GT_Recipe>(2000), "gt.recipe.multielectro", "Multiblock Electrolyzer", null, RES_PATH_GUI + "multimachines/LFTR", 0, 0, 0, 0, 0, "", 0, "", false, true);
public static final GTPP_Recipe_Map_Internal sChemicalPlant_GT = new GTPP_Recipe_Map_Internal(new HashSet<GT_Recipe>(2000), "gt.recipe.temp4", "temp4", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 0, 0, 0, 0, 0, "", 0, "", false, false);
//Semi-Fluid Fuel Map
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java
index 4e4088a367..0b34e77ed1 100644
--- a/src/Java/gtPlusPlus/GTplusplus.java
+++ b/src/Java/gtPlusPlus/GTplusplus.java
@@ -321,11 +321,11 @@ public class GTplusplus implements ActionListener {
}
}
- if (GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mRecipeList.size() < 1) {
- for (GT_Recipe a : GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes.mRecipeList) {
+ /*if (GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mRecipeList.size() < 1) {
+ for (GT_Recipe a : GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mRecipeList) {
GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.add(a);
}
- }
+ }*/
//Large Electrolyzer generation
mOriginalCount[1] = GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size();
@@ -352,11 +352,11 @@ public class GTplusplus implements ActionListener {
}
}
- if (GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mRecipeList.size() < 1) {
- for (GT_Recipe a : GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes.mRecipeList) {
+ /*if (GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mRecipeList.size() < 1) {
+ for (GT_Recipe a : GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mRecipeList) {
GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.add(a);
}
- }
+ }*/
//Advanced Vacuum Freezer generation
mOriginalCount[2] = GT_Recipe.GT_Recipe_Map.sVacuumRecipes.mRecipeList.size();
diff --git a/src/Java/gtPlusPlus/nei/GTPP_NEI_CustomMapHandler.java b/src/Java/gtPlusPlus/nei/GTPP_NEI_CustomMapHandler.java
index ca6eb55b90..f22a099b98 100644
--- a/src/Java/gtPlusPlus/nei/GTPP_NEI_CustomMapHandler.java
+++ b/src/Java/gtPlusPlus/nei/GTPP_NEI_CustomMapHandler.java
@@ -44,7 +44,7 @@ public class GTPP_NEI_CustomMapHandler
this.mRecipeMap = tMap;
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), getOverlayIdentifier(), new Object[0]));
if (!NEI_GT_Config.sIsAdded) {
- FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtech@" + getRecipeName() + "@" + getOverlayIdentifier());
+ FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtechplusplus@" + getRecipeName() + "@" + getOverlayIdentifier());
GuiCraftingRecipe.craftinghandlers.add(this);
GuiUsageRecipe.usagehandlers.add(this);
}
diff --git a/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java b/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java
index 12c1b501bd..99a7eb5b7c 100644
--- a/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java
+++ b/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java
@@ -35,8 +35,8 @@ public class GTPP_NEI_DefaultHandler
public static final int sOffsetY = 11;
static {
- GuiContainerManager.addInputHandler(new GT_RectHandler());
- GuiContainerManager.addTooltipHandler(new GT_RectHandler());
+ GuiContainerManager.addInputHandler(new GT_NEI_DefaultHandler.GT_RectHandler());
+ GuiContainerManager.addTooltipHandler(new GT_NEI_DefaultHandler.GT_RectHandler());
}
protected final GTPP_Recipe_Map mRecipeMap;
@@ -45,7 +45,7 @@ public class GTPP_NEI_DefaultHandler
this.mRecipeMap = tMap;
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), getOverlayIdentifier(), new Object[0]));
if (!NEI_GT_Config.sIsAdded) {
- FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtech@" + getRecipeName() + "@" + getOverlayIdentifier());
+ FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtechplusplus@" + getRecipeName() + "@" + getOverlayIdentifier());
GuiCraftingRecipe.craftinghandlers.add(this);
GuiUsageRecipe.usagehandlers.add(this);
}
diff --git a/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandlerEx.java b/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandlerEx.java
index 0d9fc52943..47a763c293 100644
--- a/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandlerEx.java
+++ b/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandlerEx.java
@@ -45,7 +45,7 @@ public class GTPP_NEI_DefaultHandlerEx
this.mRecipeMap = tMap;
this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), getOverlayIdentifier(), new Object[0]));
if (!NEI_GT_Config.sIsAdded) {
- FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtech@" + getRecipeName() + "@" + getOverlayIdentifier());
+ FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtechplusplus@" + getRecipeName() + "@" + getOverlayIdentifier());
GuiCraftingRecipe.craftinghandlers.add(this);
GuiUsageRecipe.usagehandlers.add(this);
}
diff --git a/src/Java/gtPlusPlus/nei/NEI_GT_Config.java b/src/Java/gtPlusPlus/nei/NEI_GT_Config.java
index e89ec9a13b..ac0e625e3f 100644
--- a/src/Java/gtPlusPlus/nei/NEI_GT_Config.java
+++ b/src/Java/gtPlusPlus/nei/NEI_GT_Config.java
@@ -24,14 +24,23 @@ implements IConfigureNEI {
mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sOreMillRecipes.mUnlocalizedName);
mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sFlotationCellRecipes.mUnlocalizedName);
mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sChemicalDehydratorRecipes.mUnlocalizedName);
- mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sVacuumFurnaceRecipes.mUnlocalizedName);
+ mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sVacuumFurnaceRecipes.mUnlocalizedName);
+
+ mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mUnlocalizedName);
+ mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mUnlocalizedName);
+ mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mUnlocalizedName);
// Custom Recipe Maps
Logger.INFO("NEI Registration: "+CustomRecipeMap.sMappings.size()+" CustomRecipeMaps");
for (final CustomRecipeMap tMap : CustomRecipeMap.sMappings) {
if (tMap.mNEIAllowed) {
- Logger.INFO("NEI Registration: Registering NEI handler for "+tMap.mNEIName);
- new GTPP_NEI_CustomMapHandler(tMap);
+ if (!mUniqueRecipeMapHandling.contains(tMap.mUnlocalizedName)) {
+ Logger.INFO("NEI Registration: Registering NEI handler for "+tMap.mNEIName);
+ new GTPP_NEI_CustomMapHandler(tMap);
+ }
+ else {
+ Logger.INFO("NEI Registration: Not allowed to register NEI handler for "+tMap.mNEIName);
+ }
}
else {
Logger.INFO("NEI Registration: Not allowed to register NEI handler for "+tMap.mNEIName);
@@ -39,12 +48,12 @@ implements IConfigureNEI {
}
// Custom Recipe maps
- Logger.INFO("NEI Registration: "+GTPP_Recipe.GTPP_Recipe_Map.sMappings.size()+" sMappings");
+ /*Logger.INFO("NEI Registration: "+GTPP_Recipe.GTPP_Recipe_Map.sMappings.size()+" sMappings");
for (final GTPP_Recipe_Map tMap : GTPP_Recipe.GTPP_Recipe_Map.sMappings) {
if (tMap.mNEIAllowed) {
if (!mUniqueRecipeMapHandling.contains(tMap.mUnlocalizedName)) {
Logger.INFO("NEI Registration: Registering NEI handler for "+tMap.mNEIName);
- new GTPP_NEI_DefaultHandler(tMap);
+ //new GTPP_NEI_DefaultHandler_Fix(tMap);
}
else {
Logger.INFO("NEI Registration: Not allowed to register NEI handler for "+tMap.mNEIName);
@@ -54,7 +63,7 @@ implements IConfigureNEI {
Logger.INFO("NEI Registration: Skipping registration of NEI handler for "+tMap.mNEIName);
}
- }
+ }*/
// Standard GT Recipe Maps
Logger.INFO("NEI Registration: "+GTPP_Recipe.GTPP_Recipe_Map_Internal.sMappingsEx.size()+" sMappingEx");
@@ -84,6 +93,14 @@ implements IConfigureNEI {
new GT_NEI_Dehydrator();
Logger.INFO("NEI Registration: Registering NEI handler for "+CustomRecipeMap.sFissionFuelProcessing.mNEIName);
new GT_NEI_RFPP();
+
+ Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mNEIName);
+ new GT_NEI_DefaultHandler(GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT);
+ Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mNEIName);
+ new GT_NEI_DefaultHandler(GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT);
+ Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mNEIName);
+ new GT_NEI_DefaultHandler(GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT);
+
Logger.INFO("NEI Registration: Registering NEI handler for "+DecayableRecipeHandler.mNEIName);
API.registerRecipeHandler(new DecayableRecipeHandler());
API.registerUsageHandler(new DecayableRecipeHandler());
diff --git a/src/Java/gtPlusPlus/preloader/asm/helpers/MethodHelper_CC.java b/src/Java/gtPlusPlus/preloader/asm/helpers/MethodHelper_CC.java
new file mode 100644
index 0000000000..056a94bea1
--- /dev/null
+++ b/src/Java/gtPlusPlus/preloader/asm/helpers/MethodHelper_CC.java
@@ -0,0 +1,29 @@
+package gtPlusPlus.preloader.asm.helpers;
+
+import codechicken.nei.guihook.GuiContainerManager;
+import codechicken.nei.guihook.IContainerInputHandler;
+import gtPlusPlus.preloader.Preloader_Logger;
+import net.minecraft.client.gui.inventory.GuiContainer;
+
+public class MethodHelper_CC {
+
+
+ public void mouseUp2(int mousex, int mousey, int button) {
+ MethodHelper_CC.mouseUp(mousex, mousey, button);
+ }
+
+ public static void mouseUp(int mousex, int mousey, int button) {
+ GuiContainerManager aManager = codechicken.nei.guihook.GuiContainerManager.getManager();
+ if (aManager != null) {
+ GuiContainer aWindow = aManager.window;
+ for (IContainerInputHandler inputhander : GuiContainerManager.inputHandlers) {
+ Preloader_Logger.INFO("Found Handler: "+aWindow.getClass().getName() + " | "+inputhander.getClass().getName());
+ }
+ for (IContainerInputHandler inputhander : GuiContainerManager.inputHandlers) {
+ Preloader_Logger.INFO("Trying to handle events for "+aWindow.getClass().getName() + " | "+inputhander.getClass().getName());
+ inputhander.onMouseUp(aWindow, mousex, mousey, button);
+ }
+ }
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_CC_GuiContainerManager.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_CC_GuiContainerManager.java
new file mode 100644
index 0000000000..8791d401c8
--- /dev/null
+++ b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_CC_GuiContainerManager.java
@@ -0,0 +1,121 @@
+package gtPlusPlus.preloader.asm.transformers;
+
+import static org.objectweb.asm.Opcodes.*;
+
+import org.apache.logging.log4j.Level;
+import org.objectweb.asm.*;
+
+import gtPlusPlus.preloader.Preloader_Logger;
+
+public class ClassTransformer_CC_GuiContainerManager {
+
+ private final boolean isValid;
+ private final ClassReader reader;
+ private final ClassWriter writer;
+
+ public ClassTransformer_CC_GuiContainerManager(byte[] basicClass) {
+
+ ClassReader aTempReader = null;
+ ClassWriter aTempWriter = null;
+
+ aTempReader = new ClassReader(basicClass);
+ aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES);
+ localClassVisitor aTempMethodRemover = new localClassVisitor(aTempWriter);
+ aTempReader.accept(aTempMethodRemover, 0);
+
+ if (aTempReader != null && aTempWriter != null) {
+ isValid = true;
+ } else {
+ isValid = false;
+ }
+
+ Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Valid patch? " + isValid + ".");
+ reader = aTempReader;
+ writer = aTempWriter;
+
+ if (reader != null && writer != null) {
+ Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Attempting Method Injection.");
+ injectMethod("mouseUp");
+ }
+
+ }
+
+ public boolean isValidTransformer() {
+ return isValid;
+ }
+
+ public ClassReader getReader() {
+ return reader;
+ }
+
+ public ClassWriter getWriter() {
+ return writer;
+ }
+
+ public boolean injectMethod(String aMethodName) {
+ MethodVisitor mv;
+ boolean didInject = false;
+ String aClassName = "codechicken/nei/guihook/GuiContainerManager";
+ ClassWriter cw = getWriter();
+ if (aMethodName.equals("mouseUp")) {
+ Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Injecting " + aMethodName + ", static replacement call to "+aClassName+".");
+ mv = cw.visitMethod(ACC_PUBLIC, "mouseUp", "(III)V", null, null);
+ mv.visitCode();
+ Label l0 = new Label();
+ mv.visitLabel(l0);
+ mv.visitLineNumber(12, l0);
+ mv.visitVarInsn(ILOAD, 1);
+ mv.visitVarInsn(ILOAD, 2);
+ mv.visitVarInsn(ILOAD, 3);
+ mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/helpers/MethodHelper_CC", "mouseUp", "(III)V", false);
+ Label l1 = new Label();
+ mv.visitLabel(l1);
+ mv.visitLineNumber(13, l1);
+ mv.visitInsn(RETURN);
+ Label l2 = new Label();
+ mv.visitLabel(l2);
+ mv.visitLocalVariable("this", "L+aClassName+;", null, l0, l2, 0);
+ mv.visitLocalVariable("mousex", "I", null, l0, l2, 1);
+ mv.visitLocalVariable("mousey", "I", null, l0, l2, 2);
+ mv.visitLocalVariable("button", "I", null, l0, l2, 3);
+ mv.visitMaxs(3, 4);
+ mv.visitEnd();
+ didInject = true;
+ }
+
+ Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Method injection complete.");
+ return didInject;
+ }
+
+ public final class localClassVisitor extends ClassVisitor {
+
+ boolean obfuscated = false;
+
+ public localClassVisitor(ClassVisitor cv) {
+ super(ASM5, cv);
+ }
+
+ public boolean getObfuscatedRemoval() {
+ return obfuscated;
+ }
+
+ @Override
+ public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
+ MethodVisitor methodVisitor;
+
+ if (name.equals("mouseUp")) {
+ methodVisitor = null;
+ }
+ else {
+ methodVisitor = super.visitMethod(access, name, desc, signature, exceptions);
+ }
+
+ if (methodVisitor == null) {
+ Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Found method " + name + ", removing.");
+ Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Descriptor: "+desc);
+ }
+ return methodVisitor;
+ }
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java b/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java
index d9496e2c0c..998ee03555 100644
--- a/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java
+++ b/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java
@@ -120,6 +120,12 @@ public class Preloader_Transformer_Handler implements IClassTransformer {
new ClassReader(basicClass).accept(new OreDictionaryVisitor(classWriter), 0);
return classWriter.toByteArray();
}
+
+ // Log Handling of CodeChicken
+ if (transformedName.equals("codechicken.nei.guihook.GuiContainerManager")) {
+ Preloader_Logger.INFO("CodeChicken GuiContainerManager Patch", "Transforming "+transformedName);
+ return new ClassTransformer_CC_GuiContainerManager(basicClass).getWriter().toByteArray();
+ }
// Fix the OreDictionary COFH
if (transformedName.equals(COFH_ORE_DICTIONARY_ARBITER) && (AsmConfig.enableCofhPatch || !obfuscated)) {
Preloader_Logger.INFO("COFH", "Transforming "+transformedName);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
index 2286d95d3a..091ee734e6 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
@@ -212,11 +212,11 @@ public class Meta_GT_Proxy {
public static boolean generatePlasmaRecipesForAdvVacFreezer() {
- AutoMap<GTPP_Recipe> aFreezerMapRebaked = new AutoMap<GTPP_Recipe>();
- AutoMap<GTPP_Recipe> aRemovedRecipes = new AutoMap<GTPP_Recipe>();
+ AutoMap<GT_Recipe> aFreezerMapRebaked = new AutoMap<GT_Recipe>();
+ AutoMap<GT_Recipe> aRemovedRecipes = new AutoMap<GT_Recipe>();
//Find recipes containing Plasma and map them
- for (GTPP_Recipe y : GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes.mRecipeList) {
+ for (GT_Recipe y : GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList) {
if (y.mFluidInputs.length > 0) {
for (FluidStack r : y.mFluidInputs) {
if (r.getUnlocalizedName().toLowerCase().contains("plasma")) {
@@ -308,17 +308,17 @@ public class Meta_GT_Proxy {
//Best not touch the original map if we don't have a valid map to override it with.
if (aFreezerMapRebaked.size() > 0) {
- int aOriginalCount = GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes.mRecipeList.size();
+ int aOriginalCount = GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList.size();
//Empty the original map
- GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes.mRecipeList.clear();
+ GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList.clear();
//Rebake the real map
- for (GTPP_Recipe w : aFreezerMapRebaked) {
- GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes.mRecipeList.add(w);
+ for (GT_Recipe w : aFreezerMapRebaked) {
+ GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList.add(w);
}
- return GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes.mRecipeList.size() >= aOriginalCount;
+ return GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList.size() >= aOriginalCount;
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java
index 4cf8c55005..8f54d21906 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java
@@ -1,8 +1,5 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing;
-import static gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes;
-import static gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT;
-
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
@@ -11,8 +8,8 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GTPP_Recipe;
+import gregtech.api.util.GT_Recipe;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.util.minecraft.FluidUtils;
@@ -106,12 +103,7 @@ public class GregtechMetaTileEntity_IndustrialVacuumFreezer extends GregtechMeta
return "VacuumFreezer";
}
- public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- if (sAdvFreezerRecipes_GT.mRecipeList.size() < 1) {
- for (GT_Recipe a : sAdvFreezerRecipes.mRecipeList) {
- sAdvFreezerRecipes_GT.add(a);
- }
- }
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
return GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index 41cb1724fb..724c42c235 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -683,7 +683,21 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs));
return false;
}
- GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial);
+
+ GTPP_Recipe aRecipe = new GTPP_Recipe(
+ false,
+ aInputs,
+ aOutputs,
+ null,
+ aChances,
+ aFluidInputs,
+ aFluidOutputs,
+ aDuration,
+ aEUtick,
+ aSpecial);
+ GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.addRecipe(aRecipe);
+
+ //GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial);
return true;
}
@@ -699,7 +713,20 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs));
return false;
}
- GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial);
+
+ GTPP_Recipe aRecipe = new GTPP_Recipe(
+ false,
+ aInputs,
+ aOutputs,
+ null,
+ aChances,
+ aFluidInputs,
+ aFluidOutputs,
+ aDuration,
+ aEUtick,
+ aSpecial);
+ GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.addRecipe(aRecipe);
+ //GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial);
return true;
}
@@ -717,9 +744,22 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs));
return false;
}
- if (GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial) != null) {
+
+ GTPP_Recipe aRecipe = new GTPP_Recipe(
+ false,
+ aInputs,
+ aOutputs,
+ null,
+ aChances,
+ aFluidInputs,
+ aFluidOutputs,
+ aDuration,
+ aEUtick,
+ aSpecial);
+ GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.addRecipe(aRecipe);
+ /*if (GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial) != null) {
return true;
- }
+ }*/
return false;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java
index f36d714a03..78fc6d7ccc 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java
@@ -23,7 +23,7 @@ public class RecipesToRemove {
aRareEarthCentrifuging.mEnabled = false;
aRareEarthCentrifuging.mHidden = true;
GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.remove(aRareEarthCentrifuging);
- GTPP_Recipe.GT_Recipe_Map_LargeCentrifuge.sMultiblockCentrifugeRecipes.mRecipeList.remove(aRareEarthCentrifuging);
+ //GTPP_Recipe.GT_Recipe_Map_LargeCentrifuge.sMultiblockCentrifugeRecipes.mRecipeList.remove(aRareEarthCentrifuging);
GTPP_Recipe.GT_Recipe_Map_LargeCentrifuge.sMultiblockCentrifugeRecipes_GT.mRecipeList.remove(aRareEarthCentrifuging);
Logger.INFO("Removed vanilla GT Rare Earth processing.");
//Set the Chemical Symbol for Rare Earth now that we are giving it custom outputs