aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorThatGravyBoat <thatgravyboat@gmail.com>2021-12-26 09:51:37 -0330
committerGitHub <noreply@github.com>2021-12-26 20:21:37 +0700
commitb4db7af1bf1019a187c1b5f71bd2bc4a37afcf46 (patch)
tree9ef0760b8a375ce40f14d62579bddf94d7a12592 /src/main/java
parent641e50e9c509981df6a7d3fb5a29ff7e3dbe4d47 (diff)
downloadChatting-b4db7af1bf1019a187c1b5f71bd2bc4a37afcf46.tar.gz
Chatting-b4db7af1bf1019a187c1b5f71bd2bc4a37afcf46.tar.bz2
Chatting-b4db7af1bf1019a187c1b5f71bd2bc4a37afcf46.zip
Made custom chat height, fixed screenshots not taking into account scale and made screenshots 3x the size, also added entry point for font renderer. (#3)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/raeids/stratus/mixin/GuiNewChatMixin.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/com/raeids/stratus/mixin/GuiNewChatMixin.java b/src/main/java/com/raeids/stratus/mixin/GuiNewChatMixin.java
index 06e25be..4e79cac 100644
--- a/src/main/java/com/raeids/stratus/mixin/GuiNewChatMixin.java
+++ b/src/main/java/com/raeids/stratus/mixin/GuiNewChatMixin.java
@@ -22,6 +22,7 @@ import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.*;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
import java.awt.datatransfer.StringSelection;
@@ -119,6 +120,11 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
}
}
+ @Inject(method = "getChatHeight", at = @At("HEAD"), cancellable = true)
+ private void customHeight_getChatHeight(CallbackInfoReturnable<Integer> cir) {
+ if (StratusConfig.INSTANCE.getCustomChatHeight()) cir.setReturnValue(Stratus.INSTANCE.getChatHeight(this.getChatOpen()));
+ }
+
@Override
public int getRight() {
return stratus$right;