Skip to content

Commit 22d6e86

Browse files
committed
fix issues with mixin 0.7.11
1 parent c028987 commit 22d6e86

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mod_name = Chatting
22
mod_id = chatting
3-
mod_version = 1.5.1
3+
mod_version = 1.5.2
44
mod_archives_name = Chatting
55

66
# Gradle Configuration -- DO NOT TOUCH THESE VALUES.

src/main/java/org/polyfrost/chatting/mixin/GuiNewChatMixin.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,12 @@ private void checkScreenshotKeybind(int j2, CallbackInfo ci) {
8989
chatting$chatCheck = false;
9090
}
9191

92+
@Unique
93+
private int chatting$updateCounter;
94+
9295
@ModifyVariable(method = "drawChat", at = @At("HEAD"), argsOnly = true)
9396
private int setUpdateCounterWhenYes(int updateCounter) {
94-
return Chatting.INSTANCE.getDoTheThing() ? 0 : updateCounter;
97+
return (chatting$updateCounter = Chatting.INSTANCE.getDoTheThing() ? 0 : updateCounter);
9598
}
9699

97100
@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
179182
}
180183

181184
@ModifyVariable(method = "drawChat", at = @At("STORE"), ordinal = 0)
182-
private double modifyYeah(double value, int updateCounter) {
183-
chatting$textOpacity = chatting$getOpacity(updateCounter);
185+
private double modifyYeah(double value) {
186+
chatting$textOpacity = chatting$getOpacity(chatting$updateCounter);
184187
if (chatting$textOpacity == Integer.MIN_VALUE) {
185188
chatting$textOpacity = 0;
186189
}

0 commit comments

Comments
 (0)