Skip to content

Commit 20561ed

Browse files
committed
Added null check
1 parent a325a56 commit 20561ed

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/client/java/com/coflnet/gui/cofl/CoflBinGUI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public void onClick(double mouseX, double mouseY) {
123123
screenWidth / 2 - width / 2 + p + 20 + p + 4,
124124
screenHeight / 2 - height / 2 + p + 12 + p + 2,
125125
width - 20 - p*4 - 4, height - 75 - 2 - screenHeight / 15 - 2,
126-
lore, MinecraftClient.getInstance().textRenderer
126+
lore == null ? Text.of("") : lore, MinecraftClient.getInstance().textRenderer
127127
){
128128
@Override
129129
protected void drawBox(DrawContext context) {}

src/client/java/com/coflnet/mixin/ScrollableWidgetMixin.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
@Mixin(ScrollableWidget.class)
99
public class ScrollableWidgetMixin {
10-
// @ModifyArg(method = "drawScrollbar", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Lnet/minecraft/util/Identifier;IIII)V"), index = 3)
11-
// private int drawBox(int x){
12-
// System.out.println("MIXIN REACHED");
13-
// return 2;
14-
// }
10+
@ModifyArg(method = "drawScrollbar", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIII)V"), index = 4)
11+
private int drawBox(int x){
12+
x = 2;
13+
return x;
14+
}
1515
}

0 commit comments

Comments
 (0)