diff --git a/src/main/java/me/modmuss50/optifabric/patcher/LambdaRebuilder.java b/src/main/java/me/modmuss50/optifabric/patcher/LambdaRebuilder.java index 6d02f074..ed5c6a0a 100644 --- a/src/main/java/me/modmuss50/optifabric/patcher/LambdaRebuilder.java +++ b/src/main/java/me/modmuss50/optifabric/patcher/LambdaRebuilder.java @@ -286,7 +286,8 @@ private void pairUp(String className, List commonMethods, List if (lostMethod == null) { if (gainedMethod == null) { - assert Objects.equals(lost.getFullName(), gained.getFullName()); + assert Objects.equals(lost.getFullName(), gained.getFullName()) || commonMethods.stream().anyMatch(method -> gained.name.equals(method.node.name) && gained.desc.equals(method.node.desc)): + "Expected lost lambda '" + lost.getFullName() + "' to equal gained lambda '" + gained.getFullName() + '\''; continue; } else { throw new IllegalStateException("Couldn't find original method for lambda: " + lost.getFullName()); diff --git a/src/main/java/me/modmuss50/optifabric/patcher/fixes/ChunkRendererFix.java b/src/main/java/me/modmuss50/optifabric/patcher/fixes/ChunkRendererFix.java index c756d46e..9334970d 100644 --- a/src/main/java/me/modmuss50/optifabric/patcher/fixes/ChunkRendererFix.java +++ b/src/main/java/me/modmuss50/optifabric/patcher/fixes/ChunkRendererFix.java @@ -1,5 +1,6 @@ package me.modmuss50.optifabric.patcher.fixes; +import java.util.Arrays; import java.util.ListIterator; import org.objectweb.asm.Opcodes; @@ -41,7 +42,8 @@ public void fix(ClassNode classNode, ClassNode old) { if (trailingBoolean) end--; boolean trailingRenderLayer = RemappingUtils.getClassName("class_1921").equals(args[end].getInternalName()); if (trailingRenderLayer) end--; - assert "net/minecraftforge/client/model/data/IModelData".equals(args[end].getInternalName()); + assert "net/minecraftforge/client/model/data/IModelData".equals(args[end].getInternalName()) || "net/minecraftforge/client/model/data/ModelData".equals(args[end].getInternalName()): + "Expected Forge (I)ModelData, found: '" + args[end] + "' from " + Arrays.toString(args); end--; assert end > 0 && Type.BOOLEAN == args[end - 1].getSort(); boolean nativeRandom = "java/util/Random".equals(args[end].getInternalName());