diff --git a/CHANGELOG.md b/CHANGELOG.md index c8bdbaf..b126f25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.1.0+1.20 - 2024-04-20 + +### Added + +- Support for Minecraft 1.20 + ## 1.1.0+1.19.4 - 2024-04-20 ### Added diff --git a/gradle.properties b/gradle.properties index ef24e02..8b5fb27 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.19.4 -yarn_mappings=1.19.4+build.2 +minecraft_version=1.20 +yarn_mappings=1.20+build.1 loader_version=0.15.10 # Mod Properties project_name=Mod Settings -mod_version=1.1.0+1.19.4 +mod_version=1.1.0+1.20 maven_group=se.icus.mag archives_base_name=modsettings # Fabric api -fabric_version=0.87.2+1.19.4 +fabric_version=0.83.0+1.20 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 2449b00..7863304 100644 --- a/src/main/java/se/icus/mag/modsettings/gui/ModListWidget.java +++ b/src/main/java/se/icus/mag/modsettings/gui/ModListWidget.java @@ -2,6 +2,7 @@ import com.google.common.collect.ImmutableList; import net.minecraft.client.MinecraftClient; +import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.Element; import net.minecraft.client.gui.Selectable; import net.minecraft.client.gui.widget.ButtonWidget; @@ -61,10 +62,10 @@ public List children() { } @Override - public void render(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) { + public void render(DrawContext context, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) { buttons.forEach(button -> { button.setY(y); - button.render(matrices, mouseX, mouseY, tickDelta); + button.render(context, mouseX, mouseY, tickDelta); }); } } 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 4d70174..0d813e5 100644 --- a/src/main/java/se/icus/mag/modsettings/gui/ModSettingsScreen.java +++ b/src/main/java/se/icus/mag/modsettings/gui/ModSettingsScreen.java @@ -1,5 +1,6 @@ package se.icus.mag.modsettings.gui; +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; @@ -59,11 +60,11 @@ private ModSettingsOption[] getAllModConfigOptions() { } @Override - public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { - this.renderBackground(matrices); - this.list.render(matrices, mouseX, mouseY, delta); - drawCenteredTextWithShadow(matrices, this.textRenderer, this.title, this.width / 2, 5, TITLE_COLOR); - super.render(matrices, mouseX, mouseY, delta); + public void render(DrawContext context, int mouseX, int mouseY, float delta) { + this.renderBackground(context); + this.list.render(context, mouseX, mouseY, delta); + context.drawCenteredTextWithShadow(this.textRenderer, this.title, this.width / 2, 5, TITLE_COLOR); + super.render(context, mouseX, mouseY, delta); } @Override diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 93fa89c..4eac99c 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.19.4" + "minecraft": "~1.20" } }