aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author‭huajijam <strhuaji@gmail.com>2019-07-19 16:52:52 +0800
committer‭huajijam <strhuaji@gmail.com>2019-07-19 16:52:52 +0800
commitdb91cda0822d42c31164285ca3862a604569ff94 (patch)
treec27fcb9691eb305b5a56ffafb0859a26a0dbde48 /src
parented5ac6dc56af287901f121a0cebe26f9778cfde7 (diff)
parentad2554e0c3d719eee9ec9537a047ee6e620a3956 (diff)
downloadGT5-Unofficial-db91cda0822d42c31164285ca3862a604569ff94.tar.gz
GT5-Unofficial-db91cda0822d42c31164285ca3862a604569ff94.tar.bz2
GT5-Unofficial-db91cda0822d42c31164285ca3862a604569ff94.zip
Automatic synchronization
Former-commit-id: c6c6b28197a11911b49a7a1e8ca16c3d2ec60df1
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java147
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java7
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java8
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java4
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java48
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java34
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java30
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java6
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java15
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java4
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java4
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java8
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_RadioHatch.java20
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java3
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/CircuitImprintLoader.java43
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java7
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java3
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java50
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java27
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java142
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java19
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java36
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java3
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOre_Item.java16
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java56
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java45
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java148
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java7
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/object/AbstractedStack.java88
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java11
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/worldgen/MapGenRuins.java16
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java10
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java139
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java18
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/GTpp/loader/RadioHatchCompat.java272
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java2
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java90
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java87
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java18
-rw-r--r--src/main/resources/assets/bartworks/lang/en_US.lang2
40 files changed, 1548 insertions, 145 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java b/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java
index 1f2d6f942c..d3e3eb727b 100644
--- a/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java
+++ b/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java
@@ -24,11 +24,13 @@ package com.github.bartimaeusnek.ASM;
import net.minecraft.launchwrapper.IClassTransformer;
import net.minecraft.launchwrapper.Launch;
+import net.minecraftforge.oredict.OreDictionary;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.tree.*;
import java.io.File;
+import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.jar.JarFile;
@@ -41,12 +43,14 @@ 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",
+ // "ADD EXECTION HANDLEING TO FIND OREIDS/OREDICT"
};
public static final String[] CLASSESBEEINGTRANSFORMED = {
"com.rwtema.extrautils.worldgen.endoftime.WorldProviderEndOfTime",
"com.rwtema.extrautils.worldgen.endoftime.ChunkProviderEndOfTime",
"net.minecraft.client.renderer.RenderGlobal",
"thaumcraft.common.tiles.TileWandPedestal",
+ // "net.minecraftforge.oredict.OreDictionary"
};
static boolean obfs;
@@ -221,6 +225,148 @@ public class BWCoreTransformer implements IClassTransformer {
}
break;
}
+ case 4 : {
+
+// String name_deObfs = "getOreIDs";
+// String dsc_deObfs = "(Lnet/minecraft/item/ItemStack;)[I";
+// String dsc_Obfs = "(Ladd;)[I";
+//
+// for (int i = 0; i < methods.size(); i++) {
+// if (ASMUtils.isCorrectMethod(methods.get(i), name_deObfs) && ASMUtils.isCorrectMethod(methods.get(i), dsc_deObfs, dsc_Obfs)) {
+// MethodNode toPatch = methods.get(i);
+// LabelNode[] LabelNodes = {new LabelNode(), new LabelNode(), new LabelNode(),new LabelNode(),new LabelNode(),new LabelNode(),new LabelNode()};
+// InsnList nu = new InsnList();
+// nu.add(new VarInsnNode(ALOAD, 0));
+// nu.add(new JumpInsnNode(IFNULL, LabelNodes[0])); //L1
+// nu.add(new VarInsnNode(ALOAD, 0));
+// nu.add(new MethodInsnNode(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false));
+// nu.add(new JumpInsnNode(IFNONNULL, LabelNodes[1])); //L2
+// nu.add(LabelNodes[0]); //L1
+// nu.add(new TypeInsnNode(NEW, "java/lang/IllegalArgumentException"));
+// nu.add(new InsnNode(DUP));
+// nu.add(new TypeInsnNode(LDC,"Stack can not be invalid!"));
+// nu.add(new MethodInsnNode(INVOKEVIRTUAL,"java/lang/IllegalArgumentException","<init>","(Ljava/lang/String;)V",false));
+// nu.add(new InsnNode(ATHROW));
+// nu.add(LabelNodes[1]); //L2
+// nu.add(new TypeInsnNode(NEW, "java/util/HashSet"));
+// nu.add(new InsnNode(DUP));
+// nu.add(new MethodInsnNode(INVOKEVIRTUAL,"java/util/HashSet","<init>","()V",false));
+// nu.add(new VarInsnNode(ASTORE, 1));
+// nu.add(new VarInsnNode(ALOAD, 0));
+// nu.add(new MethodInsnNode(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false));
+// nu.add(new FieldInsnNode(GETFIELD,"net/minecraft/item/Item","delegate","Lcpw/mods/fml/common/registry/RegistryDelegate;"));
+// nu.add(new MethodInsnNode(INVOKEINTERFACE, "cpw/mods/fml/common/registry/RegistryDelegate", "name", "()Ljava/lang/String;", true));
+// nu.add(new VarInsnNode(ASTORE, 2));
+// nu.add(new VarInsnNode(ALOAD, 2));
+// nu.add(new JumpInsnNode(IFNONNULL, LabelNodes[2])); //L5
+// nu.add(new FieldInsnNode(GETSTATIC,"org/apache/logging/log4j/Level","DEBUG","Lorg/apache/logging/log4j/Level;"));
+// nu.add(new TypeInsnNode(LDC,"Attempted to find the oreIDs for an unregistered object (%s). This won't work very well."));
+// nu.add(new InsnNode(ICONST_1));
+// nu.add(new TypeInsnNode(ANEWARRAY,"java/lang/Object"));
+// nu.add(new InsnNode(DUP));
+// nu.add(new InsnNode(ICONST_0));
+// nu.add(new VarInsnNode(ALOAD, 0));
+// nu.add(new InsnNode(AASTORE));
+// nu.add(new MethodInsnNode(INVOKESTATIC, "cpw/mods/fml/common/FMLLog", "log", "(Lorg/apache/logging/log4j/Level;Ljava/lang/String;[Ljava/lang/Object;)V", false));
+// nu.add(new TypeInsnNode(NEW, "java/io/StringWriter"));
+// nu.add(new InsnNode(DUP));
+// nu.add(new MethodInsnNode(INVOKESPECIAL, "java/io/StringWriter", "<init>", "()V", false));
+// nu.add(new VarInsnNode(ASTORE, 4));
+// nu.add(new TypeInsnNode(NEW, "java/io/PrintWriter"));
+// nu.add(new InsnNode(DUP));
+// nu.add(new VarInsnNode(ALOAD, 4));
+// nu.add(new MethodInsnNode(INVOKESPECIAL, "java/io/PrintWriter", "<init>", "(Ljava/io/Writer;)V", false));
+// nu.add(new VarInsnNode(ASTORE, 5));
+// nu.add(new TypeInsnNode(NEW, "java/lang/Exception"));
+// nu.add(new InsnNode(DUP));
+// nu.add(new TypeInsnNode(LDC,"FINDME!"));
+// nu.add(new MethodInsnNode(INVOKESPECIAL, "java/lang/Exception", "<init>", "(Ljava/lang/String;)V", false));
+// nu.add(new VarInsnNode(ALOAD, 5));
+// nu.add(new MethodInsnNode(INVOKEVIRTUAL, "java/lang/Exception", "printStackTrace", "(Ljava/io/PrintWriter;)V", false));
+// nu.add(new FieldInsnNode(GETSTATIC,"org/apache/logging/log4j/Level","DEBUG","Lorg/apache/logging/log4j/Level;"));
+// nu.add(new VarInsnNode(ALOAD, 5));
+// nu.add(new MethodInsnNode(INVOKEVIRTUAL, "java/lang/Object", "toString", "()Ljava/lang/String;", false));
+// nu.add(new InsnNode(ICONST_0));
+// nu.add(new TypeInsnNode(ANEWARRAY,"java/lang/Object"));
+// nu.add(new MethodInsnNode(INVOKESTATIC, "cpw/mods/fml/common/FMLLog", "log", "(Lorg/apache/logging/log4j/Level;Ljava/lang/String;[Ljava/lang/Object;)V", false));
+// nu.add(new InsnNode(ICONST_0));
+// nu.add(new IntInsnNode(NEWARRAY,T_INT));
+// nu.add(new InsnNode(ARETURN));
+// nu.add(LabelNodes[2]); //L5
+// nu.add(new MethodInsnNode(INVOKESTATIC, "cpw/mods/fml/common/registry/GameData", "getItemRegistry", "()Lcpw/mods/fml/common/registry/FMLControlledNamespacedRegistry;", false));
+// nu.add(new VarInsnNode(ALOAD, 2));
+// nu.add(new MethodInsnNode(INVOKEVIRTUAL, "cpw/mods/fml/common/registry/FMLControlledNamespacedRegistry", "getId", "(Ljava/lang/String;)I", false));
+// nu.add(new VarInsnNode(ISTORE, 3));
+// nu.add(new FieldInsnNode(GETSTATIC,"net/minecraftforge/oredict/OreDictionary","stackToId","Ljava/util/Map;"));
+// nu.add(new VarInsnNode(ILOAD, 3));
+// nu.add(new MethodInsnNode(INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false));
+// nu.add(new MethodInsnNode(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", false));
+// nu.add(new TypeInsnNode(CHECKCAST,"java/util/List"));
+// nu.add(new VarInsnNode(ASTORE, 4));
+// nu.add(new VarInsnNode(ALOAD, 4));
+// nu.add(new JumpInsnNode(IFNULL, LabelNodes[3])); //L14
+// nu.add(new VarInsnNode(ALOAD, 1));
+// nu.add(new VarInsnNode(ALOAD, 4));
+// nu.add(new MethodInsnNode(INVOKEINTERFACE, "java/util/Set", "addAll", "(Ljava/util/Collection;)Z", true));
+// nu.add(new InsnNode(POP));
+// nu.add(LabelNodes[3]); //L14
+// nu.add(new FieldInsnNode(GETSTATIC,"net/minecraftforge/oredict/OreDictionary","stackToId","Ljava/util/Map;"));
+// nu.add(new VarInsnNode(ILOAD, 3));
+// nu.add(new VarInsnNode(ALOAD, 0));
+// nu.add(new MethodInsnNode(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItemDamage", "()I", false));
+// nu.add(new InsnNode(ICONST_1));
+// nu.add(new InsnNode(IADD));
+// nu.add(new VarInsnNode(BIPUSH, 16));
+// nu.add(new InsnNode(ISHL));
+// nu.add(new InsnNode(IOR));
+// nu.add(new MethodInsnNode(INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false));
+// nu.add(new MethodInsnNode(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true));
+// nu.add(new TypeInsnNode(CHECKCAST,"java/util/List"));
+// nu.add(new VarInsnNode(ASTORE, 4));
+// nu.add(new VarInsnNode(ALOAD, 4));
+// nu.add(new JumpInsnNode(IFNULL, LabelNodes[4])); //L16
+// nu.add(new VarInsnNode(ALOAD, 1));
+// nu.add(new VarInsnNode(ALOAD, 4));
+// nu.add(new MethodInsnNode(INVOKEINTERFACE, "java/util/Set", "addAll", "(Ljava/util/Collection;)Z", true));
+// nu.add(new InsnNode(POP));
+// nu.add(LabelNodes[4]); //L16
+// nu.add(new VarInsnNode(ALOAD, 1));
+// nu.add(new VarInsnNode(ALOAD, 1));
+// nu.add(new MethodInsnNode(INVOKEINTERFACE, "java/util/Set", "size", "()I", true));
+// nu.add(new TypeInsnNode(ANEWARRAY,"java/lang/Integer"));
+// nu.add(new MethodInsnNode(INVOKEINTERFACE, "java/util/Set", "toArray", "([Ljava/lang/Object;)[Ljava/lang/Object;", true));
+// nu.add(new TypeInsnNode(CHECKCAST,"[java/util/Integer"));
+// nu.add(new VarInsnNode(ASTORE, 5));
+// nu.add(new VarInsnNode(ALOAD, 5));
+// nu.add(new InsnNode(ARRAYLENGTH));
+// nu.add(new IntInsnNode(NEWARRAY,T_INT));
+// nu.add(new VarInsnNode(ASTORE, 6));
+// nu.add(new InsnNode(ICONST_0));
+// nu.add(new VarInsnNode(ISTORE, 7));
+// nu.add(LabelNodes[6]); //L19
+// nu.add(new VarInsnNode(ILOAD, 7));
+// nu.add(new VarInsnNode(ALOAD, 5));
+// nu.add(new InsnNode(ARRAYLENGTH));
+// nu.add(new JumpInsnNode(IF_ICMPGE, LabelNodes[5])); //L20
+// nu.add(new VarInsnNode(ALOAD, 6));
+// nu.add(new VarInsnNode(ILOAD, 7));
+// nu.add(new VarInsnNode(ALOAD, 5));
+// nu.add(new VarInsnNode(ILOAD, 7));
+// nu.add(new InsnNode(AALOAD));
+// nu.add(new MethodInsnNode(INVOKEVIRTUAL, "java/lang/Integer", "intValue", "()I", false));
+// nu.add(new InsnNode(IASTORE));
+// nu.add(new IincInsnNode(7,1));
+// nu.add(new JumpInsnNode(GOTO, LabelNodes[6])); //L19
+// nu.add(LabelNodes[5]); //L20
+// nu.add(new VarInsnNode(ALOAD, 6));
+// nu.add(new InsnNode(ARETURN));
+// toPatch.instructions = nu;
+// toPatch.maxStack = 6;
+// toPatch.maxLocals = 8;
+// methods.set(i, toPatch);
+// break;
+// }
+ }
default: {
BWCore.BWCORE_LOG.info("Could not find: " + BWCoreTransformer.CLASSESBEEINGTRANSFORMED[id]);
return basicClass;
@@ -233,7 +379,6 @@ public class BWCoreTransformer implements IClassTransformer {
byte[] ret = classWriter.toByteArray();
if (Arrays.hashCode(basicClass) == Arrays.hashCode(ret))
BWCore.BWCORE_LOG.warn("Could not patch: " + BWCoreTransformer.CLASSESBEEINGTRANSFORMED[id]);
-
return ret;
}
return basicClass;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java
index 3dcd7596fb..a3c33ceac9 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java
@@ -26,9 +26,14 @@ import com.github.bartimaeusnek.bartworks.util.BioCulture;
import com.github.bartimaeusnek.bartworks.util.BioDNA;
import com.github.bartimaeusnek.bartworks.util.BioData;
import com.github.bartimaeusnek.bartworks.util.BioPlasmid;
+import cpw.mods.fml.common.Loader;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
import gregtech.api.objects.GT_Fluid;
+import gregtech.api.util.GT_Utility;
import net.minecraft.item.EnumRarity;
import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
import java.awt.*;
@@ -158,11 +163,13 @@ public final class BioObjectAdder {
* If you get NPE's related to BioCultures (most likely because of Load Order or creating BioCultures after the postinit Phase) execute this.
*/
public static void regenerateBioFluids() {
+ FluidStack dnaFluid = Loader.isModLoaded("gendustry") ? FluidRegistry.getFluidStack("liquiddna", 100) : Materials.Biomass.getFluid(100L);
for (BioCulture B : BioCulture.BIO_CULTURE_ARRAY_LIST) {
if (B.getFluidNotSet()) {
B.setFluid(new GT_Fluid(B.getName().replaceAll(" ", "").toLowerCase() + "fluid", "molten.autogenerated", new short[]{(short) B.getColor().getRed(), (short) B.getColor().getBlue(), (short) B.getColor().getGreen()}));
if (!FluidRegistry.registerFluid(B.getFluid()))
new Exception("FAILED TO REGISTER FLUID FOR: " + B.getName()).printStackTrace();
+ GT_Values.RA.addCentrifugeRecipe(GT_Utility.getIntegratedCircuit(10),GT_Values.NI,new FluidStack(B.getFluid(),1000),dnaFluid,GT_Values.NI,GT_Values.NI,GT_Values.NI,GT_Values.NI,GT_Values.NI,GT_Values.NI,null,500,120);
}
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java
index 86ec61c138..edee87f534 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java
@@ -43,11 +43,11 @@ public final class BioObjectGetter {
}
public static NBTTagCompound getNBTTagFromBioPlasmid(BioPlasmid bioPlasmid) {
- return getNBTTagFromBioData(convertBioPlasmidToData(bioPlasmid));
+ return BioObjectGetter.getNBTTagFromBioData(BioObjectGetter.convertBioPlasmidToData(bioPlasmid));
}
public static NBTTagCompound getNBTTagFromBioDNA(BioDNA bioDNA) {
- return getNBTTagFromBioData(convertBioDNAtoData(bioDNA));
+ return BioObjectGetter.getNBTTagFromBioData(BioObjectGetter.convertBioDNAtoData(bioDNA));
}
public static NBTTagCompound getNBTTagFromBioData(BioData bioData) {
@@ -75,11 +75,11 @@ public final class BioObjectGetter {
}
public static BioPlasmid convertBioDNAtoBioPlasmid(BioDNA bioDNA) {
- return convertDataToPlasmid(convertBioDNAtoData(bioDNA));
+ return BioObjectGetter.convertDataToPlasmid(BioObjectGetter.convertBioDNAtoData(bioDNA));
}
public static BioDNA convertBioPlasmidtoBioDNA(BioPlasmid bioPlasmid) {
- return convertDataToDNA(convertBioPlasmidToData(bioPlasmid));
+ return BioObjectGetter.convertDataToDNA(BioObjectGetter.convertBioPlasmidToData(bioPlasmid));
}
public static Collection<ItemStack> getAllPetriDishes() {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java
index 81b0d894af..a8fc8dae91 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java
@@ -60,8 +60,10 @@ public final class BioVatLogicAdder {
IsSv.put(stack, sv);
}
+ public static int MaxSV = 150;
+
public static int getMaxSv() {
- int ret = 150;
+ int ret = MaxSV;
Iterator it = BioVatLogicAdder.RadioHatch.getMaSv().iterator();
while (it.hasNext()) {
BioVatLogicAdder.MaterialSvPair pair = (BioVatLogicAdder.MaterialSvPair) it.next();
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java
new file mode 100644
index 0000000000..391593d217
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java
@@ -0,0 +1,48 @@
+/*
+ * 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.bartworks.API;
+
+import net.minecraft.item.ItemStack;
+
+public interface IRadMaterial {
+
+ /**
+ * @return the amount of Radiation (0-150, commonly, higher values are possible but not recommended!)
+ */
+ int getRadiationLevel(ItemStack aStack);
+
+ /**
+ * @return 1 for stick, 2 for long rods, 3 for fuel rods
+ */
+ byte getAmountOfMaterial(ItemStack aStack);
+
+ /**
+ * @return the color of the material for display purposes
+ */
+ short[] getColorForGUI(ItemStack aStack);
+
+ /**
+ * @return the name of the material for display purposes
+ */
+ String getNameForGUI(ItemStack aStack);
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java
new file mode 100644
index 0000000000..a441e38e35
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java
@@ -0,0 +1,34 @@
+/*
+ * 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.bartworks.API;
+
+import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
+
+public final class WerkstoffAPI {
+
+ public Werkstoff getWerkstoff(String aName) throws NoSuchFieldException, IllegalAccessException, ClassNotFoundException {
+ Class w = Class.forName("com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader");
+ return (Werkstoff) w.getField(aName).get(w);
+ }
+
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
index 8bc304e41d..297abb2ca2 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
@@ -30,10 +30,7 @@ import com.github.bartimaeusnek.bartworks.client.creativetabs.BioTab;
import com.github.bartimaeusnek.bartworks.client.creativetabs.GT2Tab;
import com.github.bartimaeusnek.bartworks.client.creativetabs.bartworksTab;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
-import com.github.bartimaeusnek.bartworks.common.loaders.BioCultureLoader;
-import com.github.bartimaeusnek.bartworks.common.loaders.BioLabLoader;
-import com.github.bartimaeusnek.bartworks.common.loaders.GTNHBlocks;
-import com.github.bartimaeusnek.bartworks.common.loaders.LoaderRegistry;
+import com.github.bartimaeusnek.bartworks.common.loaders.*;
import com.github.bartimaeusnek.bartworks.common.net.BW_Network;
import com.github.bartimaeusnek.bartworks.server.EventHandler.ServerEventHandler;
import com.github.bartimaeusnek.bartworks.system.log.DebugLog;
@@ -160,8 +157,13 @@ public final class MainMod {
public void onServerStarted(FMLServerStartedEvent event) {
OreDictHandler.adaptCacheForWorld();
WerkstoffLoader.removeIC2Recipes();
+ this.addElectricImplosionCompressorRecipes();
+ new CircuitImprintLoader().run();
+ }
+
+ private void addElectricImplosionCompressorRecipes(){
if (eicMap == null) {
- eicMap = new GT_Recipe.GT_Recipe_Map(new HashSet(GT_Recipe.GT_Recipe_Map.sImplosionRecipes.mRecipeList.size()), "gt.recipe.electricimplosioncompressor", "Electric Implosion Compressor", (String) null, "gregtech:textures/gui/basicmachines/Default", 1, 2, 1, 0, 1, "", 1, "", true, true);
+ eicMap = new GT_Recipe.GT_Recipe_Map(new HashSet<GT_Recipe>(GT_Recipe.GT_Recipe_Map.sImplosionRecipes.mRecipeList.size()), "gt.recipe.electricimplosioncompressor", "Electric Implosion Compressor", (String) null, "gregtech:textures/gui/basicmachines/Default", 1, 2, 1, 0, 1, "", 1, "", true, true);
recipeLoop:
for (GT_Recipe recipe : GT_Recipe.GT_Recipe_Map.sImplosionRecipes.mRecipeList) {
if (recipe == null || recipe.mInputs == null)
@@ -169,23 +171,20 @@ public final class MainMod {
try {
ItemStack input = recipe.mInputs[0];
int i = 0;
- float durMod = 0;
if (this.checkForExplosives(recipe.mInputs[1])) {
- if (GT_Utility.areStacksEqual(recipe.mInputs[1], GT_ModHandler.getIC2Item("industrialTnt", 1L)))
- durMod += ((float) input.stackSize * 2f);
- else
- continue;
+ continue;
}
while (this.checkForExplosives(input)) {
- if (GT_Utility.areStacksEqual(input, GT_ModHandler.getIC2Item("industrialTnt", 1L)))
- durMod += ((float) input.stackSize * 2f);
+ if (GT_Utility.areSt