Skip to content

Commit

Permalink
fix issues with mixin 0.7.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Dec 24, 2023
1 parent c028987 commit 22d6e86
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 22d6e86

Please sign in to comment.