From 60124674f223e589a98da415acc1fee377748e26 Mon Sep 17 00:00:00 2001 From: Estecka Date: Fri, 14 Jun 2024 01:31:00 +0200 Subject: [PATCH] Marked as incompatible with MC 1.21 --- changelog.md | 5 ++++- gradle.properties | 2 +- port.md | 4 ++++ src/main/java/tk/estecka/shiftingwares/ShiftingWares.java | 2 +- .../shiftingwares/TradeLayouts/VanillaTradeLayout.java | 2 +- src/main/resources/fabric.mod.json | 2 +- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/changelog.md b/changelog.md index 62480ed..58f9bbe 100644 --- a/changelog.md +++ b/changelog.md @@ -29,7 +29,10 @@ Initial release ### 2.1.1 - Fixed a crash that would occur upon restock if Depleted Reroll is disabled. ## 2.2 -- Updated for 1.20.5: +### 2.2.0 +- Updated for MC 1.20.5 - For caching, a map's `item_name` takes priority over the `custom_name` if both are present. - Placeholder trades are no longer empty. (Cosmetic change only.) - Added custom logic for upgrading caches from before 1.20.5 +### 2.2.1 +- Updated for MC 1.21 diff --git a/gradle.properties b/gradle.properties index dca49e5..9372d17 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,6 +12,6 @@ loader_version=0.15.10 fabric_version=0.97.6+1.20.5 # Mod Properties -mod_version=2.2.0 +mod_version=2.2.1 maven_group=tk.estecka.shiftingwares archives_base_name=shifting-wares diff --git a/port.md b/port.md index 980e073..6e45099 100644 --- a/port.md +++ b/port.md @@ -14,3 +14,7 @@ Current master #### Possible Workaround: - `ItemStack::writeToNbt` and `readFromNbt` were removed or changed: Use `ItemStack::CODEC` instead. - Trade offers no longer support selling or buying air: Use some placeholder items instead. + +### 1.21.0 +#### No Workaround +- `getRandom()` was moved from `LivingEntity` to its parent class `Entity`. No code change required, but needs recompilation. diff --git a/src/main/java/tk/estecka/shiftingwares/ShiftingWares.java b/src/main/java/tk/estecka/shiftingwares/ShiftingWares.java index 03ade7a..66272cc 100644 --- a/src/main/java/tk/estecka/shiftingwares/ShiftingWares.java +++ b/src/main/java/tk/estecka/shiftingwares/ShiftingWares.java @@ -23,7 +23,7 @@ public class ShiftingWares { static public final Logger LOGGER = LoggerFactory.getLogger("Shifting-Wares"); - static public final CustomGameRuleCategory RULE_CATTEGORY = new CustomGameRuleCategory(new Identifier("shifting-wares","gamerules"), Text.translatable("gamerule.category.shiftingwares").formatted(Formatting.BOLD, Formatting.YELLOW)); + static public final CustomGameRuleCategory RULE_CATTEGORY = new CustomGameRuleCategory(Identifier.of("shifting-wares","gamerules"), Text.translatable("gamerule.category.shiftingwares").formatted(Formatting.BOLD, Formatting.YELLOW)); static public final GameRules.Key DAILY_RULE = GameRuleRegistry.register("shiftingWares.dailyReroll", RULE_CATTEGORY, GameRuleFactory.createBooleanRule(true)); static public final GameRules.Key DEPLETED_RULE = GameRuleRegistry.register("shiftingWares.depleteReroll", RULE_CATTEGORY, GameRuleFactory.createBooleanRule(true)); diff --git a/src/main/java/tk/estecka/shiftingwares/TradeLayouts/VanillaTradeLayout.java b/src/main/java/tk/estecka/shiftingwares/TradeLayouts/VanillaTradeLayout.java index 22f68ef..de2ab88 100644 --- a/src/main/java/tk/estecka/shiftingwares/TradeLayouts/VanillaTradeLayout.java +++ b/src/main/java/tk/estecka/shiftingwares/TradeLayouts/VanillaTradeLayout.java @@ -16,7 +16,7 @@ public class VanillaTradeLayout implements ITradeLayoutProvider { - static public final Identifier TRADE_REBALANCE_FLAGID = new Identifier("minecraft", "trade_rebalance"); + static public final Identifier TRADE_REBALANCE_FLAGID = Identifier.of("minecraft", "trade_rebalance"); static public final boolean IS_EXP_TRADE_AVAILABLE; static { diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 56f0309..a1a3a78 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -24,7 +24,7 @@ ], "accessWidener" : "shifting-wares.accesswidener", "depends": { - "minecraft": "^1.20.5", + "minecraft": ">=1.20.5 <1.21", "fabricloader": ">=0.15.10", "fabric-api": "*", "java": ">=21"