diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6c36be3e..4385b64f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,6 +18,7 @@ on: - v11-23w13ab - v11 - v12 + - v13 jobs: build: diff --git a/common/src/main/java/me/shedaniel/clothconfig2/gui/ClothConfigScreen.java b/common/src/main/java/me/shedaniel/clothconfig2/gui/ClothConfigScreen.java index 98a56cec..59a30189 100644 --- a/common/src/main/java/me/shedaniel/clothconfig2/gui/ClothConfigScreen.java +++ b/common/src/main/java/me/shedaniel/clothconfig2/gui/ClothConfigScreen.java @@ -132,7 +132,7 @@ protected void init() { addRenderableWidget(Button.builder(isEdited() ? Component.translatable("text.cloth-config.cancel_discard") : Component.translatable("gui.cancel"), widget -> quit()).bounds(width / 2 - buttonWidths - 3, height - 26, buttonWidths, 20).build()); addRenderableWidget(new Button(width / 2 + 3, height - 26, buttonWidths, 20, Component.empty(), button -> saveAll(true), Supplier::get) { @Override - public void render(GuiGraphics graphics, int mouseX, int mouseY, float delta) { + public void renderWidget(GuiGraphics graphics, int mouseX, int mouseY, float delta) { boolean hasErrors = false; for (List> entries : Lists.newArrayList(categorizedEntries.values())) { for (AbstractConfigEntry entry : entries) @@ -145,7 +145,7 @@ public void render(GuiGraphics graphics, int mouseX, int mouseY, float delta) { } active = isEdited() && !hasErrors; setMessage(hasErrors ? Component.translatable("text.cloth-config.error_cannot_save") : Component.translatable("text.cloth-config.save_and_done")); - super.render(graphics, mouseX, mouseY, delta); + super.renderWidget(graphics, mouseX, mouseY, delta); } }); if (isShowingTabs()) { diff --git a/common/src/main/java/me/shedaniel/clothconfig2/gui/ClothConfigTabButton.java b/common/src/main/java/me/shedaniel/clothconfig2/gui/ClothConfigTabButton.java index 60491606..a62a7aa2 100644 --- a/common/src/main/java/me/shedaniel/clothconfig2/gui/ClothConfigTabButton.java +++ b/common/src/main/java/me/shedaniel/clothconfig2/gui/ClothConfigTabButton.java @@ -61,9 +61,9 @@ public void onPress() { } @Override - public void render(GuiGraphics graphics, int mouseX, int mouseY, float delta) { + public void renderWidget(GuiGraphics graphics, int mouseX, int mouseY, float delta) { active = index != screen.selectedCategoryIndex; - super.render(graphics, mouseX, mouseY, delta); + super.renderWidget(graphics, mouseX, mouseY, delta); if (isMouseOver(mouseX, mouseY)) { Optional tooltip = getDescription(); diff --git a/common/src/main/java/me/shedaniel/clothconfig2/gui/GlobalizedClothConfigScreen.java b/common/src/main/java/me/shedaniel/clothconfig2/gui/GlobalizedClothConfigScreen.java index 8099e8bb..450e32e0 100644 --- a/common/src/main/java/me/shedaniel/clothconfig2/gui/GlobalizedClothConfigScreen.java +++ b/common/src/main/java/me/shedaniel/clothconfig2/gui/GlobalizedClothConfigScreen.java @@ -162,7 +162,7 @@ protected void init() { addRenderableWidget(cancelButton = Button.builder(isEdited() ? Component.translatable("text.cloth-config.cancel_discard") : Component.translatable("gui.cancel"), widget -> quit()).bounds(0, height - 26, buttonWidths, 20).build()); addRenderableWidget(exitButton = new Button(0, height - 26, buttonWidths, 20, Component.empty(), button -> saveAll(true), Supplier::get) { @Override - public void render(GuiGraphics graphics, int mouseX, int mouseY, float delta) { + public void renderWidget(GuiGraphics graphics, int mouseX, int mouseY, float delta) { boolean hasErrors = false; label: for (List> entries : categorizedEntries.values()) { @@ -175,7 +175,7 @@ public void render(GuiGraphics graphics, int mouseX, int mouseY, float delta) { } active = isEdited() && !hasErrors; setMessage(hasErrors ? Component.translatable("text.cloth-config.error_cannot_save") : Component.translatable("text.cloth-config.save_and_done")); - super.render(graphics, mouseX, mouseY, delta); + super.renderWidget(graphics, mouseX, mouseY, delta); } }); Optional.ofNullable(this.afterInitConsumer).ifPresent(consumer -> consumer.accept(this)); diff --git a/common/src/main/java/me/shedaniel/clothconfig2/gui/entries/AbstractTextFieldListListEntry.java b/common/src/main/java/me/shedaniel/clothconfig2/gui/entries/AbstractTextFieldListListEntry.java index 8c71f297..700c1c27 100644 --- a/common/src/main/java/me/shedaniel/clothconfig2/gui/entries/AbstractTextFieldListListEntry.java +++ b/common/src/main/java/me/shedaniel/clothconfig2/gui/entries/AbstractTextFieldListListEntry.java @@ -75,9 +75,9 @@ public AbstractTextFieldListCell(@Nullable T value, OUTER_SELF listListEntry) { widget = new EditBox(Minecraft.getInstance().font, 0, 0, 100, 18, Component.empty()) { @Override - public void render(GuiGraphics graphics, int mouseX, int mouseY, float delta) { + public void renderWidget(GuiGraphics graphics, int mouseX, int mouseY, float delta) { setFocused(isSelected); - super.render(graphics, mouseX, mouseY, delta); + super.renderWidget(graphics, mouseX, mouseY, delta); } }; widget.setFilter(this::isValidText); diff --git a/common/src/main/java/me/shedaniel/clothconfig2/gui/entries/DropdownBoxEntry.java b/common/src/main/java/me/shedaniel/clothconfig2/gui/entries/DropdownBoxEntry.java index 3fbfce4d..85c6f341 100644 --- a/common/src/main/java/me/shedaniel/clothconfig2/gui/entries/DropdownBoxEntry.java +++ b/common/src/main/java/me/shedaniel/clothconfig2/gui/entries/DropdownBoxEntry.java @@ -730,9 +730,9 @@ public DefaultSelectionTopCellElement(R value, Function toObjectFunct this.toTextFunction = Objects.requireNonNull(toTextFunction); textFieldWidget = new EditBox(Minecraft.getInstance().font, 0, 0, 148, 18, Component.empty()) { @Override - public void render(GuiGraphics graphics, int mouseX, int mouseY, float delta) { + public void renderWidget(GuiGraphics graphics, int mouseX, int mouseY, float delta) { setFocused(isSuggestionMode() && isSelected && DefaultSelectionTopCellElement.this.getParent().getFocused() == DefaultSelectionTopCellElement.this.getParent().selectionElement && DefaultSelectionTopCellElement.this.getParent().selectionElement.getFocused() == DefaultSelectionTopCellElement.this && DefaultSelectionTopCellElement.this.getFocused() == this); - super.render(graphics, mouseX, mouseY, delta); + super.renderWidget(graphics, mouseX, mouseY, delta); } @Override diff --git a/common/src/main/java/me/shedaniel/clothconfig2/gui/entries/TextFieldListEntry.java b/common/src/main/java/me/shedaniel/clothconfig2/gui/entries/TextFieldListEntry.java index 822a48f1..95dfb07b 100644 --- a/common/src/main/java/me/shedaniel/clothconfig2/gui/entries/TextFieldListEntry.java +++ b/common/src/main/java/me/shedaniel/clothconfig2/gui/entries/TextFieldListEntry.java @@ -67,10 +67,10 @@ protected TextFieldListEntry(Component fieldName, T original, Component resetBut this.original = original; this.textFieldWidget = new EditBox(Minecraft.getInstance().font, 0, 0, 148, 18, Component.empty()) { @Override - public void render(GuiGraphics graphics, int int_1, int int_2, float float_1) { + public void renderWidget(GuiGraphics graphics, int int_1, int int_2, float float_1) { setFocused(isSelected && TextFieldListEntry.this.getFocused() == this); textFieldPreRender(this); - super.render(graphics, int_1, int_2, float_1); + super.renderWidget(graphics, int_1, int_2, float_1); } @Override diff --git a/fabric/build.gradle b/fabric/build.gradle index e49e2196..81a4c74c 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -118,7 +118,7 @@ unifiedPublishing { curseforge { token = project.hasProperty("curse_api_key") ? project.property("curse_api_key") : System.getenv("curse_api_key") id = project.curseforge_id - gameVersions.addAll "1.20.2", "1.20.2-Snapshot", "Java 17" + gameVersions.addAll "1.20.4", "1.20.3", "1.20.3-Snapshot", "Java 17" } } @@ -127,7 +127,7 @@ unifiedPublishing { token = project.hasProperty("modrinth_key") ? project.property("modrinth_key") : System.getenv("modrinth_key") id = project.modrinth_id version = "$project.version+$project.name" - gameVersions.addAll project.minecraft_version + gameVersions.addAll project.minecraft_version, "1.20.3" } } } diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 4d3927d1..bf718ff9 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "cloth-config", - "name": "Cloth Config v12", + "name": "Cloth Config v13", "description": "An API for config screens.", "version": "${version}", "authors": [ diff --git a/forge/build.gradle b/forge/build.gradle index 61506e37..859cc69a 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -100,7 +100,7 @@ unifiedPublishing { project { displayName = "[MinecraftForge $rootProject.supported_version] v$project.version" releaseType = "release" - gameVersions = ["1.20.2"] + gameVersions = ["1.20.3", "1.20.4"] gameLoaders = ["forge"] mainPublication remapJar diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index dd6be0a8..73812cce 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -9,7 +9,7 @@ license = "GNU LGPLv3" [[mods]] modId = "cloth_config" version = "${version}" -displayName = "Cloth Config v12 API" +displayName = "Cloth Config v13 API" description = ''' An API for config screens. ''' diff --git a/gradle.properties b/gradle.properties index 05f926c6..509de6a0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,24 +1,24 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false -minecraft_version=1.20.2 -supported_version=1.20.2 +minecraft_version=1.20.4 +supported_version=1.20.4 archives_base_name=cloth-config archives_base_name_snapshot=cloth-config-snapshot -base_version=12.0 +base_version=13.0 maven_group=me.shedaniel.cloth jankson_version=1.2.0 toml4j_version=0.7.2 snakeyaml_version=1.27 -fabric_loader_version=0.14.22 -fabric_api_version=0.89.0+1.20.2 -mod_menu_version=8.0.0-beta.2 +fabric_loader_version=0.15.1 +fabric_api_version=0.91.2+1.20.4 +mod_menu_version=9.0.0-pre.1 -forge_version=48.0.1 -neoforge_version=20.2.52-beta +forge_version=49.0.3 +neoforge_version=20.4.3-beta curseforge_id=348521 modrinth_id=9s6osm5g diff --git a/neoforge/build.gradle b/neoforge/build.gradle index 18a46f8f..2498e20a 100644 --- a/neoforge/build.gradle +++ b/neoforge/build.gradle @@ -99,7 +99,7 @@ unifiedPublishing { project { displayName = "[NeoForge $rootProject.supported_version] v$project.version" releaseType = "release" - gameVersions = ["1.20.2"] + gameVersions = ["1.20.3", "1.20.4"] gameLoaders = ["neoforge"] mainPublication remapJar diff --git a/neoforge/src/main/resources/META-INF/mods.toml b/neoforge/src/main/resources/META-INF/mods.toml index 2873f4ec..61137821 100644 --- a/neoforge/src/main/resources/META-INF/mods.toml +++ b/neoforge/src/main/resources/META-INF/mods.toml @@ -9,7 +9,7 @@ license = "GNU LGPLv3" [[mods]] modId = "cloth_config" version = "${version}" -displayName = "Cloth Config v12 API" +displayName = "Cloth Config v13 API" description = ''' An API for config screens. '''