aboutsummaryrefslogtreecommitdiff
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
parentf2c643bc7bd81c134f870c87fcee4c566a19ef76 (diff)
downloadLibGui-8e0570f3e6c87b835b3dd22a0f57744af7ae008d.tar.gz
LibGui-8e0570f3e6c87b835b3dd22a0f57744af7ae008d.tar.bz2
LibGui-8e0570f3e6c87b835b3dd22a0f57744af7ae008d.zip
Fix broken AW by yeeting it, bump version to 4.1.44.1.4
-rw-r--r--build.gradle4
-rw-r--r--gradle.properties2
-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
5 files changed, 7 insertions, 27 deletions
diff --git a/build.gradle b/build.gradle
index 5e82eb2..8da126e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -33,10 +33,6 @@ repositories {
}
}
-loom {
- accessWidener = file('src/main/resources/libgui.accesswidener')
-}
-
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
diff --git a/gradle.properties b/gradle.properties
index c649bd8..9897e28 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.11.6
# Mod Properties
- mod_version = 4.1.3
+ mod_version = 4.1.4
maven_group = io.github.cottonmc
archives_base_name = LibGui
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