From b441a39323ee6815bf3acae1bd3ded3cd1d4654e Mon Sep 17 00:00:00 2001 From: ChaoticByte Date: Sat, 14 Sep 2024 22:56:36 +0200 Subject: [PATCH 1/3] Backport to Minecraft 1.20.1 --- gradle.properties | 8 ++++---- .../net/chaoticbyte/hardboiled/HardBoiledItems.java | 4 ++-- .../{recipe => recipes}/hardboiled_egg_campfire.json | 4 +--- .../{recipe => recipes}/hardboiled_egg_furnace.json | 4 +--- src/main/resources/fabric.mod.json | 10 ++++------ 5 files changed, 12 insertions(+), 18 deletions(-) rename src/main/resources/data/hardboiled/{recipe => recipes}/hardboiled_egg_campfire.json (70%) rename src/main/resources/data/hardboiled/{recipe => recipes}/hardboiled_egg_furnace.json (68%) diff --git a/gradle.properties b/gradle.properties index 2ff0ccf..61819d2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,14 +4,14 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.21.1 -yarn_mappings=1.21.1+build.3 +minecraft_version=1.20.1 +yarn_mappings=1.20.1+build.10 loader_version=0.16.5 # Mod Properties -mod_version=1.0.0 +mod_version=1.0.1 maven_group=net.chaoticbyte.hardboiled archives_base_name=hardboiled # Dependencies -fabric_version=0.104.0+1.21.1 \ No newline at end of file +fabric_version=0.92.2+1.20.1 \ No newline at end of file diff --git a/src/main/java/net/chaoticbyte/hardboiled/HardBoiledItems.java b/src/main/java/net/chaoticbyte/hardboiled/HardBoiledItems.java index b22a356..0cd134d 100644 --- a/src/main/java/net/chaoticbyte/hardboiled/HardBoiledItems.java +++ b/src/main/java/net/chaoticbyte/hardboiled/HardBoiledItems.java @@ -1,6 +1,6 @@ package net.chaoticbyte.hardboiled; -import net.minecraft.component.type.FoodComponent; +import net.minecraft.item.FoodComponent; import net.minecraft.item.Item; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; @@ -9,7 +9,7 @@ import net.minecraft.util.Identifier; public class HardBoiledItems { // default food component public static final FoodComponent foodComponent = new FoodComponent.Builder() - .nutrition(3) + .hunger(3) .snack() .build(); // register item diff --git a/src/main/resources/data/hardboiled/recipe/hardboiled_egg_campfire.json b/src/main/resources/data/hardboiled/recipes/hardboiled_egg_campfire.json similarity index 70% rename from src/main/resources/data/hardboiled/recipe/hardboiled_egg_campfire.json rename to src/main/resources/data/hardboiled/recipes/hardboiled_egg_campfire.json index 0dbb2d5..f836278 100644 --- a/src/main/resources/data/hardboiled/recipe/hardboiled_egg_campfire.json +++ b/src/main/resources/data/hardboiled/recipes/hardboiled_egg_campfire.json @@ -3,9 +3,7 @@ "ingredient": { "item": "minecraft:egg" }, - "result": { - "id": "hardboiled:hardboiled_egg" - }, + "result": "hardboiled:hardboiled_egg", "experience": 0.25, "cookingtime": 200 } \ No newline at end of file diff --git a/src/main/resources/data/hardboiled/recipe/hardboiled_egg_furnace.json b/src/main/resources/data/hardboiled/recipes/hardboiled_egg_furnace.json similarity index 68% rename from src/main/resources/data/hardboiled/recipe/hardboiled_egg_furnace.json rename to src/main/resources/data/hardboiled/recipes/hardboiled_egg_furnace.json index 287c277..1377897 100644 --- a/src/main/resources/data/hardboiled/recipe/hardboiled_egg_furnace.json +++ b/src/main/resources/data/hardboiled/recipes/hardboiled_egg_furnace.json @@ -3,9 +3,7 @@ "ingredient": { "item": "minecraft:egg" }, - "result": { - "id": "hardboiled:hardboiled_egg" - }, + "result": "hardboiled:hardboiled_egg", "experience": 0.25, "cookingtime": 200 } \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 71442a6..17559a7 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -21,12 +21,10 @@ }, "mixins": [], "depends": { - "fabricloader": ">=0.16.5", - "minecraft": "~1.21.1", - "java": ">=21", + "fabricloader": ">=0.16.0", + "minecraft": "~1.20.1", + "java": ">=17", "fabric-api": "*" }, - "suggests": { - "another-mod": "*" - } + "suggests": {} } \ No newline at end of file From 2a7532be2ba3977646ee7305ef98ff1f47587478 Mon Sep 17 00:00:00 2001 From: ChaoticByte Date: Sat, 14 Sep 2024 23:00:05 +0200 Subject: [PATCH 2/3] Update README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4952494..d495594 100644 --- a/README.md +++ b/README.md @@ -11,4 +11,5 @@ This is a Fabric-only mod. The following Minecraft versions are supported: +- 1.20.1 - 1.21.1 From 99d16627ea1b7c2cf41012123aa02fbd73931cd9 Mon Sep 17 00:00:00 2001 From: ChaoticByte Date: Sat, 14 Sep 2024 23:13:58 +0200 Subject: [PATCH 3/3] Set Java version in build.gradle back to 17 --- build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 4c83ad7..ef65712 100644 --- a/build.gradle +++ b/build.gradle @@ -38,7 +38,7 @@ processResources { } tasks.withType(JavaCompile).configureEach { - it.options.release = 21 + it.options.release = 17 } java { @@ -47,8 +47,8 @@ java { // If you remove this line, sources will not be generated. withSourcesJar() - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } jar {