aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorJuuz <6596629+Juuxel@users.noreply.github.com>2021-07-11 21:28:28 +0300
committerJuuz <6596629+Juuxel@users.noreply.github.com>2021-07-11 21:28:28 +0300
commit8e0570f3e6c87b835b3dd22a0f57744af7ae008d (patch)
treecc4d3b5bb39413aa6398ad179bd65bebe968a1a6 /src/main
parentf2c643bc7bd81c134f870c87fcee4c566a19ef76 (diff)
downloadLibGui-4.1.4.tar.gz
LibGui-4.1.4.tar.bz2
LibGui-4.1.4.zip
Fix broken AW by yeeting it, bump version to 4.1.44.1.4
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/ValidatedSlot.java21
-rw-r--r--src/main/resources/fabric.mod.json1
-rw-r--r--src/main/resources/libgui.accesswidener6
3 files changed, 6 insertions, 22 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/ValidatedSlot.java b/src/main/java/io/github/cottonmc/cotton/gui/ValidatedSlot.java
index b7bdfcb..16efebd 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/ValidatedSlot.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/ValidatedSlot.java
@@ -16,8 +16,6 @@ import java.util.function.Predicate;
public class ValidatedSlot extends Slot {
private static final VisualLogger LOGGER = new VisualLogger(ValidatedSlot.class);
private final int slotNumber;
- // Original positions that will be restored when this slot is reshown
- private final int originalX, originalY;
private boolean insertingAllowed = true;
private boolean takingAllowed = true;
private Predicate<ItemStack> filter;
@@ -28,8 +26,6 @@ public class ValidatedSlot extends Slot {
super(inventory, index, x, y);
if (inventory==null) throw new IllegalArgumentException("Can't make an itemslot from a null inventory!");
this.slotNumber = index;
- this.originalX = x;
- this.originalY = y;
}
@Override
@@ -148,6 +144,11 @@ public class ValidatedSlot extends Slot {
listeners.put(owner, listener);
}
+ @Override
+ public boolean isEnabled() {
+ return isVisible();
+ }
+
/**
* Tests whether this slot is visible.
*
@@ -165,16 +166,6 @@ public class ValidatedSlot extends Slot {
* @since 3.0.0
*/
public void setVisible(boolean visible) {
- if (this.visible != visible) {
- this.visible = visible;
-
- if (visible) {
- x = originalX;
- y = originalY;
- } else {
- x = -100000;
- y = -100000;
- }
- }
+ this.visible = visible;
}
}
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index 2b70361..87ab98b 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -22,7 +22,6 @@
"client": ["io.github.cottonmc.cotton.gui.impl.client.LibGuiClient"],
"modmenu": ["io.github.cottonmc.cotton.gui.impl.modmenu.ModMenuSupport"]
},
- "accessWidener": "libgui.accesswidener",
"depends": {
"fabricloader": ">=0.11.0",
"fabric": "*",
diff --git a/src/main/resources/libgui.accesswidener b/src/main/resources/libgui.accesswidener
deleted file mode 100644
index c290bc6..0000000
--- a/src/main/resources/libgui.accesswidener
+++ /dev/null
@@ -1,6 +0,0 @@
-accessWidener v1 named
-
-accessible field net/minecraft/screen/slot/Slot x I
-accessible field net/minecraft/screen/slot/Slot y I
-mutable field net/minecraft/screen/slot/Slot x I
-mutable field net/minecraft/screen/slot/Slot y I