aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/handler
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-03-12 05:08:33 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-03-12 05:08:33 +0000
commitdbe1827984f9dd1e87d500882c541181bdaeb542 (patch)
tree10f60a2559121185f97c73b4b37152424068c5a8 /src/Java/gtPlusPlus/core/handler
parent6093c5e76fad9cb1ec8a44e7a638c0350f11e952 (diff)
downloadGT5-Unofficial-dbe1827984f9dd1e87d500882c541181bdaeb542.tar.gz
GT5-Unofficial-dbe1827984f9dd1e87d500882c541181bdaeb542.tar.bz2
GT5-Unofficial-dbe1827984f9dd1e87d500882c541181bdaeb542.zip
+ Added framework for additional Oil chemistry in future updates.
+ Added additional processes for obtaining Kerosene. % Mild rebalance to GT++ Rocket Fuels. % Swapped Coal by-products (Coal Tar, Coal Tar Oil and Sulfuric Coal Tar Oil) from Gas Turbine fuel to Semifluid fuel. % Allowed ItemPackages to register themselves to the onLoadComplete() event. $ Fixed GT++ Rocket Fuels being unusable in Rocket Engines. $ Fixed Tooltip on GC Fuel loader when the GC-ASM is not active.
Diffstat (limited to 'src/Java/gtPlusPlus/core/handler')
-rw-r--r--src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
index a5b876efb6..1e3cb0ffbb 100644
--- a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
+++ b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
@@ -4,11 +4,13 @@ import static gtPlusPlus.core.lib.LoadedMods.Gregtech;
import java.util.*;
+import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.api.interfaces.RunnableWithInfo;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.api.objects.minecraft.ItemPackage;
import gtPlusPlus.core.common.compat.*;
import gtPlusPlus.core.handler.Recipes.LateRegistrationHandler;
import gtPlusPlus.core.handler.Recipes.RegistrationHandler;
@@ -19,6 +21,7 @@ import gtPlusPlus.core.material.MaterialGenerator;
import gtPlusPlus.core.recipe.*;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.RecipeUtils;
+import gtPlusPlus.xmod.gregtech.HANDLER_GT;
import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Recycling;
import gtPlusPlus.xmod.gregtech.registration.gregtech.*;
import net.minecraft.item.ItemStack;
@@ -207,11 +210,18 @@ public class COMPAT_HANDLER {
RecipeGen_Recycling.executeGenerators();
runQueuedMisc();
}
+
+
+
+ public static void onLoadComplete(FMLLoadCompleteEvent event) {
+ runQueuedOnLoadComplete(event);
+ }
public static final AutoMap<RunnableWithInfo<String>> mRecipesToGenerate = new AutoMap<RunnableWithInfo<String>>();
public static final AutoMap<RunnableWithInfo<String>> mGtRecipesToGenerate = new AutoMap<RunnableWithInfo<String>>();
public static final AutoMap<RunnableWithInfo<String>> mObjectsToRunInPostInit = new AutoMap<RunnableWithInfo<String>>();
+ public static final AutoMap<ItemPackage> mObjectsToRunInOnLoadComplete = new AutoMap<ItemPackage>();
public static void runQueuedRecipes() {
//Add autogenerated Recipes from Item Components
@@ -249,4 +259,20 @@ public class COMPAT_HANDLER {
}
}
+
+ /**
+ * Generally used to register GT recipe map changes after they've been populated.
+ */
+ public static void runQueuedOnLoadComplete(FMLLoadCompleteEvent event) {
+ for (ItemPackage m : mObjectsToRunInOnLoadComplete) {
+ try {
+ m.onLoadComplete(event);
+ }
+ catch (Throwable t) {
+ t.printStackTrace();
+ Logger.INFO("[ERROR] "+m.getInfoData());
+ }
+
+ }
+ }
}