diff --git a/gradle.properties b/gradle.properties index 6e918bbc..1e7267e1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,13 +3,13 @@ org.gradle.jvmargs=-Xmx1G minecraft_version=1.15.2 yarn_mappings=1.15.2+build.14 -loader_version=0.7.8+build.184 +loader_version=0.7.8+build.189 -fabric_version=0.4.32+build.292-1.15 +fabric_version=0.5.1+build.294-1.15 fabric_asm_version=v2.0 zt_zip_version=1.14 slf4j_version=1.7.30 -mod_version = 1.0.0-beta4 +mod_version = 1.0.0-beta5 maven_group = me.modmuss50 archives_base_name = optifabric diff --git a/src/main/java/me/modmuss50/optifabric/patcher/fixes/OptifineFixer.java b/src/main/java/me/modmuss50/optifabric/patcher/fixes/OptifineFixer.java index af273354..b6dfd377 100644 --- a/src/main/java/me/modmuss50/optifabric/patcher/fixes/OptifineFixer.java +++ b/src/main/java/me/modmuss50/optifabric/patcher/fixes/OptifineFixer.java @@ -27,6 +27,9 @@ private OptifineFixer() { //net/minecraft/client/render/item/HeldItemRenderer registerFix("class_759", new HeldItemRendererFix()); + //net/minecraft/client/texture/SpriteAtlasTexture + registerFix("class_1059", new SpriteAtlasTextureFix()); + //net/minecraft/client/particle/ParticleManager skipClass("class_702"); diff --git a/src/main/java/me/modmuss50/optifabric/patcher/fixes/SpriteAtlasTextureFix.java b/src/main/java/me/modmuss50/optifabric/patcher/fixes/SpriteAtlasTextureFix.java new file mode 100644 index 00000000..f4371b59 --- /dev/null +++ b/src/main/java/me/modmuss50/optifabric/patcher/fixes/SpriteAtlasTextureFix.java @@ -0,0 +1,25 @@ +package me.modmuss50.optifabric.patcher.fixes; + +import me.modmuss50.optifabric.util.RemappingUtils; +import org.objectweb.asm.tree.ClassNode; +import org.objectweb.asm.tree.LocalVariableNode; +import org.objectweb.asm.tree.MethodNode; + +public class SpriteAtlasTextureFix implements ClassFixer { + + private String stitchName = RemappingUtils.getMethodName("class_1059", "method_18163", "(Lnet/minecraft/class_3300;Ljava/util/stream/Stream;Lnet/minecraft/class_3695;I)Lnet/minecraft/class_1059$class_4007;"); + + @Override + public void fix(ClassNode optifine, ClassNode minecraft) { + for (MethodNode methodNode : optifine.methods) { + if (methodNode.name.equals(stitchName)) { + for (LocalVariableNode localVariable : methodNode.localVariables) { + if (localVariable.name.equals("locsEmissive")) { + //Make this a HashSet and not just a Set so mixin only has 1 target + localVariable.desc = "Ljava/util/HashSet;"; + } + } + } + } + } +}