Skip to content

Commit df554bc

Browse files
committed
Fix compilation
1 parent 5358a85 commit df554bc

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

src/main/java/net/jasper/mod/gui/components/DoubleButtonWidget.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package net.jasper.mod.gui.components;
22

3-
import lombok.Builder;
4-
import lombok.Getter;
5-
import lombok.Setter;
3+
import lombok.*;
64
import net.minecraft.client.MinecraftClient;
75
import net.minecraft.client.gui.widget.ButtonWidget;
86
import net.minecraft.text.Text;
@@ -18,12 +16,18 @@ public class DoubleButtonWidget extends ButtonWidget {
1816
private final PressAction onLeftClick;
1917
private final PressAction onRightClick;
2018

21-
protected DoubleButtonWidget(int x, int y, int width, int height, Text message, PressAction onLeftClick, PressAction onRightClick) {
19+
public DoubleButtonWidget(int x, int y, int width, int height, Text message, PressAction onLeftClick, PressAction onRightClick) {
2220
super(x, y, width, height, message, b -> {}, DEFAULT_NARRATION_SUPPLIER);
2321
this.onLeftClick = onLeftClick;
2422
this.onRightClick = onRightClick;
2523
}
2624

25+
public DoubleButtonWidget(PressAction onLeftClick, PressAction onRightClick) {
26+
super(0, 0, 0, 0, Text.of(""), b -> {}, DEFAULT_NARRATION_SUPPLIER);
27+
this.onLeftClick = onLeftClick;
28+
this.onRightClick = onRightClick;
29+
}
30+
2731
@Override
2832
public boolean mouseClicked(double mouseX, double mouseY, int button) {
2933
if (!this.active || !this.visible) {

src/main/java/net/jasper/mod/gui/components/FilteredTextFieldWidget.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void write(String text) {
6363
if (this.filter.accept(loweredText)) {
6464
super.write(loweredText);
6565
} else {
66-
errorRemaining = 256;
66+
errorRemaining = 256L;
6767
}
6868
}
6969
}

src/main/java/net/jasper/mod/mixins/KeyboardMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class KeyboardMixin {
2222
@Inject(method="onKey", at=@At("HEAD"), cancellable=true)
2323
private void injected(long window, int key, int scancode, int action, int modifiers, CallbackInfo ci) {
2424
int menuPreventionKeyCode = ((KeyBindingAccessor) Constants.PREVENT_MENU).getBoundKey().getCode();
25-
if (MenuPrevention.getPreventToBackground() && key != menuPreventionKeyCode) {
25+
if (MenuPrevention.preventToBackground && key != menuPreventionKeyCode) {
2626
ci.cancel();
2727
}
2828

0 commit comments

Comments
 (0)