From c3880b1abaa99caf74057dd30a7553f1b368192e Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Tue, 10 Sep 2019 13:55:25 +0100 Subject: [PATCH] Fix HD_U_F4_pre4 support --- gradle.properties | 2 +- .../java/me/modmuss50/optifabric/mod/OptifineInjector.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 927b1157..d17e39f4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,6 @@ minecraft_version=1.14.4 yarn_mappings=1.14.4+build.2 loader_version=0.4.8+build.155 -mod_version = 0.5.1 +mod_version = 0.5.2 maven_group = me.modmuss50 archives_base_name = optifabric diff --git a/src/main/java/me/modmuss50/optifabric/mod/OptifineInjector.java b/src/main/java/me/modmuss50/optifabric/mod/OptifineInjector.java index bfc719fe..f65f25a0 100644 --- a/src/main/java/me/modmuss50/optifabric/mod/OptifineInjector.java +++ b/src/main/java/me/modmuss50/optifabric/mod/OptifineInjector.java @@ -23,6 +23,7 @@ public class OptifineInjector { ClassCache classCache; String chunkRenderer; + String particleManager; public OptifineInjector(ClassCache classCache) { this.classCache = classCache; @@ -30,6 +31,7 @@ public OptifineInjector(ClassCache classCache) { public void setup() throws IOException { chunkRenderer = FabricLoader.getInstance().getMappingResolver().mapClassName("intermediary", "net.minecraft.class_851").replaceAll("\\.", "/"); + particleManager = FabricLoader.getInstance().getMappingResolver().mapClassName("intermediary", "net.minecraft.class_702").replaceAll("\\.", "/"); classCache.getClasses().forEach(s -> ClassTinkerers.addTransformation(s.replaceAll("/", ".").substring(0, s.length() - 6), transformer)); } @@ -45,6 +47,11 @@ public void setup() throws IOException { ChunkRendererFix.fix(source); } + //Skip applying incompatible ParticleManager changes + if(target.name.equals(particleManager)){ + return; + } + target.methods = source.methods; target.fields = source.fields; target.interfaces = source.interfaces;