aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2019-09-04 00:20:40 +0200
committerbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2019-09-04 00:20:40 +0200
commit8dda23e3d9e80d467c60a192e24ec38d1a33882a (patch)
tree30a83d445437e06b6fe20ea931717660400b89a3
parentc8152dc7aeeabf21f1ed3fca2b895153595dcec8 (diff)
downloadGT5-Unofficial-8dda23e3d9e80d467c60a192e24ec38d1a33882a.tar.gz
GT5-Unofficial-8dda23e3d9e80d467c60a192e24ec38d1a33882a.tar.bz2
GT5-Unofficial-8dda23e3d9e80d467c60a192e24ec38d1a33882a.zip
changed load order again, fixing class exceptions in obfs enviroment
Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Former-commit-id: bb79d62b33144ce4b36289d05bea2bbbff972732
-rw-r--r--build.properties2
-rw-r--r--src/main/java/com/github/bartimaeusnek/ASM/BWCore.java2
-rw-r--r--src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java29
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload.java135
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java34
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java9
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java11
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Furnace.java1
-rw-r--r--src/main/java/com/github/bartimaeusnek/preloader/PreLoaderMod.java55
9 files changed, 129 insertions, 149 deletions
diff --git a/build.properties b/build.properties
index 7daca1c59d..e314c6ce35 100644
--- a/build.properties
+++ b/build.properties
@@ -23,7 +23,7 @@
mc_version=1.7.10
majorUpdate=0
minorUpdate=5
-buildNumber=1
+buildNumber=2
APIVersion=8
ic2.version=2.2.828-experimental
gregtech.version=5.09.32.36
diff --git a/src/main/java/com/github/bartimaeusnek/ASM/BWCore.java b/src/main/java/com/github/bartimaeusnek/ASM/BWCore.java
index b32537378c..2b4eafb9a1 100644
--- a/src/main/java/com/github/bartimaeusnek/ASM/BWCore.java
+++ b/src/main/java/com/github/bartimaeusnek/ASM/BWCore.java
@@ -67,7 +67,7 @@ public class BWCore extends DummyModContainer {
@Override
public List<ArtifactVersion> getDependants() {
- List<ArtifactVersion> ret = new ArrayList<ArtifactVersion>();
+ List<ArtifactVersion> ret = new ArrayList<>();
ret.add(new DefaultArtifactVersion("ExtraUtilities", true));
ret.add(new DefaultArtifactVersion("Thaumcraft", true));
ret.add(new DefaultArtifactVersion(BartWorksCrossmod.MOD_ID, true));
diff --git a/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java b/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java
index f2631564c4..06261bea9f 100644
--- a/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java
+++ b/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java
@@ -38,6 +38,7 @@ public class BWCoreTransformer implements IClassTransformer {
"REMVOING CREATURES FROM LAST MILLENIUM (EXU)",
"PATCHING GLOBAL RENDERER FOR USE WITH MY GALACTIC DIMS",
"PATCHING THAUMCRAFT WAND PEDESTAL TO PREVENT VIS DUPLICATION",
+ "PLACING MY GLASS-BLOCK RUNNABLE INTO THE GT_API"
// "ADD EXECTION HANDLEING TO FIND OREIDS/OREDICT"
};
public static final String[] CLASSESBEEINGTRANSFORMED = {
@@ -45,6 +46,7 @@ public class BWCoreTransformer implements IClassTransformer {
"com.rwtema.extrautils.worldgen.endoftime.ChunkProviderEndOfTime",
"net.minecraft.client.renderer.RenderGlobal",
"thaumcraft.common.tiles.TileWandPedestal",
+ "gregtech.GT_Mod"
// "net.minecraftforge.oredict.OreDictionary"
};
static boolean obfs;
@@ -221,7 +223,34 @@ public class BWCoreTransformer implements IClassTransformer {
break;
}
case 4 : {
+ BWCore.BWCORE_LOG.info("Could find: " + BWCoreTransformer.CLASSESBEEINGTRANSFORMED[id]);
+ String name_deObfs = "<clinit>";
+ for (int i = 0; i < methods.size(); i++) {
+ MethodNode toPatch = methods.get(i);
+ if (ASMUtils.isCorrectMethod(methods.get(i), name_deObfs) && (methods.get(i).access & ACC_STATIC) != 0) {
+ BWCore.BWCORE_LOG.info("Found " + (name_deObfs) + "! Patching!");
+ InsnList nu = new InsnList();
+ LabelNode[] LabelNodes = {new LabelNode(), new LabelNode()};
+ for (int j = 0; j < 2; j++) {
+ nu.add(toPatch.instructions.get(j));
+ }
+ nu.add(new FieldInsnNode(GETSTATIC, "gregtech/api/GregTech_API", "sBeforeGTPreload", "Ljava/util/List;"));
+ nu.add(new TypeInsnNode(NEW, "com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload"));
+ nu.add(new InsnNode(DUP));
+ nu.add(new MethodInsnNode(INVOKESPECIAL, "com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload", "<init>", "()V", false));
+ nu.add(new MethodInsnNode(INVOKEINTERFACE, "java/util/List", "add", "(Ljava/lang/Object;)Z", true));
+ nu.add(new InsnNode(POP));
+ for (int j = 2; j < toPatch.instructions.size(); j++) {
+ nu.add(toPatch.instructions.get(j));
+ }
+ toPatch.instructions = nu;
+ break;
+ }
+ }
+ break;
+ }
+ case 5: {
// String name_deObfs = "getOreIDs";
// String dsc_deObfs = "(Lnet/minecraft/item/ItemStack;)[I";
// String dsc_Obfs = "(Ladd;)[I";
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload.java
index de0e57a138..2164330a96 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload.java
@@ -22,19 +22,14 @@
package com.github.bartimaeusnek.bartworks.common.loaders;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.common.items.BW_ItemBlocks;
-import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_RotorBlock;
-import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_TileEntity_ExperimentalFloodGate;
-import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_TileEntity_HeatedWaterPump;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.LoadController;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.registry.GameRegistry;
-import gregtech.api.util.GT_OreDictUnificator;
import ic2.core.Ic2Items;
+import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
@@ -42,87 +37,75 @@ import org.apache.commons.lang3.reflect.FieldUtils;
import java.lang.reflect.Field;
-import static com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler.newStuff;
-
public class BeforeGTPreload implements Runnable {
+
+ private static boolean didrun;
+
@Override
public void run() {
- Field fieldModController = FieldUtils.getDeclaredField(Loader.class,"modController",true);
- LoadController modController = null;
- try {
- modController = (LoadController) fieldModController.get(Loader.instance());
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- FMLCommonHandler.instance().exitJava(-1,true);
- }
+ if (didrun)
+ return;
+
+ Field activeContainer = FieldUtils.getDeclaredField(LoadController.class, "activeContainer", true);
ModContainer bartworks = null;
- ModContainer gregtech = null;
- assert modController != null;
- for (ModContainer mod : modController.getActiveModList()){
- if (mod.getModId().equals(MainMod.MOD_ID)) {
- bartworks = mod;
+ ModContainer gregtech = Loader.instance().activeModContainer();
+ boolean switchback = false;
+ LoadController modController = null;
+ if (!Loader.instance().activeModContainer().getModId().equals("bartworks")) {
+ Field fieldModController = FieldUtils.getDeclaredField(Loader.class, "modController", true);
+ try {
+ modController = (LoadController) fieldModController.get(Loader.instance());
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ FMLCommonHandler.instance().exitJava(-1, true);
}
- if (mod.getModId().equals("gregtech"))
- gregtech=mod;
- if (bartworks!= null && gregtech != null)
- break;
- }
- if (bartworks == null || gregtech == null)
- FMLCommonHandler.instance().exitJava(-1,true);
- Field activeContainer = FieldUtils.getDeclaredField(LoadController.class,"activeContainer",true);
- try {
- activeContainer.set(modController,bartworks);
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- FMLCommonHandler.instance().exitJava(-1,true);
- }
-
- if (newStuff) {
- GameRegistry.registerBlock(ItemRegistry.bw_glasses[0], BW_ItemBlocks.class, "BW_GlasBlocks");
- GameRegistry.registerBlock(ItemRegistry.bw_fake_glasses, "BW_FakeGlasBlock");
- GameRegistry.registerBlock(ItemRegistry.BW_BLOCKS[2], BW_ItemBlocks.class, "BW_Machinery_Casings");
- GameRegistry.registerItem(ItemRegistry.LEATHER_ROTOR, "BW_LeatherRotor");
- GameRegistry.registerItem(ItemRegistry.WOOL_ROTOR, "BW_WoolRotor");
- GameRegistry.registerItem(ItemRegistry.PAPER_ROTOR, "BW_PaperRotor");
- GameRegistry.registerItem(ItemRegistry.COMBINED_ROTOR, "BW_CombinedRotor");
- GameRegistry.registerItem(ItemRegistry.CRAFTING_PARTS, "craftingParts");
- GameRegistry.registerTileEntity(BW_RotorBlock.class, "BWRotorBlockTE");
- GameRegistry.registerBlock(ItemRegistry.ROTORBLOCK, BW_ItemBlocks.class, "BWRotorBlock");
- GameRegistry.registerTileEntity(BW_TileEntity_HeatedWaterPump.class, "BWHeatedWaterPumpTE");
- GameRegistry.registerBlock(ItemRegistry.PUMPBLOCK, BW_ItemBlocks.class, "BWHeatedWaterPumpBlock");
- GameRegistry.registerItem(ItemRegistry.PUMPPARTS, "BWPumpParts");
- GameRegistry.registerItem(ItemRegistry.WINDMETER, "BW_SimpleWindMeter");
- GameRegistry.registerTileEntity(BW_TileEntity_ExperimentalFloodGate.class, "BWExpReversePump");
- GameRegistry.registerBlock(ItemRegistry.EXPPUMP, BW_ItemBlocks.class, "BWExpReversePumpBlock");
- }
-
- //GT2 stuff
- GameRegistry.registerBlock(ItemRegistry.BW_BLOCKS[0], BW_ItemBlocks.class, "BW_ItemBlocks");
- GameRegistry.registerBlock(ItemRegistry.BW_BLOCKS[1], BW_ItemBlocks.class, "GT_LESU_CASING");
- if (ConfigHandler.teslastaff)
- GameRegistry.registerItem(ItemRegistry.TESLASTAFF, ItemRegistry.TESLASTAFF.getUnlocalizedName());
+ assert modController != null;
+ for (ModContainer mod : modController.getActiveModList()) {
+ if (mod.getModId().equals("bartworks")) {
+ bartworks = mod;
+ }
+ if (bartworks != null)
+ break;
+ }
+ if (bartworks == null || gregtech == null)
+ FMLCommonHandler.instance().exitJava(-1, true);
- GameRegistry.registerItem(ItemRegistry.ROCKCUTTER_LV, ItemRegistry.ROCKCUTTER_LV.getUnlocalizedName());
- GameRegistry.registerItem(ItemRegistry.ROCKCUTTER_MV, ItemRegistry.ROCKCUTTER_MV.getUnlocalizedName());
- GameRegistry.registerItem(ItemRegistry.ROCKCUTTER_HV, ItemRegistry.ROCKCUTTER_HV.getUnlocalizedName());
- GameRegistry.registerItem(ItemRegistry.TAB, "tabIconGT2");
- OreDictionary.registerOre("blockGlassHV",new ItemStack(Blocks.glass,1,Short.MAX_VALUE));
- OreDictionary.registerOre("blockGlassHV",new ItemStack(ItemRegistry.bw_glasses[0],1,0));
- OreDictionary.registerOre("blockGlassEV", Ic2Items.reinforcedGlass);
- OreDictionary.registerOre("blockGlassEV",new ItemStack(ItemRegistry.bw_glasses[0],1,1));
- OreDictionary.registerOre("blockGlassIV",new ItemStack(ItemRegistry.bw_glasses[0],1,2));
- OreDictionary.registerOre("blockGlassIV",new ItemStack(ItemRegistry.bw_glasses[0],1,12));
- OreDictionary.registerOre("blockGlassLuV",new ItemStack(ItemRegistry.bw_glasses[0],1,3));
- OreDictionary.registerOre("blockGlassZPM",new ItemStack(ItemRegistry.bw_glasses[0],1,4));
- OreDictionary.registerOre("blockGlassUV",new ItemStack(ItemRegistry.bw_glasses[0],1,5));
+ try {
+ activeContainer.set(modController, bartworks);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ FMLCommonHandler.instance().exitJava(-1, true);
+ }
+ switchback = true;
+ }
+ Block[] bw_glasses;
try {
- activeContainer.set(modController,gregtech);
- } catch (IllegalAccessException e) {
+ bw_glasses = (Block[]) Class.forName("com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry").getField("bw_glasses").get(null);
+ GameRegistry.registerBlock(bw_glasses[0], BW_ItemBlocks.class, "BW_GlasBlocks");
+ OreDictionary.registerOre("blockGlassHV", new ItemStack(Blocks.glass, 1, Short.MAX_VALUE));
+ OreDictionary.registerOre("blockGlassHV", new ItemStack(bw_glasses[0], 1, 0));
+ OreDictionary.registerOre("blockGlassEV", Ic2Items.reinforcedGlass);
+ OreDictionary.registerOre("blockGlassEV", new ItemStack(bw_glasses[0], 1, 1));
+ OreDictionary.registerOre("blockGlassIV", new ItemStack(bw_glasses[0], 1, 2));
+ OreDictionary.registerOre("blockGlassIV", new ItemStack(bw_glasses[0], 1, 12));
+ OreDictionary.registerOre("blockGlassLuV", new ItemStack(bw_glasses[0], 1, 3));
+ OreDictionary.registerOre("blockGlassZPM", new ItemStack(bw_glasses[0], 1, 4));
+ OreDictionary.registerOre("blockGlassUV", new ItemStack(bw_glasses[0], 1, 5));
+ } catch (IllegalAccessException | NoSuchFieldException | ClassNotFoundException e) {
e.printStackTrace();
- FMLCommonHandler.instance().exitJava(-1,true);
+ FMLCommonHandler.instance().exitJava(-1, true);
+ }
+ if (switchback) {
+ try {
+ activeContainer.set(modController, gregtech);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ FMLCommonHandler.instance().exitJava(-1, true);
+ }
}
+ BeforeGTPreload.didrun = true;
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
index f14e5f8051..6e55fd509a 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
@@ -40,9 +40,6 @@ import com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega.GT_Til
import com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega.GT_TileEntity_MegaVacuumFreezer;
import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.*;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
-import cpw.mods.fml.common.LoadController;
-import cpw.mods.fml.common.Loader;
-import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
@@ -55,9 +52,6 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
-import org.apache.commons.lang3.reflect.FieldUtils;
-
-import java.lang.reflect.Field;
import static com.github.bartimaeusnek.bartworks.MainMod.BWT;
import static com.github.bartimaeusnek.bartworks.MainMod.GT2;
@@ -146,6 +140,34 @@ public class ItemRegistry {
public static void run() {
if (newStuff) {
+ GameRegistry.registerBlock(ItemRegistry.bw_fake_glasses, "BW_FakeGlasBlock");
+ GameRegistry.registerBlock(ItemRegistry.BW_BLOCKS[2], BW_ItemBlocks.class, "BW_Machinery_Casings");
+ GameRegistry.registerItem(ItemRegistry.LEATHER_ROTOR, "BW_LeatherRotor");
+ GameRegistry.registerItem(ItemRegistry.WOOL_ROTOR, "BW_WoolRotor");
+ GameRegistry.registerItem(ItemRegistry.PAPER_ROTOR, "BW_PaperRotor");
+ GameRegistry.registerItem(ItemRegistry.COMBINED_ROTOR, "BW_CombinedRotor");
+ GameRegistry.registerItem(ItemRegistry.CRAFTING_PARTS, "craftingParts");
+ GameRegistry.registerTileEntity(BW_RotorBlock.class, "BWRotorBlockTE");
+ GameRegistry.registerBlock(ItemRegistry.ROTORBLOCK, BW_ItemBlocks.class, "BWRotorBlock");
+ GameRegistry.registerTileEntity(BW_TileEntity_HeatedWaterPump.class, "BWHeatedWaterPumpTE");
+ GameRegistry.registerBlock(ItemRegistry.PUMPBLOCK, BW_ItemBlocks.class, "BWHeatedWaterPumpBlock");
+ GameRegistry.registerItem(ItemRegistry.PUMPPARTS, "BWPumpParts");
+ GameRegistry.registerItem(ItemRegistry.WINDMETER, "BW_SimpleWindMeter");
+ GameRegistry.registerTileEntity(BW_TileEntity_ExperimentalFloodGate.class, "BWExpReversePump");
+ GameRegistry.registerBlock(ItemRegistry.EXPPUMP, BW_ItemBlocks.class, "BWExpReversePumpBlock");
+ }
+
+ //GT2 stuff
+ GameRegistry.registerBlock(ItemRegistry.BW_BLOCKS[0], BW_ItemBlocks.class, "BW_ItemBlocks");
+ GameRegistry.registerBlock(ItemRegistry.BW_BLOCKS[1], BW_ItemBlocks.class, "GT_LESU_CASING");
+ if (ConfigHandler.teslastaff)
+ GameRegistry.registerItem(ItemRegistry.TESLASTAFF, ItemRegistry.TESLASTAFF.getUnlocalizedName());
+
+ GameRegistry.registerItem(ItemRegistry.ROCKCUTTER_LV, ItemRegistry.ROCKCUTTER_LV.getUnlocalizedName());
+ GameRegistry.registerItem(ItemRegistry.ROCKCUTTER_MV, ItemRegistry.ROCKCUTTER_MV.getUnlocalizedName());
+ GameRegistry.registerItem(ItemRegistry.ROCKCUTTER_HV, ItemRegistry.ROCKCUTTER_HV.getUnlocalizedName());
+ GameRegistry.registerItem(ItemRegistry.TAB, "tabIconGT2");
+ if (newStuff) {
if (ConfigHandler.creativeScannerID != 0)
new CreativeScanner(ConfigHandler.creativeScannerID,"Creative Debug Scanner","Creative Debug Scanner",20);
ItemRegistry.eic = new GT_TileEntity_ElectricImplosionCompressor(ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 6, "ElectricImplosionCompressor", "Electric Implosion Compressor").getStackForm(1L);
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java b/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java
index 9bbd454325..49f2b22365 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java
@@ -22,24 +22,23 @@
package com.github.bartimaeusnek.crossmod;
-import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.commands.ChangeConfig;
import com.github.bartimaeusnek.bartworks.common.commands.SummonRuin;
-import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.crossmod.GTpp.loader.RadioHatchCompat;
-import com.github.bartimaeusnek.crossmod.emt.recipe.TCRecipeHandler;
import com.github.bartimaeusnek.crossmod.galacticraft.GalacticraftProxy;
import com.github.bartimaeusnek.crossmod.thaumcraft.CustomAspects;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
-import cpw.mods.fml.common.event.*;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
import net.minecraft.util.StringTranslate;
import org.apache.commons.io.input.ReaderInputStream;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.io.StringReader;
-import java.lang.reflect.InvocationTargetException;
@Mod(
modid = BartWorksCrossmod.MOD_ID, name = BartWorksCrossmod.NAME, version = BartWorksCrossmod.VERSION,
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java b/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java
index c36f63cd00..e6e500987c 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java
@@ -26,7 +26,6 @@ import com.github.bartimaeusnek.bartworks.util.BWRecipes;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler;
import com.google.common.collect.ArrayListMultimap;
-import com.google.common.collect.HashBiMap;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
@@ -133,9 +132,13 @@ public class TCRecipeHandler {
}
}
for (ItemStack o : itemToAspectsMap.keySet()){
- for (int j = 1; j <= itemToAspectsMap.get(o).size() ; j++) {
- itemToCircuitConfigMap.put(o,j);
- }
+ if (o.getItemDamage() == Short.MAX_VALUE)
+ itemToCircuitConfigMap.put(o,24);
+ else
+ for (int j = 1; j <= itemToAspectsMap.get(o).size(); j++) {
+ itemToCircuitConfigMap.put(o,j%24);
+ }
+
for (int j = 0; j < itemToAspectsMap.get(o).size() ; j++) {
ret.add(addRecipes(itemToResearchMap.get(o).get(j),itemToOutputMap.get(o).get(j),itemToAspectsMap.get(o).get(j),o,itemToCircuitConfigMap.get(o).get(j)));
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Furnace.java b/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Furnace.java
index fa9bf7cd37..b8192f742e 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Furnace.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Furnace.java
@@ -28,7 +28,6 @@ import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.util.GT_Recipe;
diff --git a/src/main/java/com/github/bartimaeusnek/preloader/PreLoaderMod.java b/src/main/java/com/github/bartimaeusnek/preloader/PreLoaderMod.java
deleted file mode 100644
index b46a133df5..0000000000
--- a/src/main/java/com/github/bartimaeusnek/preloader/PreLoaderMod.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2019 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.preloader;
-
-import com.github.bartimaeusnek.bartworks.common.loaders.BeforeGTPreload;
-import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
-import cpw.mods.fml.common.Mod;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import gregtech.api.GregTech_API;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-@Mod(
- modid = com.github.bartimaeusnek.preloader.PreLoaderMod.MOD_ID, name = com.github.bartimaeusnek.preloader.PreLoaderMod.NAME, version = com.github.bartimaeusnek.preloader.PreLoaderMod.VERSION,
- dependencies = "required-before:IC2; "
- + "required-before:gregtech; "
- + "required-before:bartworks;"
- + "before:GalacticraftMars; "
- + "before:GalacticraftCore; "
- + "before:miscutils;"
- + "before:dreamcraft;"
- + "before:EMT;"
-)
-public class PreLoaderMod {
- public static final String NAME = "BartWorks Preloader Mod";
- public static final String VERSION = "0.0.1";
- public static final String MOD_ID = "bartworkspreloader";
- public static final Logger LOGGER = LogManager.getLogger(BartWorksCrossmod.NAME);
-
-
- @Mod.EventHandler
- public void preInit(FMLPreInitializationEvent preinit) {
- GregTech_API.sBeforeGTPreload.add(new BeforeGTPreload());
- }
-}