mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-12 00:07:57 +00:00
Im new to reflection! okay?
This commit is contained in:
1 parent
72590e79f5
commit
2e1215fc93
1 file changed
+3
-3
@@ -14,11 +14,11 @@ public class ForestryHelper {
|
||||
Class clazz;
|
||||
try {
|
||||
clazz = Class.forName("forestry.factory.gadgets.MachineCarpenter$RecipeManager");
|
||||
Field field_box = clazz.getDeclaredField("list");
|
||||
Field field_box = clazz.getDeclaredField("box");
|
||||
field_box.setAccessible(true);
|
||||
|
||||
ArrayList<ItemStack> recipeFluids = (ArrayList<ItemStack>) field_box.get(clazz);
|
||||
recipeFluids.add(box);
|
||||
ArrayList<ItemStack> recipeBoxes = (ArrayList<ItemStack>) field_box.get(clazz);
|
||||
recipeBoxes.add(box);
|
||||
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in new issue
Block a user