From 0aa2c99082428850f7a8e451d92dfd6a07a1bdfd Mon Sep 17 00:00:00 2001 From: Hendrix-Shen Date: Mon, 21 Aug 2023 10:47:48 +0800 Subject: [PATCH 1/7] Support Minecraft 23w33a - Update Fabric Loom to 1.3 - Update Gradle to 8.3 Signed-off-by: Hendrix-Shen --- build.gradle | 2 +- gradle.properties | 14 +++++++------- gradle/wrapper/gradle-wrapper.properties | 2 +- .../itemscroller/mixin/MixinMerchantScreen.java | 2 +- src/main/resources/fabric.mod.json | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 114ddd5db..e18b905c1 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.2-SNAPSHOT' + id 'fabric-loom' version '1.3-SNAPSHOT' } sourceCompatibility = JavaVersion.VERSION_17 diff --git a/gradle.properties b/gradle.properties index 74577d7c0..4e123df52 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,15 +9,15 @@ author = masa mod_file_name = itemscroller-fabric # Current mod version -mod_version = 0.20.0 +mod_version = 0.20.0-nyan.1 # Required malilib version -malilib_version = 0.16.0 +malilib_version = 0.16.1-nyan.1 # Minecraft, Fabric and mappings versions -minecraft_version_out = 1.20.1 -minecraft_version = 1.20.1 -mappings_version = 1.20.1+build.2 +minecraft_version_out = 23w33a +minecraft_version = 23w33a +mappings_version = 23w33a+build.3 -fabric_loader_version = 0.14.21 -mod_menu_version = 7.0.1 \ No newline at end of file +fabric_loader_version = 0.14.22 +mod_menu_version = 7.2.1 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fae08049a..db9a6b825 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/fi/dy/masa/itemscroller/mixin/MixinMerchantScreen.java b/src/main/java/fi/dy/masa/itemscroller/mixin/MixinMerchantScreen.java index da93092fd..8a9237f97 100644 --- a/src/main/java/fi/dy/masa/itemscroller/mixin/MixinMerchantScreen.java +++ b/src/main/java/fi/dy/masa/itemscroller/mixin/MixinMerchantScreen.java @@ -60,7 +60,7 @@ private void initTradeListWidget(CallbackInfo ci) } @Inject(method = "mouseScrolled", at = @At("RETURN")) - private void onMouseScrollPost(double mouseX, double mouseY, double amount, CallbackInfoReturnable cir) + private void onMouseScrollPost(double mouseX, double mouseY, double horizontalAmount, double verticalAmount, CallbackInfoReturnable cir) { if (Configs.Toggles.VILLAGER_TRADE_FEATURES.getBooleanValue() && Configs.Generic.VILLAGER_TRADE_LIST_REMEMBER_SCROLL.getBooleanValue() && diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 712387413..90dc8b85f 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -33,7 +33,7 @@ ], "depends": { - "minecraft": "1.20.x", - "malilib": "0.16.x" + "minecraft": ">=1.20.2-alpha.23.33.a", + "malilib": ">=0.16.1-nyan.1" } } From 83baeeccc6c2699b0979725e405703cac7c2bc36 Mon Sep 17 00:00:00 2001 From: Hendrix-Shen Date: Thu, 31 Aug 2023 23:06:07 +0800 Subject: [PATCH 2/7] Support Minecraft 23w35a Signed-off-by: Hendrix-Shen --- gradle.properties | 10 +++++----- .../fi/dy/masa/itemscroller/util/InventoryUtils.java | 11 +++++++---- src/main/resources/fabric.mod.json | 4 ++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/gradle.properties b/gradle.properties index 4e123df52..f7d7a9401 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,15 +9,15 @@ author = masa mod_file_name = itemscroller-fabric # Current mod version -mod_version = 0.20.0-nyan.1 +mod_version = 0.20.0-nyan.2 # Required malilib version -malilib_version = 0.16.1-nyan.1 +malilib_version = 0.16.2-nyan.2 # Minecraft, Fabric and mappings versions -minecraft_version_out = 23w33a -minecraft_version = 23w33a -mappings_version = 23w33a+build.3 +minecraft_version_out = 23w35a +minecraft_version = 23w35a +mappings_version = 23w35a+build.4 fabric_loader_version = 0.14.22 mod_menu_version = 7.2.1 \ No newline at end of file diff --git a/src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java b/src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java index 82b9c29d9..f678a41c5 100644 --- a/src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java +++ b/src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java @@ -11,6 +11,7 @@ import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntComparator; +import net.minecraft.class_8786; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen; @@ -110,20 +111,22 @@ public static void updateCraftingOutputSlot(PlayerEntity player, { ItemStack stack = ItemStack.EMPTY; CraftingRecipe recipe = Configs.Generic.USE_RECIPE_CACHING.getBooleanValue() ? lastRecipe : null; + class_8786 recipeHolder = null; if (recipe == null || recipe.matches(craftMatrix, world) == false) { - Optional optional = world.getRecipeManager().getFirstMatch(RecipeType.CRAFTING, craftMatrix, world); - recipe = optional.isPresent() ? optional.get() : null; + Optional> optional = world.getRecipeManager().getFirstMatch(RecipeType.CRAFTING, craftMatrix, world); + recipe = optional.map(class_8786::comp_1933).orElse(null); + recipeHolder = optional.orElse(null); } if (recipe != null) { if ((recipe.isIgnoredInRecipeBook() || world.getGameRules().getBoolean(GameRules.DO_LIMITED_CRAFTING) == false || - ((ClientPlayerEntity) player).getRecipeBook().contains(recipe))) + ((ClientPlayerEntity) player).getRecipeBook().contains(recipeHolder))) { - inventoryCraftResult.setLastRecipe(recipe); + inventoryCraftResult.setLastRecipe(recipeHolder); stack = recipe.craft(craftMatrix, MinecraftClient.getInstance().getNetworkHandler().getRegistryManager()); } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 90dc8b85f..c624a3e1f 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -33,7 +33,7 @@ ], "depends": { - "minecraft": ">=1.20.2-alpha.23.33.a", - "malilib": ">=0.16.1-nyan.1" + "minecraft": ">=1.20.2-alpha.23.35.a", + "malilib": ">=0.16.2-nyan.2" } } From a0c37bba150eb68c279ff380f863fe9ddb4c24cc Mon Sep 17 00:00:00 2001 From: Hendrix-Shen Date: Thu, 7 Sep 2023 20:11:50 +0800 Subject: [PATCH 3/7] Support Minecraft 1.20.2-pre1 Signed-off-by: Hendrix-Shen --- gradle.properties | 10 +++++----- .../dy/masa/itemscroller/util/InventoryUtils.java | 14 +++++++------- src/main/resources/fabric.mod.json | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/gradle.properties b/gradle.properties index f7d7a9401..6dc93e73a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,15 +9,15 @@ author = masa mod_file_name = itemscroller-fabric # Current mod version -mod_version = 0.20.0-nyan.2 +mod_version = 0.20.0-nyan.3 # Required malilib version -malilib_version = 0.16.2-nyan.2 +malilib_version = 0.16.2-nyan.3 # Minecraft, Fabric and mappings versions -minecraft_version_out = 23w35a -minecraft_version = 23w35a -mappings_version = 23w35a+build.4 +minecraft_version_out = 1.20.2-pre1 +minecraft_version = 1.20.2-pre1 +mappings_version = 1.20.2-pre1+build.4 fabric_loader_version = 0.14.22 mod_menu_version = 7.2.1 \ No newline at end of file diff --git a/src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java b/src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java index f678a41c5..7d801ec7e 100644 --- a/src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java +++ b/src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java @@ -11,7 +11,6 @@ import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntComparator; -import net.minecraft.class_8786; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen; @@ -27,6 +26,7 @@ import net.minecraft.inventory.RecipeInputInventory; import net.minecraft.item.ItemStack; import net.minecraft.recipe.CraftingRecipe; +import net.minecraft.recipe.RecipeEntry; import net.minecraft.recipe.RecipeType; import net.minecraft.registry.Registries; import net.minecraft.screen.MerchantScreenHandler; @@ -111,22 +111,22 @@ public static void updateCraftingOutputSlot(PlayerEntity player, { ItemStack stack = ItemStack.EMPTY; CraftingRecipe recipe = Configs.Generic.USE_RECIPE_CACHING.getBooleanValue() ? lastRecipe : null; - class_8786 recipeHolder = null; + RecipeEntry recipeEntry = null; if (recipe == null || recipe.matches(craftMatrix, world) == false) { - Optional> optional = world.getRecipeManager().getFirstMatch(RecipeType.CRAFTING, craftMatrix, world); - recipe = optional.map(class_8786::comp_1933).orElse(null); - recipeHolder = optional.orElse(null); + Optional> optional = world.getRecipeManager().getFirstMatch(RecipeType.CRAFTING, craftMatrix, world); + recipe = optional.map(RecipeEntry::value).orElse(null); + recipeEntry = optional.orElse(null); } if (recipe != null) { if ((recipe.isIgnoredInRecipeBook() || world.getGameRules().getBoolean(GameRules.DO_LIMITED_CRAFTING) == false || - ((ClientPlayerEntity) player).getRecipeBook().contains(recipeHolder))) + ((ClientPlayerEntity) player).getRecipeBook().contains(recipeEntry))) { - inventoryCraftResult.setLastRecipe(recipeHolder); + inventoryCraftResult.setLastRecipe(recipeEntry); stack = recipe.craft(craftMatrix, MinecraftClient.getInstance().getNetworkHandler().getRegistryManager()); } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index c624a3e1f..83e1024d6 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -33,7 +33,7 @@ ], "depends": { - "minecraft": ">=1.20.2-alpha.23.35.a", - "malilib": ">=0.16.2-nyan.2" + "minecraft": ">=1.20.2-beta.1", + "malilib": ">=0.16.2-nyan.3" } } From 91e18ce3573adbba2cf00c7e58446e3b6dbb8190 Mon Sep 17 00:00:00 2001 From: Hendrix-Shen Date: Fri, 8 Sep 2023 13:04:43 +0800 Subject: [PATCH 4/7] Support Minecraft 1.20.2-pre2 Signed-off-by: Hendrix-Shen --- gradle.properties | 10 +++++----- src/main/resources/fabric.mod.json | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index 6dc93e73a..7127c21aa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,15 +9,15 @@ author = masa mod_file_name = itemscroller-fabric # Current mod version -mod_version = 0.20.0-nyan.3 +mod_version = 0.20.0-nyan.4 # Required malilib version -malilib_version = 0.16.2-nyan.3 +malilib_version = 0.16.2-nyan.4 # Minecraft, Fabric and mappings versions -minecraft_version_out = 1.20.2-pre1 -minecraft_version = 1.20.2-pre1 -mappings_version = 1.20.2-pre1+build.4 +minecraft_version_out = 1.20.2-pre2 +minecraft_version = 1.20.2-pre2 +mappings_version = 1.20.2-pre2+build.2 fabric_loader_version = 0.14.22 mod_menu_version = 7.2.1 \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 83e1024d6..d08b0b943 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -33,7 +33,7 @@ ], "depends": { - "minecraft": ">=1.20.2-beta.1", - "malilib": ">=0.16.2-nyan.3" + "minecraft": ">=1.20.2-beta.2", + "malilib": ">=0.16.2-nyan.4" } } From 18860f467847119bb7936a8dfbaddc0260e65209 Mon Sep 17 00:00:00 2001 From: Hendrix-Shen Date: Sat, 16 Sep 2023 21:17:06 +0800 Subject: [PATCH 5/7] Support Minecraft 1.20.2-rc1 Signed-off-by: Hendrix-Shen --- gradle.properties | 12 ++++++------ src/main/resources/fabric.mod.json | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index 7127c21aa..ae2dfd7e4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,15 +9,15 @@ author = masa mod_file_name = itemscroller-fabric # Current mod version -mod_version = 0.20.0-nyan.4 +mod_version = 0.20.0-nyan.5 # Required malilib version -malilib_version = 0.16.2-nyan.4 +malilib_version = 0.16.2-nyan.5 # Minecraft, Fabric and mappings versions -minecraft_version_out = 1.20.2-pre2 -minecraft_version = 1.20.2-pre2 -mappings_version = 1.20.2-pre2+build.2 +minecraft_version_out = 1.20.2-rc1 +minecraft_version = 1.20.2-rc1 +mappings_version = 1.20.2-rc1+build.2 fabric_loader_version = 0.14.22 -mod_menu_version = 7.2.1 \ No newline at end of file +mod_menu_version = 8.0.0-beta.2 \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index d08b0b943..3841cdc3a 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -33,7 +33,7 @@ ], "depends": { - "minecraft": ">=1.20.2-beta.2", - "malilib": ">=0.16.2-nyan.4" + "minecraft": ">=1.20.2-rc.1", + "malilib": ">=0.16.2-nyan.5" } } From de8c3be7768816427a9d487817b6cd286c45d054 Mon Sep 17 00:00:00 2001 From: Hendrix-Shen Date: Thu, 21 Sep 2023 23:59:43 +0800 Subject: [PATCH 6/7] Support Minecraft 1.20.2 Signed-off-by: Hendrix-Shen --- gradle.properties | 10 +++++----- src/main/resources/fabric.mod.json | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index ae2dfd7e4..51fb386fd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,15 +9,15 @@ author = masa mod_file_name = itemscroller-fabric # Current mod version -mod_version = 0.20.0-nyan.5 +mod_version = 0.20.0-nyan.6 # Required malilib version -malilib_version = 0.16.2-nyan.5 +malilib_version = 0.16.2-nyan.6 # Minecraft, Fabric and mappings versions -minecraft_version_out = 1.20.2-rc1 -minecraft_version = 1.20.2-rc1 -mappings_version = 1.20.2-rc1+build.2 +minecraft_version_out = 1.20.2 +minecraft_version = 1.20.2 +mappings_version = 1.20.2+build.1 fabric_loader_version = 0.14.22 mod_menu_version = 8.0.0-beta.2 \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 3841cdc3a..9a677f235 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -33,7 +33,7 @@ ], "depends": { - "minecraft": ">=1.20.2-rc.1", - "malilib": ">=0.16.2-nyan.5" + "minecraft": ">=1.20.2", + "malilib": ">=0.16.2-nyan.6" } } From d7705dd771595b8de5f4277eb01749d48968ca7c Mon Sep 17 00:00:00 2001 From: Matti Ruohonen Date: Sun, 8 Oct 2023 21:56:57 +0300 Subject: [PATCH 7/7] Bump version to 0.21.0 for the 1.20.2 release --- gradle.properties | 8 ++++---- src/main/resources/fabric.mod.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index 51fb386fd..66c69a5df 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,15 +9,15 @@ author = masa mod_file_name = itemscroller-fabric # Current mod version -mod_version = 0.20.0-nyan.6 +mod_version = 0.21.0 # Required malilib version -malilib_version = 0.16.2-nyan.6 +malilib_version = 0.17.0 # Minecraft, Fabric and mappings versions minecraft_version_out = 1.20.2 minecraft_version = 1.20.2 -mappings_version = 1.20.2+build.1 +mappings_version = 1.20.2+build.2 fabric_loader_version = 0.14.22 -mod_menu_version = 8.0.0-beta.2 \ No newline at end of file +mod_menu_version = 8.0.0 \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 9a677f235..a3965ac90 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -34,6 +34,6 @@ "depends": { "minecraft": ">=1.20.2", - "malilib": ">=0.16.2-nyan.6" + "malilib": ">=0.17.0" } }