From f5f016ce3aa6127972842351c988d8c5fc783bed Mon Sep 17 00:00:00 2001 From: Des Herriott Date: Wed, 19 Jun 2024 09:53:25 +0100 Subject: [PATCH 1/9] build: cleaned up a bit of build.gradle duplication [ciskip] --- fabric/build.gradle | 22 ---------------------- forge/build.gradle | 43 ------------------------------------------- 2 files changed, 65 deletions(-) diff --git a/fabric/build.gradle b/fabric/build.gradle index 3ac39a7..1a1897f 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -86,26 +86,4 @@ publishing { from components.java } } - - repositories { - if (ftbPublishing.ftbToken) { - maven { - url ftbPublishing.ftbURL - credentials { - username = ftbPublishing.ftbUser - password = ftbPublishing.ftbToken - } - } - } - - if (ftbPublishing.sapsToken) { - maven { - url ftbPublishing.sapsURL - credentials { - username = ftbPublishing.sapsUser - password = ftbPublishing.sapsToken - } - } - } - } } diff --git a/forge/build.gradle b/forge/build.gradle index 5512d2f..e23dcc9 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -102,47 +102,4 @@ publishing { from components.java } } - - repositories { - if (ftbPublishing.ftbToken) { - maven { - url ftbPublishing.ftbURL - credentials { - username = ftbPublishing.ftbUser - password = ftbPublishing.ftbToken - } - } - } - - if (ftbPublishing.sapsToken) { - maven { - url ftbPublishing.sapsURL - credentials { - username = ftbPublishing.sapsUser - password = ftbPublishing.sapsToken - } - } - } - } } - -if (ENV.CURSEFORGE_KEY) { - curseforge { - apiKey = ENV.CURSEFORGE_KEY - project { - id = project.curseforge_id - releaseType = ftbPublishing.relType - addGameVersion project.minecraft_version - addGameVersion "Forge" - mainArtifact(remapJar.archiveFile) - relations { - requiredDependency 'ftb-library-forge' - optionalDependency 'ftb-ranks-forge' - } - changelog = ENV.CHANGELOG // expected to exist if ENV.CURSEFORGE_KEY does - changelogType = 'markdown' - } - } -} - -rootProject.tasks.getByName("curseforgePublish").dependsOn tasks.getByName("curseforge") From d321dc07a2ae92ce22a11e5f8d7f8a0f3cdac2ca Mon Sep 17 00:00:00 2001 From: Des Herriott Date: Fri, 28 Jun 2024 11:24:25 +0100 Subject: [PATCH 2/9] fix: enderchest command opening window on wrong screen https://github.com/FTBTeam/FTB-Mods-Issues/issues/1247 --- .../commands/groups/CheatCommands.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/dev/ftb/mods/ftbessentials/commands/groups/CheatCommands.java b/common/src/main/java/dev/ftb/mods/ftbessentials/commands/groups/CheatCommands.java index 90f0441..b8c7c65 100644 --- a/common/src/main/java/dev/ftb/mods/ftbessentials/commands/groups/CheatCommands.java +++ b/common/src/main/java/dev/ftb/mods/ftbessentials/commands/groups/CheatCommands.java @@ -1,5 +1,7 @@ package dev.ftb.mods.ftbessentials.commands.groups; +import com.mojang.brigadier.context.CommandContext; +import com.mojang.brigadier.exceptions.CommandSyntaxException; import dev.ftb.mods.ftbessentials.FTBEssentialsPlatform; import dev.ftb.mods.ftbessentials.commands.FTBCommand; import dev.ftb.mods.ftbessentials.commands.SimpleCommandPlayer; @@ -7,11 +9,13 @@ import dev.ftb.mods.ftbessentials.commands.impl.cheat.VirtualInventoryCommand; import dev.ftb.mods.ftbessentials.config.FTBEConfig; import dev.ftb.mods.ftbessentials.util.FTBEPlayerData; +import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.SimpleMenuProvider; +import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.ChestMenu; import java.util.List; @@ -40,16 +44,18 @@ public class CheatCommands { new VirtualInventoryCommand(), // Enderchest - new SimpleCommandPlayer("enderchest", Commands.LEVEL_GAMEMASTERS, FTBEConfig.ENDER_CHEST, (ctx, player) -> enderChest(player)) + new SimpleCommandPlayer("enderchest", Commands.LEVEL_GAMEMASTERS, FTBEConfig.ENDER_CHEST, CheatCommands::enderChest) ); - private static void enderChest(ServerPlayer player) { + private static void enderChest(CommandContext ctx, ServerPlayer player) { MutableComponent title = Component.translatable("container.enderchest"); - if (player != null) { + ServerPlayer srcPlayer = ctx.getSource().getPlayer(); + if (player != null && srcPlayer != null) { title.append(" × ").append(player.getDisplayName()); + srcPlayer.openMenu(new SimpleMenuProvider((i, inv, p) -> ChestMenu.threeRows(i, inv, player.getEnderChestInventory()), title)); + } else { + ctx.getSource().sendFailure(Component.literal("Unable to open enderchest inventory!")); } - - player.openMenu(new SimpleMenuProvider((i, inv, p) -> ChestMenu.threeRows(i, inv, player.getEnderChestInventory()), title)); } public static void heal(ServerPlayer player) { From d8b34261e0c3a510627b22f8a47e5ab4b851b13a Mon Sep 17 00:00:00 2001 From: Des Herriott Date: Fri, 28 Jun 2024 11:25:29 +0100 Subject: [PATCH 3/9] build: version -> 2100.1.1, changelog updated --- CHANGELOG.md | 11 +++++++++++ gradle.properties | 10 +++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddbde5a..4a70cf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2100.1.1] + +### Fixed +* Fixed `/enderchest` command opening the Ender Chest GUI on target player's screen instead of executing player + +## [2100.1.0] + +### Changed +* Ported to Minecraft 1.20.6. Support for Fabric and NeoForge. + * Forge support may be re-added if/when Architectury adds support for Forge + ## [2006.1.0] ### Changed diff --git a/gradle.properties b/gradle.properties index 4cd509e..68f99fb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,22 +9,22 @@ archives_base_name=ftb-essentials maven_group=dev.ftb.mods minecraft_version=1.21 -mod_version=2100.1.0 +mod_version=2100.1.1 mod_author=FTB Team # Deps #forge_version=50.0.9 -neoforge_version=21.0.8-beta +neoforge_version=21.0.40-beta # https://maven.neoforged.net/#/releases/net/neoforged/fancymodloader/loader neoforge_loader_version=4 fabric_loader_version=0.15.11 fabric_api_version=0.100.1+1.21 -architectury_api_version=13.0.1 +architectury_api_version=13.0.2 -ftb_library_version=2100.1.0-SNAPSHOT -ftb_ranks_version=2100.1.0-SNAPSHOT +ftb_library_version=2100.1.1 +ftb_ranks_version=2100.1.0 # common curseforge project for forge and fabric curseforge_id=410811 From b8f2248c386f77be2922dcab044ce62ef100298c Mon Sep 17 00:00:00 2001 From: Des Herriott Date: Mon, 1 Jul 2024 16:11:27 +0100 Subject: [PATCH 4/9] fix: release type checking for curseforge --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index c0cf6ec..8e051ab 100644 --- a/build.gradle +++ b/build.gradle @@ -109,7 +109,7 @@ publishMods { // TODO: Migrate to something else def tag = providers.environmentVariable("TAG").getOrElse("release") - type = tag == "beta" ? BETA : (tag == "alpha" ? ALPHA : STABLE) + type = tag.endsWith("-beta") ? BETA : (tag.endsWith("-alpha") ? ALPHA : STABLE) def createOptions = (String projectName) -> { publishOptions { From a2bb5b884b48b6e6c56fd86fb21fd7a55a9cbe55 Mon Sep 17 00:00:00 2001 From: Des Herriott Date: Tue, 6 Aug 2024 09:57:24 +0100 Subject: [PATCH 5/9] build: update for neoforge/fabric version ranges --- fabric/build.gradle | 2 +- fabric/src/main/resources/fabric.mod.json | 2 +- gradle.properties | 11 ++++++----- neoforge/build.gradle | 2 +- .../src/main/resources/META-INF/neoforge.mods.toml | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/fabric/build.gradle b/fabric/build.gradle index 1a1897f..8dd2d8b 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -41,7 +41,7 @@ processResources { filesMatching("fabric.mod.json") { expand "version": project.version, "archversion": project.architectury_api_version, - "fabricapiversion": project.fabric_api_version, + "fabricapiversionrange": project.fabric_api_version_range, "mcversion": project.minecraft_version, "ftblibraryversion": project.ftb_library_version } diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index aaf1d13..f016fd1 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -22,7 +22,7 @@ "ftbessentials-common.mixins.json" ], "depends": { - "fabric": "*", + "fabric": "${fabricapiversionrange}", "minecraft": ">=${mcversion}", "architectury": ">=${archversion}", "ftblibrary": ">=${ftblibraryversion}" diff --git a/gradle.properties b/gradle.properties index 68f99fb..30a76c2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,16 +14,17 @@ mod_author=FTB Team # Deps #forge_version=50.0.9 -neoforge_version=21.0.40-beta -# https://maven.neoforged.net/#/releases/net/neoforged/fancymodloader/loader +neoforge_version=21.0.163 +neoforge_version_range=[21.0.143,) neoforge_loader_version=4 fabric_loader_version=0.15.11 -fabric_api_version=0.100.1+1.21 +fabric_api_version=0.100.8+1.21 +fabric_api_version_range=>=0.100.1+1.21 -architectury_api_version=13.0.2 +architectury_api_version=13.0.6 -ftb_library_version=2100.1.1 +ftb_library_version=2100.1.4 ftb_ranks_version=2100.1.0 # common curseforge project for forge and fabric diff --git a/neoforge/build.gradle b/neoforge/build.gradle index 7d18935..0e2aa5e 100644 --- a/neoforge/build.gradle +++ b/neoforge/build.gradle @@ -52,7 +52,7 @@ processResources { filesMatching("META-INF/neoforge.mods.toml") { expand "version": project.version, - "neoforgeversion": project.neoforge_version, + "neoforgeversionrange": project.neoforge_version_range, "neoforgeloaderversion": project.neoforge_loader_version, "mcversion": project.minecraft_version, "libraryversion": project.ftb_library_version, diff --git a/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/neoforge/src/main/resources/META-INF/neoforge.mods.toml index 7101d48..e5f47ba 100644 --- a/neoforge/src/main/resources/META-INF/neoforge.mods.toml +++ b/neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -19,7 +19,7 @@ displayTest="IGNORE_SERVER_VERSION" [[dependencies.ftbessentials]] modId = "neoforge" type = "required" -versionRange = "[${neoforgeversion},)" +versionRange = "${neoforgeversionrange}" ordering = "NONE" side = "BOTH" From 2b520e1573987de8f6e2482ca58473896121a72d Mon Sep 17 00:00:00 2001 From: UnRealDinnerbone Date: Thu, 8 Aug 2024 12:41:31 -0500 Subject: [PATCH 6/9] Update Sidebar json --- .../assets/ftbessentials/sidebar_buttons.json | 11 ----------- .../ftbessentials/sidebar_buttons/trash_can.json | 10 ++++++++++ 2 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 common/src/main/resources/assets/ftbessentials/sidebar_buttons.json create mode 100644 common/src/main/resources/assets/ftbessentials/sidebar_buttons/trash_can.json diff --git a/common/src/main/resources/assets/ftbessentials/sidebar_buttons.json b/common/src/main/resources/assets/ftbessentials/sidebar_buttons.json deleted file mode 100644 index 919d63e..0000000 --- a/common/src/main/resources/assets/ftbessentials/sidebar_buttons.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "trash_can": { - "group": "ftblibrary:util", - "icon": "ftblibrary:icons/bin", - "x": 150, - "click": "command:/trashcan", - "required_server_mods": [ - "ftbessentials" - ] - } -} \ No newline at end of file diff --git a/common/src/main/resources/assets/ftbessentials/sidebar_buttons/trash_can.json b/common/src/main/resources/assets/ftbessentials/sidebar_buttons/trash_can.json new file mode 100644 index 0000000..179101f --- /dev/null +++ b/common/src/main/resources/assets/ftbessentials/sidebar_buttons/trash_can.json @@ -0,0 +1,10 @@ +{ + "icon": "ftblibrary:icons/bin", + "sort_index": 1000, + "click": [ + "command:/trashcan" + ], + "required_server_mods": [ + "ftbessentials" + ] +} \ No newline at end of file From 780de5c4fdf6894ddfae1ab63aff3c520e305792 Mon Sep 17 00:00:00 2001 From: Des Herriott Date: Fri, 9 Aug 2024 15:37:19 +0100 Subject: [PATCH 7/9] build: require ftb lib 2100.1.5-SNAPSHOT --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 30a76c2..cb451bc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,7 +24,7 @@ fabric_api_version_range=>=0.100.1+1.21 architectury_api_version=13.0.6 -ftb_library_version=2100.1.4 +ftb_library_version=2100.1.5-SNAPSHOT ftb_ranks_version=2100.1.0 # common curseforge project for forge and fabric From 8c854366cd6d04c70e2b83a52398fe403f8119c3 Mon Sep 17 00:00:00 2001 From: Des Herriott Date: Thu, 15 Aug 2024 09:23:53 +0100 Subject: [PATCH 8/9] build: update to 1.21.1 --- build.gradle | 2 +- gradle.properties | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 8e051ab..c7c50f1 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id "architectury-plugin" version "3.4-SNAPSHOT" - id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false + id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false id "me.modmuss50.mod-publish-plugin" version "0.5.1" } diff --git a/gradle.properties b/gradle.properties index cb451bc..3f0e8d7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,14 +8,14 @@ readable_name=FTB Essentials archives_base_name=ftb-essentials maven_group=dev.ftb.mods -minecraft_version=1.21 -mod_version=2100.1.1 +minecraft_version=1.21.1 +mod_version=2101.1.0 mod_author=FTB Team # Deps #forge_version=50.0.9 -neoforge_version=21.0.163 -neoforge_version_range=[21.0.143,) +neoforge_version=21.1.9 +neoforge_version_range=[21.1.0,) neoforge_loader_version=4 fabric_loader_version=0.15.11 @@ -24,7 +24,7 @@ fabric_api_version_range=>=0.100.1+1.21 architectury_api_version=13.0.6 -ftb_library_version=2100.1.5-SNAPSHOT +ftb_library_version=2101.1.0-SNAPSHOT ftb_ranks_version=2100.1.0 # common curseforge project for forge and fabric From 486cbd6b4f1b871e89b6edc37204b585ee96ef48 Mon Sep 17 00:00:00 2001 From: Des Herriott Date: Thu, 15 Aug 2024 11:45:56 +0100 Subject: [PATCH 9/9] build: update to 1.21.1 --- CHANGELOG.md | 8 ++++++++ gradle.properties | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a70cf9..9e5fa99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2101.1.0] + +### Changed +* Minecraft 1.21.1 is now required; this no longer supports Minecraft 1.21 + +### Added +* Sidebar buttons for this and other FTB mods can now be enabled/disabled/rearranged (new functionality in FTB Library 2101.1.0) + ## [2100.1.1] ### Fixed diff --git a/gradle.properties b/gradle.properties index 3f0e8d7..648ce31 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,7 +24,7 @@ fabric_api_version_range=>=0.100.1+1.21 architectury_api_version=13.0.6 -ftb_library_version=2101.1.0-SNAPSHOT +ftb_library_version=2101.1.0 ftb_ranks_version=2100.1.0 # common curseforge project for forge and fabric