diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2023-12-09 13:47:42 +0200 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2023-12-09 13:47:42 +0200 |
commit | cdf7f58331a1c1123043361414e872be93e01ea0 (patch) | |
tree | 7a008ae96bd057dbd7a85173f006653911e4e60c | |
parent | 9be5195f17199f816d2c2383623b3652be02ed97 (diff) | |
download | LibGui-cdf7f58331a1c1123043361414e872be93e01ea0.tar.gz LibGui-cdf7f58331a1c1123043361414e872be93e01ea0.tar.bz2 LibGui-cdf7f58331a1c1123043361414e872be93e01ea0.zip |
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.
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java | 2 | ||||
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java index bfe64a2..a18d706 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java @@ -85,7 +85,7 @@ public class WItemSlot extends WWidget { private final List<ValidatedSlot> peers = new ArrayList<>(); @Nullable @Environment(EnvType.CLIENT) - private BackgroundPainter backgroundPainter = null; + private BackgroundPainter backgroundPainter; @Nullable private Icon icon = null; private boolean iconOnlyPaintedForEmptySlots = false; diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java index 63ccdea..c1aef2a 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java @@ -25,7 +25,7 @@ public abstract class WPanel extends WWidget { */ protected final List<WWidget> children = new WidgetList(this, new ArrayList<>()); @Environment(EnvType.CLIENT) - private BackgroundPainter backgroundPainter = null; + private BackgroundPainter backgroundPainter; /** * Removes the widget from this panel. |