diff --git a/gradle.properties b/gradle.properties index 8d179d80..90a6b576 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,6 +8,6 @@ loader_version=0.10.8 fabric_version=0.31.0+1.16 fabric_asm_version=v2.2 -mod_version = 1.10.1 +mod_version = 1.10.2 maven_group = me.modmuss50 archives_base_name = optifabric diff --git a/src/main/java/me/modmuss50/optifabric/mod/OptifineSetup.java b/src/main/java/me/modmuss50/optifabric/mod/OptifineSetup.java index 1063cffc..b6f4ca20 100644 --- a/src/main/java/me/modmuss50/optifabric/mod/OptifineSetup.java +++ b/src/main/java/me/modmuss50/optifabric/mod/OptifineSetup.java @@ -209,8 +209,10 @@ private static IMappingProvider createMappings(String from, String to) { }); ClassDef clientEntityHandler = nameToClass.get("net/minecraft/class_638$class_5612"); - ClassDef clientWorld = nameToClass.get("net/minecraft/class_638"); - extraFields.put(new Member(clientEntityHandler.getName(from), "this$0", 'L' + clientWorld.getName(from) + ';'), "field_27735"); + if (clientEntityHandler != null) {//Only present in 1.17.x (20w45a+) + ClassDef clientWorld = nameToClass.get("net/minecraft/class_638"); + extraFields.put(new Member(clientEntityHandler.getName(from), "this$0", 'L' + clientWorld.getName(from) + ';'), "field_27735"); + } //In dev if (FabricLoader.getInstance().isDevelopmentEnvironment()) {