aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java5
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/impl/client/CottonInventoryScreenImpl.java7
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/impl/mixin/client/HandledScreenMixin.java4
3 files changed, 4 insertions, 12 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
index 071d0ca..7b86417 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
@@ -13,7 +13,7 @@ import net.minecraft.text.Text;
import io.github.cottonmc.cotton.gui.GuiDescription;
import io.github.cottonmc.cotton.gui.SyncedGuiDescription;
import io.github.cottonmc.cotton.gui.impl.VisualLogger;
-import io.github.cottonmc.cotton.gui.impl.client.CottonInventoryScreenImpl;
+import io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl;
import io.github.cottonmc.cotton.gui.impl.client.FocusElements;
import io.github.cottonmc.cotton.gui.impl.client.MouseInputHandler;
import io.github.cottonmc.cotton.gui.impl.client.NarrationHelper;
@@ -30,7 +30,7 @@ import org.lwjgl.opengl.GL11;
*
* @param <T> the description type
*/
-public class CottonInventoryScreen<T extends SyncedGuiDescription> extends HandledScreen<T> implements CottonInventoryScreenImpl {
+public class CottonInventoryScreen<T extends SyncedGuiDescription> extends HandledScreen<T> implements CottonScreenImpl {
private static final VisualLogger LOGGER = new VisualLogger(CottonInventoryScreen.class);
protected SyncedGuiDescription description;
@Nullable protected WWidget lastResponder = null;
@@ -284,7 +284,6 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl
* @param delta the tick delta
* @since 9.2.0
*/
- @Override
public void paintDescription(DrawContext context, int mouseX, int mouseY, float delta) {
if (description!=null) {
WPanel root = description.getRootPanel();
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/impl/client/CottonInventoryScreenImpl.java b/src/main/java/io/github/cottonmc/cotton/gui/impl/client/CottonInventoryScreenImpl.java
deleted file mode 100644
index 877c92a..0000000
--- a/src/main/java/io/github/cottonmc/cotton/gui/impl/client/CottonInventoryScreenImpl.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package io.github.cottonmc.cotton.gui.impl.client;
-
-import net.minecraft.client.gui.DrawContext;
-
-public interface CottonInventoryScreenImpl extends CottonScreenImpl {
- void paintDescription(DrawContext context, int mouseX, int mouseY, float delta);
-}
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/impl/mixin/client/HandledScreenMixin.java b/src/main/java/io/github/cottonmc/cotton/gui/impl/mixin/client/HandledScreenMixin.java
index 1697ab6..45b30f8 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/impl/mixin/client/HandledScreenMixin.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/impl/mixin/client/HandledScreenMixin.java
@@ -3,7 +3,7 @@ package io.github.cottonmc.cotton.gui.impl.mixin.client;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.ingame.HandledScreen;
-import io.github.cottonmc.cotton.gui.impl.client.CottonInventoryScreenImpl;
+import io.github.cottonmc.cotton.gui.client.CottonInventoryScreen;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
@@ -21,7 +21,7 @@ abstract class HandledScreenMixin {
allow = 1
)
private void onSuperRender(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo info) {
- if (this instanceof CottonInventoryScreenImpl cottonInventoryScreen) {
+ if ((Object) this instanceof CottonInventoryScreen<?> cottonInventoryScreen) {
cottonInventoryScreen.paintDescription(context, mouseX, mouseY, delta);
}
}