diff --git a/CHANGELOG.md b/CHANGELOG.md index d7c74ee..8669b25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.1.0+1.20.3 - 2024-04-20 + +### Added + +- Support for Minecraft 1.20.3 + ## 1.1.0+1.20.2 - 2024-04-20 ### Added diff --git a/gradle.properties b/gradle.properties index 1648e30..556468a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.20.2 -yarn_mappings=1.20.2+build.4 +minecraft_version=1.20.3 +yarn_mappings=1.20.3+build.1 loader_version=0.15.10 # Mod Properties project_name=Mod Settings -mod_version=1.1.0+1.20.2 +mod_version=1.1.0+1.20.3 maven_group=se.icus.mag archives_base_name=modsettings # Fabric api -fabric_version=0.91.6+1.20.2 +fabric_version=0.91.1+1.20.3 diff --git a/src/main/java/se/icus/mag/modsettings/gui/ModListWidget.java b/src/main/java/se/icus/mag/modsettings/gui/ModListWidget.java index 7863304..96b1526 100644 --- a/src/main/java/se/icus/mag/modsettings/gui/ModListWidget.java +++ b/src/main/java/se/icus/mag/modsettings/gui/ModListWidget.java @@ -7,7 +7,6 @@ import net.minecraft.client.gui.Selectable; import net.minecraft.client.gui.widget.ButtonWidget; import net.minecraft.client.gui.widget.ElementListWidget; -import net.minecraft.client.util.math.MatrixStack; import net.minecraft.text.Text; import java.util.List; @@ -15,8 +14,8 @@ public class ModListWidget extends ElementListWidget { private static final int BUTTON_HEIGHT = 20; - public ModListWidget(MinecraftClient client, int width, int height, int top, int bottom, int itemHeight) { - super(client, width, height, top, bottom, itemHeight); + public ModListWidget(MinecraftClient client, int width, int height, int y, int itemHeight) { + super(client, width, height, y, itemHeight); this.centerListVertically = false; } diff --git a/src/main/java/se/icus/mag/modsettings/gui/ModSettingsScreen.java b/src/main/java/se/icus/mag/modsettings/gui/ModSettingsScreen.java index f00e377..ddced57 100644 --- a/src/main/java/se/icus/mag/modsettings/gui/ModSettingsScreen.java +++ b/src/main/java/se/icus/mag/modsettings/gui/ModSettingsScreen.java @@ -2,8 +2,6 @@ import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.gui.widget.ButtonWidget; -import net.minecraft.client.util.math.MatrixStack; import net.minecraft.screen.ScreenTexts; import net.minecraft.text.Text; import se.icus.mag.modsettings.Main; @@ -34,10 +32,11 @@ protected void init() { initIsProcessing = true; // Put list between 32 pixels from top and bottom - this.list = new ModListWidget(this.client, this.width, this.height, 32, this.height - 32, 25); + this.list = new ModListWidget(this.client, this.width, this.height - 64, 32, 25); this.list.addAll(getAllModConfigOptions()); this.addSelectableChild(this.list); + this.addDrawableChild(this.list); this.addDrawableChild(new Button(this.width / 2 - FULL_BUTTON_WIDTH / 2, this.height - 27, FULL_BUTTON_WIDTH, BUTTON_HEIGHT, ScreenTexts.DONE, button -> this.client.setScreen(this.previous))); @@ -62,7 +61,6 @@ private ModSettingsOption[] getAllModConfigOptions() { @Override public void render(DrawContext context, int mouseX, int mouseY, float delta) { super.render(context, mouseX, mouseY, delta); - this.list.render(context, mouseX, mouseY, delta); context.drawCenteredTextWithShadow(this.textRenderer, this.title, this.width / 2, 5, TITLE_COLOR); } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index a19ab16..ce3036f 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -33,6 +33,6 @@ "fabricloader": ">=0.7.4", "fabric-screen-api-v1": ">=1.0.4", "fabric-key-binding-api-v1": ">=1.0.1", - "minecraft": ">=1.20.2" + "minecraft": "~1.20.3" } }