Skip to content

Commit 56d1b59

Browse files
committed
Fix client-sided field initialisers being used in common classes
Fixes #231. Fabric Loader 0.15 fixes the treatment of client-only fields, so this code crashed before.
1 parent 4d69c0b commit 56d1b59

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public class WItemSlot extends WWidget {
7070
private final List<ValidatedSlot> peers = new ArrayList<>();
7171
@Nullable
7272
@Environment(EnvType.CLIENT)
73-
private BackgroundPainter backgroundPainter = null;
73+
private BackgroundPainter backgroundPainter;
7474
@Nullable
7575
private Icon icon = null;
7676
private Inventory inventory;

src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public abstract class WPanel extends WWidget {
2626
*/
2727
protected final List<WWidget> children = new WidgetList(this, new ArrayList<>());
2828
@Environment(EnvType.CLIENT)
29-
private BackgroundPainter backgroundPainter = null;
29+
private BackgroundPainter backgroundPainter;
3030

3131
/**
3232
* Removes the widget from this panel.

src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class WSlider extends WAbstractSlider {
2525

2626
@Environment(EnvType.CLIENT)
2727
@Nullable
28-
private BackgroundPainter backgroundPainter = null;
28+
private BackgroundPainter backgroundPainter;
2929

3030
public WSlider(int min, int max, Axis axis) {
3131
super(min, max, axis);

0 commit comments

Comments
 (0)