From f3e8ad4d2e4f4e480fc88dbb6f929a1fc619722a Mon Sep 17 00:00:00 2001 From: Leronus Date: Thu, 27 Jun 2024 06:40:52 +0200 Subject: [PATCH] Update to 1.20.2 --- build.gradle | 24 +++++------ gradle.properties | 19 +++++---- gradle/wrapper/gradle-wrapper.properties | 2 +- src/main/java/mod/leronus/mores/Mores.java | 42 +++++++++---------- .../mod/leronus/mores/mixin/BlockMixin.java | 5 ++- 5 files changed, 47 insertions(+), 45 deletions(-) diff --git a/build.gradle b/build.gradle index 3b197c6..c839e67 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.5-SNAPSHOT' + id 'fabric-loom' version '1.6-SNAPSHOT' id 'maven-publish' } @@ -65,36 +65,36 @@ dependencies { // Fabric API. This is technically optional, but you probably want it anyway. modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - modImplementation "maven.modrinth:sodium:mc1.20.1-0.5.3" - modImplementation "maven.modrinth:lithium:mc1.20.1-0.11.2" + modImplementation "maven.modrinth:sodium:${project.sodium_version}" + modImplementation "maven.modrinth:lithium:${project.lithium_version}" //Iris - modImplementation "maven.modrinth:YL57xq9U:ogjxrwGQ" + modImplementation "maven.modrinth:YL57xq9U:Cjwm9s3i" //Indium - modImplementation "maven.modrinth:Orvt0mRa:Lue6O9z9" + modImplementation "maven.modrinth:Orvt0mRa:tD2IqHXC" //EntityCulling - modImplementation "maven.modrinth:NNAgCjsB:BDwHAdWc" + modImplementation "maven.modrinth:NNAgCjsB:KRGWwoZW" //Continuity - modImplementation "maven.modrinth:1IjD5062:Z9FJWLMt" + modImplementation "maven.modrinth:1IjD5062:Ox1racg8" // //Bobby // modImplementation "maven.modrinth:M08ruV16:2cuVyTav" //Nvidium modImplementation "maven.modrinth:SfMw2IZN:UO1crPGk" //Custom Shields - modImplementation "com.github.CrimsonDawn45:Fabric-Shield-Lib:v${project.fabric_shield_lib_version}" + modImplementation "maven.modrinth:7SDalH12:xY16zX6k" modImplementation "com.terraformersmc:modmenu:${project.mod_menu_version}" modImplementation "maven.modrinth:midnightlib:${project.midnightlib_version}" modImplementation "com.github.Chocohead:Fabric-ASM:v${project.fabricasm_version}" //CustomPortalAPI - modImplementation 'net.kyrptonaught:customportalapi:0.0.1-beta64-1.20' - include 'net.kyrptonaught:customportalapi:0.0.1-beta64-1.20' +// modImplementation 'net.kyrptonaught:customportalapi:0.0.1-beta64-1.20' +// include 'net.kyrptonaught:customportalapi:0.0.1-beta64-1.20' modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}" - //XRay - modImplementation "curse.maven:advanced-xray-fabric-edition-444663:4595168" +// //XRay +// modImplementation "curse.maven:advanced-xray-fabric-edition-444663:4595168" } processResources { diff --git a/gradle.properties b/gradle.properties index aa893c3..755f06c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,20 +4,21 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.20.1 -yarn_mappings=1.20.1+build.10 -loader_version=0.15.3 +minecraft_version=1.20.2 +yarn_mappings=1.20.2+build.4 +loader_version=0.15.11 # Mod Properties -mod_version=1.0.1 +mod_version=1.2.0 maven_group=mod.leronus.mores archives_base_name=mores # Dependencies -fabric_version=0.91.0+1.20.1 -sodium_version=mc1.20.1-0.5.3 +fabric_version=0.91.6+1.20.2 +sodium_version=mc1.20.2-0.5.5 +lithium_version=mc1.20.2-0.12.0 -fabric_shield_lib_version=1.7.2-1.20.1 -midnightlib_version=1.4.1-fabric -mod_menu_version=7.2.2 +fabric_shield_lib_version=1.7.2-1.20.2 +midnightlib_version=1.5.0-fabric +mod_menu_version=8.0.1 fabricasm_version=2.3 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1af9e09..a80b22c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/java/mod/leronus/mores/Mores.java b/src/main/java/mod/leronus/mores/Mores.java index 0ef297c..9469b96 100644 --- a/src/main/java/mod/leronus/mores/Mores.java +++ b/src/main/java/mod/leronus/mores/Mores.java @@ -7,7 +7,7 @@ import mod.leronus.mores.world.gen.ModWorldGeneration; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.registry.FuelRegistry; -import net.kyrptonaught.customportalapi.api.CustomPortalBuilder; +//import net.kyrptonaught.customportalapi.api.CustomPortalBuilder; import net.minecraft.util.Identifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -39,25 +39,25 @@ public void onInitialize() { ModWorldGeneration.generateModWorldGen(); - CustomPortalBuilder.beginPortal() - .frameBlock(ModBlocks.SILVER_BLOCK) - .lightWithItem(ModItems.ANTHRACITE) - .destDimID(new Identifier(Mores.MOD_ID, "reloaded")) - .tintColor(14188952) - .registerPortal(); - - CustomPortalBuilder.beginPortal() - .frameBlock(ModBlocks.RUBY_BLOCK) - .lightWithItem(ModItems.ANTHRACITE) - .destDimID(new Identifier(Mores.MOD_ID, "reloaded")) - .tintColor(13061821) - .registerPortal(); - - CustomPortalBuilder.beginPortal() - .frameBlock(ModBlocks.ONYX_BLOCK) - .lightWithItem(ModItems.ANTHRACITE) - .destDimID(new Identifier("the_end")) - .tintColor(4408131) - .registerPortal(); +// CustomPortalBuilder.beginPortal() +// .frameBlock(ModBlocks.SILVER_BLOCK) +// .lightWithItem(ModItems.ANTHRACITE) +// .destDimID(new Identifier(Mores.MOD_ID, "reloaded")) +// .tintColor(14188952) +// .registerPortal(); +// +// CustomPortalBuilder.beginPortal() +// .frameBlock(ModBlocks.RUBY_BLOCK) +// .lightWithItem(ModItems.ANTHRACITE) +// .destDimID(new Identifier(Mores.MOD_ID, "reloaded")) +// .tintColor(13061821) +// .registerPortal(); +// +// CustomPortalBuilder.beginPortal() +// .frameBlock(ModBlocks.ONYX_BLOCK) +// .lightWithItem(ModItems.ANTHRACITE) +// .destDimID(new Identifier("the_end")) +// .tintColor(4408131) +// .registerPortal(); } } \ No newline at end of file diff --git a/src/main/java/mod/leronus/mores/mixin/BlockMixin.java b/src/main/java/mod/leronus/mores/mixin/BlockMixin.java index 305b67a..ed0ef77 100644 --- a/src/main/java/mod/leronus/mores/mixin/BlockMixin.java +++ b/src/main/java/mod/leronus/mores/mixin/BlockMixin.java @@ -7,6 +7,7 @@ import net.minecraft.entity.Entity; import net.minecraft.inventory.SimpleInventory; import net.minecraft.item.ItemStack; +import net.minecraft.recipe.RecipeEntry; import net.minecraft.recipe.RecipeType; import net.minecraft.recipe.SmeltingRecipe; import net.minecraft.server.world.ServerWorld; @@ -36,10 +37,10 @@ private static void getDroppedStacks(BlockState state, ServerWorld world, BlockP } for (ItemStack itemStack : returnValue) { // Optional recipe = world.getRecipeManager().listAllOfType(RecipeType.SMELTING).stream().filter((smeltingRecipe -> smeltingRecipe.getPreviewInputs().get(0).test(itemStack))).findFirst(); - Optional recipe = world.getRecipeManager().getFirstMatch(RecipeType.SMELTING, new SimpleInventory(itemStack), world); + Optional> recipe = world.getRecipeManager().getFirstMatch(RecipeType.SMELTING, new SimpleInventory(itemStack), world); if (recipe.isPresent()) { - ItemStack smelted = recipe.get().getOutput(world.getRegistryManager()).copy(); + ItemStack smelted = recipe.get().value().getResult(world.getRegistryManager()).copy(); smelted.setCount(itemStack.getCount()); items.add(smelted); } else {