diff --git a/gradle.properties b/gradle.properties index e87adc2e..59f92be6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,6 +6,6 @@ org.gradle.jvmargs=-Xmx2G mod_name = Hytils Reborn mod_id = hytils-reborn -mod_version = 1.5.0-beta3 +mod_version = 1.5.0 loom.platform = forge \ No newline at end of file diff --git a/src/main/java/cc/woverflow/hytils/forge/HytilsMixinPlugin.java b/src/main/java/cc/woverflow/hytils/forge/HytilsMixinPlugin.java index 8ba96f0f..59dc957c 100644 --- a/src/main/java/cc/woverflow/hytils/forge/HytilsMixinPlugin.java +++ b/src/main/java/cc/woverflow/hytils/forge/HytilsMixinPlugin.java @@ -33,6 +33,7 @@ public class HytilsMixinPlugin implements IMixinConfigPlugin { private boolean isOptiFine = false; + private boolean hasApplied = false; @Override public void onLoad(String mixinPackage) { @@ -78,7 +79,7 @@ public void preApply(String targetClassName, ClassNode targetClass, String mixin @Override public void postApply(String targetClassName, ClassNode classNode, String mixinClassName, IMixinInfo mixinInfo) { - if (classNode != null && Objects.equals(targetClassName, "net.minecraft.client.gui.GuiPlayerTabOverlay")) { + if (!hasApplied && classNode != null && Objects.equals(targetClassName, "net.minecraft.client.gui.GuiPlayerTabOverlay")) { for (MethodNode method : classNode.methods) { final String methodName = FMLDeobfuscatingRemapper.INSTANCE.mapMethodName(classNode.name, method.name, method.desc); final ListIterator iterator = method.instructions.iterator(); @@ -94,6 +95,7 @@ public void postApply(String targetClassName, ClassNode classNode, String mixinC // trim the player name to remove player ranks and guild tags if (methodInsnName.equals("formatPlayerName") || methodInsnName.equals("func_96667_a")) { method.instructions.insert(next, modifyName()); + hasApplied = true; break; } }