Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Commit

Permalink
Fix HD_U_F4_pre4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Sep 10, 2019
1 parent cc6ee95 commit c3880b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ public class OptifineInjector {
ClassCache classCache;

String chunkRenderer;
String particleManager;

public OptifineInjector(ClassCache classCache) {
this.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));
}
Expand All @@ -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;
Expand Down

0 comments on commit c3880b1

Please sign in to comment.