diff --git a/gradle.properties b/gradle.properties index 2628a39..86c7541 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod_name = Chatting mod_id = chatting -mod_version = 1.5.1 +mod_version = 1.5.2 mod_archives_name = Chatting # Gradle Configuration -- DO NOT TOUCH THESE VALUES. diff --git a/src/main/java/org/polyfrost/chatting/mixin/GuiNewChatMixin.java b/src/main/java/org/polyfrost/chatting/mixin/GuiNewChatMixin.java index 7696483..3106490 100644 --- a/src/main/java/org/polyfrost/chatting/mixin/GuiNewChatMixin.java +++ b/src/main/java/org/polyfrost/chatting/mixin/GuiNewChatMixin.java @@ -89,9 +89,12 @@ private void checkScreenshotKeybind(int j2, CallbackInfo ci) { chatting$chatCheck = false; } + @Unique + private int chatting$updateCounter; + @ModifyVariable(method = "drawChat", at = @At("HEAD"), argsOnly = true) private int setUpdateCounterWhenYes(int updateCounter) { - return Chatting.INSTANCE.getDoTheThing() ? 0 : updateCounter; + return (chatting$updateCounter = Chatting.INSTANCE.getDoTheThing() ? 0 : updateCounter); } @ModifyVariable(method = "drawChat", at = @At("STORE"), index = 2) @@ -179,8 +182,8 @@ private boolean isInBounds(int left, int top, int right, int bottom, float chatS } @ModifyVariable(method = "drawChat", at = @At("STORE"), ordinal = 0) - private double modifyYeah(double value, int updateCounter) { - chatting$textOpacity = chatting$getOpacity(updateCounter); + private double modifyYeah(double value) { + chatting$textOpacity = chatting$getOpacity(chatting$updateCounter); if (chatting$textOpacity == Integer.MIN_VALUE) { chatting$textOpacity = 0; }