diff --git a/gradle.properties b/gradle.properties index 92a815b..2d8a093 100644 --- a/gradle.properties +++ b/gradle.properties @@ -53,7 +53,7 @@ mod_name=Zontreck Library Mod # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=GPLv3 # The mod version. See https://semver.org/ -mod_version=1.10.011024.0005 +mod_version=1.10.011024.0121 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/dev/zontreck/libzontreck/chestgui/ChestGUI.java b/src/main/java/dev/zontreck/libzontreck/chestgui/ChestGUI.java index 74d9ce8..7b77529 100644 --- a/src/main/java/dev/zontreck/libzontreck/chestgui/ChestGUI.java +++ b/src/main/java/dev/zontreck/libzontreck/chestgui/ChestGUI.java @@ -30,7 +30,7 @@ public class ChestGUI private String MenuTitle = ""; private UUID player; public List buttons = new ArrayList<>(); - private ResourceLocation id; + private ChestGUIIdentifier id; private int page =0; private boolean hasAdd = false; private boolean hasReset = false; @@ -95,7 +95,7 @@ public class ChestGUI ChestGUIButton rem = new ChestGUIButton(remStack, ()-> { onRemove.run(); - }, new Vector2i(3, 3)); + }, new Vector2i(2, 3)); container.setStackInSlot(rem.getSlotNum(), rem.buildIcon()); } @@ -106,7 +106,7 @@ public class ChestGUI ChestGUIButton rem = new ChestGUIButton(resStack, ()-> { onReset.run(); - }, new Vector2i(3, 4)); + }, new Vector2i(2, 4)); container.setStackInSlot(rem.getSlotNum(), rem.buildIcon()); @@ -119,7 +119,7 @@ public class ChestGUI ChestGUIButton rem = new ChestGUIButton(remStack, ()-> { onAdd.run(); - }, new Vector2i(3, 5)); + }, new Vector2i(2, 5)); container.setStackInSlot(rem.getSlotNum(), rem.buildIcon()); } @@ -197,13 +197,13 @@ public class ChestGUI return player.equals(ID); } - public ChestGUI withGUIId(ResourceLocation id) + public ChestGUI withGUIId(ChestGUIIdentifier id) { this.id = id; return this; } - public boolean matches(ResourceLocation id) + public boolean matches(ChestGUIIdentifier id) { return this.id.equals(id); } diff --git a/src/main/java/dev/zontreck/libzontreck/events/OpenGUIEvent.java b/src/main/java/dev/zontreck/libzontreck/events/OpenGUIEvent.java index c37630f..85beb4b 100644 --- a/src/main/java/dev/zontreck/libzontreck/events/OpenGUIEvent.java +++ b/src/main/java/dev/zontreck/libzontreck/events/OpenGUIEvent.java @@ -1,6 +1,7 @@ package dev.zontreck.libzontreck.events; import dev.zontreck.libzontreck.chestgui.ChestGUI; +import dev.zontreck.libzontreck.chestgui.ChestGUIIdentifier; import dev.zontreck.libzontreck.util.ServerUtilities; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; @@ -11,18 +12,18 @@ import java.util.UUID; public class OpenGUIEvent extends Event { - private ResourceLocation GUIId; + private ChestGUIIdentifier GUIId; private UUID playerID; private final ChestGUI gui; - public OpenGUIEvent(ResourceLocation ID, UUID player, ChestGUI gui) + public OpenGUIEvent(ChestGUIIdentifier ID, UUID player, ChestGUI gui) { GUIId = ID; playerID = player; this.gui = gui; } - public boolean matches(ResourceLocation id) + public boolean matches(ChestGUIIdentifier id) { return GUIId.equals(id); }