Fix crash. Closes #3091
This commit is contained in:
parent
ad81e8cc8c
commit
9faa008939
2 changed files with 4 additions and 18 deletions
|
@ -34,11 +34,11 @@ public class GuiButtonExtended extends ButtonWidget {
|
|||
private TriConsumer<GuiButtonExtended, Double, Double> clickHandler;
|
||||
|
||||
public GuiButtonExtended(int x, int y, Text buttonText, ButtonWidget.PressAction pressAction) {
|
||||
super(x, y, 20, 200, buttonText, pressAction, narrationSupplier());
|
||||
super(x, y, 20, 200, buttonText, pressAction, ButtonWidget.DEFAULT_NARRATION_SUPPLIER);
|
||||
}
|
||||
|
||||
public GuiButtonExtended(int x, int y, int widthIn, int heightIn, Text buttonText, ButtonWidget.PressAction pressAction) {
|
||||
super(x, y, widthIn, heightIn, buttonText, pressAction, narrationSupplier());
|
||||
super(x, y, widthIn, heightIn, buttonText, pressAction, ButtonWidget.DEFAULT_NARRATION_SUPPLIER);
|
||||
}
|
||||
|
||||
public GuiButtonExtended clickHandler(TriConsumer<GuiButtonExtended, Double, Double> consumer) {
|
||||
|
@ -53,11 +53,4 @@ public class GuiButtonExtended extends ButtonWidget {
|
|||
}
|
||||
super.onClick(mouseX, mouseY);
|
||||
}
|
||||
|
||||
private static NarrationSupplier narrationSupplier() {
|
||||
return textSupplier -> {
|
||||
// TODO 1.19.3
|
||||
return null;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public class GuiButtonSimple extends ButtonWidget {
|
|||
*/
|
||||
@Deprecated
|
||||
public GuiButtonSimple(int x, int y, Text buttonText, ButtonWidget.PressAction pressAction) {
|
||||
super(x, y, 20, 200, buttonText, pressAction, narrationSupplier());
|
||||
super(x, y, 20, 200, buttonText, pressAction, ButtonWidget.DEFAULT_NARRATION_SUPPLIER);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -42,13 +42,6 @@ public class GuiButtonSimple extends ButtonWidget {
|
|||
*/
|
||||
@Deprecated
|
||||
public GuiButtonSimple(int x, int y, int widthIn, int heightIn, Text buttonText, ButtonWidget.PressAction pressAction) {
|
||||
super(x, y, widthIn, heightIn, buttonText, pressAction, narrationSupplier());
|
||||
}
|
||||
|
||||
private static NarrationSupplier narrationSupplier() {
|
||||
return textSupplier -> {
|
||||
// TODO 1.19.3
|
||||
return null;
|
||||
};
|
||||
super(x, y, widthIn, heightIn, buttonText, pressAction, ButtonWidget.DEFAULT_NARRATION_SUPPLIER);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue