Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
reobf committed Feb 13, 2025
1 parent f609ffd commit 6e6eedb
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions src/main/java/reobf/proghatches/gt/metatileentity/DataHatchME.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
package reobf.proghatches.gt.metatileentity;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.EnumSet;
import java.util.List;
import java.util.function.Function;
import java.util.function.Predicate;

import net.minecraft.entity.player.EntityPlayer;
Expand Down Expand Up @@ -343,9 +347,27 @@ public List<RecipeAssemblyLine> getAssemblyLineRecipes() {
}
if (cachedRecipes == null) {
cachedRecipes = new ArrayList<>();

Method f=null;
try {
f=AssemblyLineUtils.class.getDeclaredMethod("findALRecipeFromDataStick", ItemStack.class);
} catch (Exception e) {}
try {
f=AssemblyLineUtils.class.getDeclaredMethod("findAssemblyLineRecipeFromDataStick", ItemStack.class);
} catch (Exception e) {}

if(f==null)throw new AssertionError();
for (int i = 0; i < getSizeInventory(); i++) {
cachedRecipes.addAll(AssemblyLineUtils.findALRecipeFromDataStick(getStackInSlot(i)));
try {
cachedRecipes.addAll(

(Collection<? extends RecipeAssemblyLine>) f.invoke(null, getStackInSlot(i))



);
} catch (Exception e) {
e.printStackTrace();
}
}
}

Expand Down

0 comments on commit 6e6eedb

Please sign in to comment.