aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorisXander <xandersmith2008@gmail.com>2023-02-22 21:43:35 +0000
committerisXander <xandersmith2008@gmail.com>2023-02-22 21:43:35 +0000
commit19573b50098696028bdb9c7df941ce9ea2628523 (patch)
treec4e80480bcfa562720c879c5b7ac75ae78cadd7e /src
parent0a186449138656318eae4c0aa3b0e6348c44f0cc (diff)
downloadYetAnotherConfigLib-19573b50098696028bdb9c7df941ce9ea2628523.tar.gz
YetAnotherConfigLib-19573b50098696028bdb9c7df941ce9ea2628523.tar.bz2
YetAnotherConfigLib-19573b50098696028bdb9c7df941ce9ea2628523.zip
1.19.4-pre1
Diffstat (limited to 'src')
-rw-r--r--src/client/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java6
-rw-r--r--src/client/java/dev/isxander/yacl/gui/TextScaledButtonWidget.java3
-rw-r--r--src/main/resources/fabric.mod.json2
-rw-r--r--src/main/resources/yacl.accesswidener1
4 files changed, 6 insertions, 6 deletions
diff --git a/src/client/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java b/src/client/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java
index 15257e3..7e17aac 100644
--- a/src/client/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java
+++ b/src/client/java/dev/isxander/yacl/gui/LowProfileButtonWidget.java
@@ -18,12 +18,12 @@ public class LowProfileButtonWidget extends Button {
}
@Override
- public void renderButton(PoseStack matrices, int mouseX, int mouseY) {
+ public void renderWidget(PoseStack matrices, int mouseX, int mouseY, float deltaTicks) {
if (!isHoveredOrFocused() || !active) {
int j = this.active ? 0xFFFFFF : 0xA0A0A0;
- this.renderString(matrices, Minecraft.getInstance().font, this.getX() + this.width / 2, this.getY() + (this.height - 8) / 2, j);
+ this.renderString(matrices, Minecraft.getInstance().font, j);
} else {
- super.renderButton(matrices, mouseX, mouseY);
+ super.renderWidget(matrices, mouseX, mouseY, deltaTicks);
}
}
}
diff --git a/src/client/java/dev/isxander/yacl/gui/TextScaledButtonWidget.java b/src/client/java/dev/isxander/yacl/gui/TextScaledButtonWidget.java
index e52174a..b955912 100644
--- a/src/client/java/dev/isxander/yacl/gui/TextScaledButtonWidget.java
+++ b/src/client/java/dev/isxander/yacl/gui/TextScaledButtonWidget.java
@@ -6,7 +6,6 @@ import net.minecraft.client.gui.Font;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.components.Tooltip;
import net.minecraft.network.chat.Component;
-import net.minecraft.util.FormattedCharSequence;
import net.minecraft.util.Mth;
public class TextScaledButtonWidget extends Button {
@@ -23,7 +22,7 @@ public class TextScaledButtonWidget extends Button {
}
@Override
- public void renderString(PoseStack matrices, Font textRenderer, int x, int y, int color) {
+ public void renderString(PoseStack matrices, Font textRenderer, int color) {
Font font = Minecraft.getInstance().font;
matrices.pushPose();
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index f7cd01a..a7148c8 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -20,7 +20,7 @@
},
"depends": {
"fabricloader": ">=0.14.0",
- "minecraft": "~1.19.3",
+ "minecraft": "~1.19.4-beta.1",
"java": ">=17",
"fabric-resource-loader-v0": "*"
},
diff --git a/src/main/resources/yacl.accesswidener b/src/main/resources/yacl.accesswidener
index 35ebaa6..3a65a38 100644
--- a/src/main/resources/yacl.accesswidener
+++ b/src/main/resources/yacl.accesswidener
@@ -3,3 +3,4 @@ accessWidener v1 named
extendable method net/minecraft/client/gui/components/AbstractSelectionList children ()Ljava/util/List;
extendable method net/minecraft/client/gui/components/AbstractSelectionList getEntryAtPosition (DD)Lnet/minecraft/client/gui/components/AbstractSelectionList$Entry;
accessible class net/minecraft/client/gui/components/AbstractSelectionList$Entry
+extendable method net/minecraft/client/gui/components/AbstractButton getTextureY ()I