From f61fcfa4b0c7f2a995e727ef25b7606500ea4285 Mon Sep 17 00:00:00 2001 From: cnlimiter Date: Sun, 28 Jul 2024 04:22:06 +0800 Subject: [PATCH] refactor(recipes): update NBT handling and recipe conditions for compatibility - Modify ModShapedRecipeBuilder to use CompoundTag instead of String for NBT data. - Refactor the way NBT tags are constructed, especially for creative Energy Cube and Slot recipes. - Change recipe conditions to include 'mekanismgenerators' mod for creative bin recipe.- Rename recipe files to include 'botania' prefix for clarity and consistency.- Update build.gradle with the latest Mekanism version. - Correct the indentation in the tc3_creative_slot JSON files for proper formatting. BREAKING CHANGE: The use of CompoundTag instead of String for NBT data requires updates to any custom recipes that rely on the previous String format. --- build.gradle | 3 +- gradle.properties | 1 + ...e_pool.json => botania_creative_pool.json} | 0 ...a_tablet.json => botania_mana_tablet.json} | 0 .../avaritia/recipes/mek_creative_bin.json | 6 +- .../recipes/mek_creative_energy_cube.json | 7 +- .../recipes/mek_creative_fluid_tank.json | 2 +- .../recipes/tc3_creative_slot_ability.json | 2 +- .../recipes/tc3_creative_slot_defense.json | 2 +- .../recipes/tc3_creative_slot_souls.json | 2 +- .../recipes/tc3_creative_slot_upgrades.json | 2 +- .../init/data/provider/recipe/ModRecipes.java | 65 ++++++++++++++----- .../recipe/ModShapedRecipeBuilder.java | 22 ++++--- 13 files changed, 79 insertions(+), 35 deletions(-) rename src/generated/resources/data/avaritia/recipes/{bot_creative_pool.json => botania_creative_pool.json} (100%) rename src/generated/resources/data/avaritia/recipes/{bot_mana_tablet.json => botania_mana_tablet.json} (100%) diff --git a/build.gradle b/build.gradle index 7f86ae6a..560269a2 100644 --- a/build.gradle +++ b/build.gradle @@ -135,6 +135,7 @@ dependencies { implementation fg.deobf("curse.maven:charm-of-undying-316873:${cou_version}") implementation fg.deobf("curse.maven:projecte-226410:${projecte_version}") + runtimeOnly fg.deobf("curse.maven:mekanism-268560:${mek_version}") compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:${mixin_extras_version}")) implementation(jarJar("io.github.llamalad7:mixinextras-forge:0.3.6")) { @@ -189,7 +190,7 @@ publishing { if (System.getenv('MAVEN_USERNAME') != null && System.getenv('MAVEN_PASSWORD') != null) { maven { name 'S3' - url = 'https://maven.nova-committee.cn/s' + url = 'https://maven.nova-committee.cn/s3' credentials { username System.getenv('MAVEN_USERNAME') diff --git a/gradle.properties b/gradle.properties index 4553da29..61da81c0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,6 +24,7 @@ rhino_version=2001.2.2-build.6 curios_version=5.4.7+1.20.1 cou_version=5159193 projecte_version=4901949 +mek_version=5395221 mixin_extras_version=0.3.6 ## Mod Properties diff --git a/src/generated/resources/data/avaritia/recipes/bot_creative_pool.json b/src/generated/resources/data/avaritia/recipes/botania_creative_pool.json similarity index 100% rename from src/generated/resources/data/avaritia/recipes/bot_creative_pool.json rename to src/generated/resources/data/avaritia/recipes/botania_creative_pool.json diff --git a/src/generated/resources/data/avaritia/recipes/bot_mana_tablet.json b/src/generated/resources/data/avaritia/recipes/botania_mana_tablet.json similarity index 100% rename from src/generated/resources/data/avaritia/recipes/bot_mana_tablet.json rename to src/generated/resources/data/avaritia/recipes/botania_mana_tablet.json diff --git a/src/generated/resources/data/avaritia/recipes/mek_creative_bin.json b/src/generated/resources/data/avaritia/recipes/mek_creative_bin.json index a659f257..9c994806 100644 --- a/src/generated/resources/data/avaritia/recipes/mek_creative_bin.json +++ b/src/generated/resources/data/avaritia/recipes/mek_creative_bin.json @@ -6,6 +6,10 @@ { "type": "forge:mod_loaded", "modid": "mekanism" + }, + { + "type": "forge:mod_loaded", + "modid": "mekanismgenerators" } ], "recipe": { @@ -13,7 +17,7 @@ "category": "equipment", "key": { "A": { - "item": "mekanism:fusion_reactor_frame" + "item": "mekanismgenerators:fusion_reactor_frame" }, "B": { "item": "mekanism:ultimate_energy_cube" diff --git a/src/generated/resources/data/avaritia/recipes/mek_creative_energy_cube.json b/src/generated/resources/data/avaritia/recipes/mek_creative_energy_cube.json index ca381c30..82f700cd 100644 --- a/src/generated/resources/data/avaritia/recipes/mek_creative_energy_cube.json +++ b/src/generated/resources/data/avaritia/recipes/mek_creative_energy_cube.json @@ -22,10 +22,10 @@ "item": "mekanism:induction_port" }, "D": { - "item": "mekanism:induction_cell" + "item": "mekanism:ultimate_induction_cell" }, "E": { - "item": "mekanism:induction_provider" + "item": "mekanism:ultimate_induction_provider" }, "I": { "item": "avaritia:infinity_ingot" @@ -46,7 +46,8 @@ "BBBCECBBB" ], "result": { - "item": "mekanism:creative_energy_cube" + "item": "mekanism:creative_energy_cube", + "nbt": "{mekData:{EnergyContainers:[{Container:0b,stored:\"18446744073709551615.9999\"}]}}" }, "show_notification": true } diff --git a/src/generated/resources/data/avaritia/recipes/mek_creative_fluid_tank.json b/src/generated/resources/data/avaritia/recipes/mek_creative_fluid_tank.json index e788c754..d0af011a 100644 --- a/src/generated/resources/data/avaritia/recipes/mek_creative_fluid_tank.json +++ b/src/generated/resources/data/avaritia/recipes/mek_creative_fluid_tank.json @@ -19,7 +19,7 @@ "item": "mekanism:dynamic_tank" }, "C": { - "item": "mekanism:dynamic_glass" + "item": "mekanism:structural_glass" }, "D": { "item": "mekanism:dynamic_valve" diff --git a/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_ability.json b/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_ability.json index 39dd2813..9cab9f99 100644 --- a/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_ability.json +++ b/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_ability.json @@ -47,7 +47,7 @@ ], "result": { "item": "tconstruct:creative_slot", - "nbt": "{slot:abilities}" + "nbt": "{slot:\"abilities\"}" }, "show_notification": true } diff --git a/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_defense.json b/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_defense.json index 63498c66..a6bba99d 100644 --- a/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_defense.json +++ b/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_defense.json @@ -47,7 +47,7 @@ ], "result": { "item": "tconstruct:creative_slot", - "nbt": "{slot:defense}" + "nbt": "{slot:\"defense\"}" }, "show_notification": true } diff --git a/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_souls.json b/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_souls.json index d174bd39..5d005706 100644 --- a/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_souls.json +++ b/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_souls.json @@ -47,7 +47,7 @@ ], "result": { "item": "tconstruct:creative_slot", - "nbt": "{slot:souls}" + "nbt": "{slot:\"souls\"}" }, "show_notification": true } diff --git a/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_upgrades.json b/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_upgrades.json index 607fcbab..5d65eb95 100644 --- a/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_upgrades.json +++ b/src/generated/resources/data/avaritia/recipes/tc3_creative_slot_upgrades.json @@ -47,7 +47,7 @@ ], "result": { "item": "tconstruct:creative_slot", - "nbt": "{slot:upgrades}" + "nbt": "{slot:\"upgrades\"}" }, "show_notification": true } diff --git a/src/main/java/committee/nova/mods/avaritia/init/data/provider/recipe/ModRecipes.java b/src/main/java/committee/nova/mods/avaritia/init/data/provider/recipe/ModRecipes.java index 6809a334..832e48e8 100644 --- a/src/main/java/committee/nova/mods/avaritia/init/data/provider/recipe/ModRecipes.java +++ b/src/main/java/committee/nova/mods/avaritia/init/data/provider/recipe/ModRecipes.java @@ -9,6 +9,9 @@ import net.minecraft.advancements.critereon.ItemPredicate; import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.*; +import net.minecraft.nbt.ByteTag; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; @@ -480,7 +483,7 @@ protected void buildRecipes(@NotNull Consumer consumer) { .unlockedBy("has_item", has(ModItems.neutron_ingot.get())).save(consumer); - ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ModItems.infinity_totem.get(), "") + ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ModItems.infinity_totem.get()) .pattern(" NNN ") .pattern(" NIIIN ") .pattern(" NYIYN ") @@ -497,7 +500,7 @@ protected void buildRecipes(@NotNull Consumer consumer) { .unlockedBy("has_item", has(Items.TOTEM_OF_UNDYING)).save(consumer); - ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ModItems.infinity_bucket.get(), "") + ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ModItems.infinity_bucket.get()) .pattern("NN NN") .pattern("NNX XNN") .pattern("NBBX XBBN") @@ -532,8 +535,12 @@ protected void buildRecipes(@NotNull Consumer consumer) { .unlockedBy("has_item", has(Static.getItem("ae2", "dense_energy_cell")))::save ).build(consumer, Static.rl( "ae2_creative_energy_cell")); + var mana_tablet_tag = new CompoundTag(); + mana_tablet_tag.putInt("mana", 500000); + mana_tablet_tag.putBoolean("creative", true); + ConditionalRecipe.builder().addCondition(modLoaded("botania")).addRecipe( - ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("botania", "mana_tablet"), "{creative:1b,mana:500000}") + ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("botania", "mana_tablet"), mana_tablet_tag) .pattern("BAAACAAAD") .pattern("ATTJKLTTA") .pattern("ATUUMUUTA") @@ -566,7 +573,7 @@ protected void buildRecipes(@NotNull Consumer consumer) { .define('T', Static.getIngredient("botania", "fabulous_pool")) .define('U', Static.getIngredient("botania", "terrasteel_block")) .unlockedBy("has_item", has(Static.getItem("botania", "terrasteel_block")))::save - ).build(consumer, Static.rl( "bot_mana_tablet")); + ).build(consumer, Static.rl( "botania_mana_tablet")); ConditionalRecipe.builder().addCondition(modLoaded("botania")).addRecipe( ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("botania", "creative_pool")) @@ -587,7 +594,7 @@ protected void buildRecipes(@NotNull Consumer consumer) { .define('E', Static.getIngredient("botania", "dragonstone_block")) .define('F', Static.getIngredient("botania", "mana_tablet")) .unlockedBy("has_item", has(Static.getItem("botania", "mana_tablet")))::save - ).build(consumer, Static.rl( "bot_creative_pool")); + ).build(consumer, Static.rl( "botania_creative_pool")); ConditionalRecipe.builder().addCondition(modLoaded("draconicevolution")).addRecipe( ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("draconicevolution", "creative_capacitor")) @@ -713,8 +720,11 @@ protected void buildRecipes(@NotNull Consumer consumer) { .unlockedBy("has_item", has(Static.getItem("refinedstorage", "wireless_grid")))::save ).build(consumer, Static.rl( "rs_creative_wireless_grid")); + var creative_slot_abilities = new CompoundTag(); + creative_slot_abilities.putString("slot", "abilities"); + ConditionalRecipe.builder().addCondition(modLoaded("tconstruct")).addRecipe( - ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("tconstruct", "creative_slot"), "{slot:abilities}") + ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("tconstruct", "creative_slot"), creative_slot_abilities) .pattern("GGBHHHBGG") .pattern("GCCCCCCCG") .pattern("BCBFFFBCB") @@ -735,8 +745,11 @@ protected void buildRecipes(@NotNull Consumer consumer) { .unlockedBy("has_item", has(Static.getItem("tconstruct", "ichor_slime_crystal")))::save ).build(consumer, Static.rl( "tc3_creative_slot_ability")); + var creative_slot_defense = new CompoundTag(); + creative_slot_defense.putString("slot", "defense"); + ConditionalRecipe.builder().addCondition(modLoaded("tconstruct")).addRecipe( - ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("tconstruct", "creative_slot"), "{slot:defense}") + ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("tconstruct", "creative_slot"), creative_slot_defense) .pattern("GGBHHHBGG") .pattern("GCCCCCCCG") .pattern("BCBFFFBCB") @@ -757,8 +770,12 @@ protected void buildRecipes(@NotNull Consumer consumer) { .unlockedBy("has_item", has(Static.getItem("tconstruct", "earth_slime_crystal")))::save ).build(consumer, Static.rl("tc3_creative_slot_defense")); + + var creative_slot_souls = new CompoundTag(); + creative_slot_souls.putString("slot", "souls"); + ConditionalRecipe.builder().addCondition(modLoaded("tconstruct")).addRecipe( - ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("tconstruct", "creative_slot"), "{slot:souls}") + ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("tconstruct", "creative_slot"), creative_slot_souls) .pattern("GGBHHHBGG") .pattern("GCCCCCCCG") .pattern("BCBFFFBCB") @@ -779,8 +796,11 @@ protected void buildRecipes(@NotNull Consumer consumer) { .unlockedBy("has_item", has(Static.getItem("tconstruct", "sky_slime_crystal")))::save ).build(consumer, Static.rl("tc3_creative_slot_souls")); + var creative_slot_upgrades = new CompoundTag(); + creative_slot_upgrades.putString("slot", "upgrades"); + ConditionalRecipe.builder().addCondition(modLoaded("tconstruct")).addRecipe( - ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("tconstruct", "creative_slot"), "{slot:upgrades}") + ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("tconstruct", "creative_slot"), creative_slot_upgrades) .pattern("GGBHHHBGG") .pattern("GCCCCCCCG") .pattern("BCBFFFBCB") @@ -820,8 +840,20 @@ protected void buildRecipes(@NotNull Consumer consumer) { .unlockedBy("has_item", has(Static.getItem("storagedrawers", "upgrade_storage")))::save ).build(consumer, Static.rl("sd_upgrade_creative")); + var creative_energy_cube_main = new CompoundTag(); + var energyContainers = new ListTag(); + var stored = new CompoundTag(); + var mekData = new CompoundTag(); + stored.putString("stored", "18446744073709551615.9999"); + stored.putBoolean("Container", false); + energyContainers.add(stored); + mekData.put("EnergyContainers", energyContainers); + creative_energy_cube_main.put("mekData", mekData); + ConditionalRecipe.builder().addCondition(modLoaded("mekanism")).addRecipe( - ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("mekanism", "creative_energy_cube")) + ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("mekanism", "creative_energy_cube"), + creative_energy_cube_main + ) .pattern("BBBCECBBB") .pattern("BDDDADDDB") .pattern("BDSDADSDB") @@ -837,8 +869,8 @@ protected void buildRecipes(@NotNull Consumer consumer) { .define('A', Static.getIngredient("mekanism", "ultimate_energy_cube")) .define('B', Static.getIngredient("mekanism", "induction_casing")) .define('C', Static.getIngredient("mekanism", "induction_port")) - .define('D', Static.getIngredient("mekanism", "induction_cell")) - .define('E', Static.getIngredient("mekanism", "induction_provider")) + .define('D', Static.getIngredient("mekanism", "ultimate_induction_cell")) + .define('E', Static.getIngredient("mekanism", "ultimate_induction_provider")) .unlockedBy("has_item", has(Static.getItem("mekanism", "creative_energy_cube")))::save ).build(consumer, Static.rl("mek_creative_energy_cube")); @@ -858,7 +890,7 @@ protected void buildRecipes(@NotNull Consumer consumer) { .define('S', ModItems.infinity_catalyst.get()) .define('A', Static.getIngredient("mekanism", "ultimate_fluid_tank")) .define('B', Static.getIngredient("mekanism", "dynamic_tank")) - .define('C', Static.getIngredient("mekanism", "dynamic_glass")) + .define('C', Static.getIngredient("mekanism", "structural_glass")) .define('D', Static.getIngredient("mekanism", "dynamic_valve")) .unlockedBy("has_item", has(Static.getItem("mekanism", "creative_fluid_tank")))::save ).build(consumer, Static.rl("mek_creative_fluid_tank")); @@ -884,7 +916,10 @@ protected void buildRecipes(@NotNull Consumer consumer) { .unlockedBy("has_item", has(Static.getItem("mekanism", "creative_chemical_tank")))::save ).build(consumer, Static.rl("mek_creative_chemical_tank")); - ConditionalRecipe.builder().addCondition(modLoaded("mekanism")).addRecipe( + ConditionalRecipe.builder() + .addCondition(modLoaded("mekanism")) + .addCondition(modLoaded("mekanismgenerators")) + .addRecipe( ModShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ResourceLocation.tryBuild("mekanism", "creative_bin")) .pattern("AAAAAAAAA") .pattern("AEIIIIIEA") @@ -898,7 +933,7 @@ protected void buildRecipes(@NotNull Consumer consumer) { .define('I', ModItems.infinity_ingot.get()) .define('S', ModItems.infinity_catalyst.get()) - .define('A', Static.getIngredient("mekanism", "fusion_reactor_frame")) + .define('A', Static.getIngredient("mekanismgenerators", "fusion_reactor_frame")) .define('B', Static.getIngredient("mekanism", "ultimate_energy_cube")) .define('C', Static.getIngredient("mekanism", "ultimate_fluid_tank")) .define('D', Static.getIngredient("mekanism", "ultimate_chemical_tank")) diff --git a/src/main/java/committee/nova/mods/avaritia/init/data/provider/recipe/ModShapedRecipeBuilder.java b/src/main/java/committee/nova/mods/avaritia/init/data/provider/recipe/ModShapedRecipeBuilder.java index 5585d364..287f7fd8 100644 --- a/src/main/java/committee/nova/mods/avaritia/init/data/provider/recipe/ModShapedRecipeBuilder.java +++ b/src/main/java/committee/nova/mods/avaritia/init/data/provider/recipe/ModShapedRecipeBuilder.java @@ -15,6 +15,8 @@ import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.data.recipes.RecipeBuilder; import net.minecraft.data.recipes.RecipeCategory; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.Tag; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; @@ -48,7 +50,7 @@ public class ModShapedRecipeBuilder extends CraftingRecipeBuilder implements Rec private final ItemLike result; private final ResourceLocation result2; private final int count; - private final String nbt; + private final CompoundTag nbt; private final List rows = Lists.newArrayList(); private final Map key = Maps.newLinkedHashMap(); private final Advancement.Builder advancement = Advancement.Builder.advancement(); @@ -56,7 +58,7 @@ public class ModShapedRecipeBuilder extends CraftingRecipeBuilder implements Rec private String group; private boolean showNotification = true; - public ModShapedRecipeBuilder(RecipeCategory category, ItemLike itemLike, ResourceLocation itemLocation, int count, String nbt) { + public ModShapedRecipeBuilder(RecipeCategory category, ItemLike itemLike, ResourceLocation itemLocation, int count, CompoundTag nbt) { this.category = category; this.result = itemLike; this.result2 = itemLocation; @@ -65,27 +67,27 @@ public ModShapedRecipeBuilder(RecipeCategory category, ItemLike itemLike, Resour } @Contract("_, _, _ -> new") - public static @NotNull ModShapedRecipeBuilder shaped(RecipeCategory category, ResourceLocation itemLocation, String nbt) { + public static @NotNull ModShapedRecipeBuilder shaped(RecipeCategory category, ResourceLocation itemLocation, CompoundTag nbt) { return shaped(category, null, itemLocation, 1, nbt); } @Contract("_, _ -> new") public static @NotNull ModShapedRecipeBuilder shaped(RecipeCategory category, ResourceLocation itemLocation) { - return shaped(category, null, itemLocation, 1, ""); + return shaped(category, null, itemLocation, 1, new CompoundTag()); } @Contract("_, _, _ -> new") - public static @NotNull ModShapedRecipeBuilder shaped(RecipeCategory category, ItemLike itemLike, String nbt) { + public static @NotNull ModShapedRecipeBuilder shaped(RecipeCategory category, ItemLike itemLike, CompoundTag nbt) { return shaped(category, itemLike, null, 1, nbt); } @Contract("_, _ -> new") public static @NotNull ModShapedRecipeBuilder shaped(RecipeCategory category, ItemLike itemLike) { - return shaped(category, itemLike, null, 1, ""); + return shaped(category, itemLike, null, 1, new CompoundTag()); } @Contract("_, _, _, _, _ -> new") - public static @NotNull ModShapedRecipeBuilder shaped(RecipeCategory category, ItemLike itemLike, ResourceLocation itemLocation, int count, String nbt) { + public static @NotNull ModShapedRecipeBuilder shaped(RecipeCategory category, ItemLike itemLike, ResourceLocation itemLocation, int count, CompoundTag nbt) { return new ModShapedRecipeBuilder(category, itemLike, itemLocation, count, nbt); } @@ -190,7 +192,7 @@ public static class Result extends CraftingRecipeBuilder.CraftingResult { private final ItemLike result; private final ResourceLocation result2; private final int count; - private final String nbt; + private final CompoundTag nbt; private final String group; private final List pattern; private final Map key; @@ -198,7 +200,7 @@ public static class Result extends CraftingRecipeBuilder.CraftingResult { private final ResourceLocation advancementId; private final boolean showNotification; - public Result(ResourceLocation resourceLocation, ItemLike item, ResourceLocation result2, int count, String nbt, String group, CraftingBookCategory p_273500_, List p_273744_, Map p_272991_, Advancement.Builder p_273260_, ResourceLocation p_273106_, boolean p_272862_) { + public Result(ResourceLocation resourceLocation, ItemLike item, ResourceLocation result2, int count, CompoundTag nbt, String group, CraftingBookCategory p_273500_, List p_273744_, Map p_272991_, Advancement.Builder p_273260_, ResourceLocation p_273106_, boolean p_272862_) { super(p_273500_); this.id = resourceLocation; this.result = item; @@ -243,7 +245,7 @@ public void serializeRecipeData(@NotNull JsonObject pJson) { } if (!this.nbt.isEmpty()){ - jsonobject1.addProperty("nbt", this.nbt); + jsonobject1.addProperty("nbt", this.nbt.toString()); } pJson.add("result", jsonobject1);