mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
wartec compatibility
This commit is contained in:
parent
98115ac784
commit
0128164deb
@ -3,6 +3,7 @@ package com.hbm.inventory.recipes;
|
|||||||
import static com.hbm.inventory.OreDictManager.*;
|
import static com.hbm.inventory.OreDictManager.*;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -44,6 +45,9 @@ public class AssemblerRecipes extends SerializableRecipe {
|
|||||||
|
|
||||||
public static HashMap<ComparableStack, AssemblerRecipe> recipes = new HashMap();
|
public static HashMap<ComparableStack, AssemblerRecipe> recipes = new HashMap();
|
||||||
public static List<ComparableStack> recipeList = new ArrayList();
|
public static List<ComparableStack> recipeList = new ArrayList();
|
||||||
|
|
||||||
|
/** Legacy NOP, WarTec needs this */
|
||||||
|
public static void loadRecipes() { }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerDefaults() {
|
public void registerDefaults() {
|
||||||
@ -1172,6 +1176,16 @@ public class AssemblerRecipes extends SerializableRecipe {
|
|||||||
makeRecipe(new ComparableStack(ModItems.heavy_component, 1, mat.id), new AStack[] { new OreDictStack(MaterialShapes.CASTPLATE.name() + mat.names[0], 256) }, 12_000);
|
makeRecipe(new ComparableStack(ModItems.heavy_component, 1, mat.id), new AStack[] { new OreDictStack(MaterialShapes.CASTPLATE.name() + mat.names[0], 256) }, 12_000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WarTec compatibility code
|
||||||
|
try {
|
||||||
|
Class wartecmodAssemblerRecipes = ClassLoader.getSystemClassLoader().loadClass("com.wartec.wartecmod.inventory.wartecmodAssemblerRecipes");
|
||||||
|
MainRegistry.logger.info("WarTec assembler recipes class found!");
|
||||||
|
Method method = wartecmodAssemblerRecipes.getDeclaredMethod("AssemblerRecipes");
|
||||||
|
MainRegistry.logger.info("WarTec AssemblerRecipes method found!");
|
||||||
|
method.invoke(null);
|
||||||
|
MainRegistry.logger.info("WarTec recipes loaded!");
|
||||||
|
} catch(Exception e) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void makeRecipe(ComparableStack out, AStack[] in, int duration) {
|
public static void makeRecipe(ComparableStack out, AStack[] in, int duration) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user