diff --git a/src/main/generated/data/new_soviet/advancements/recipes/decorations/big_post_lamp_redstone_lamp.json b/src/main/generated/data/new_soviet/advancements/recipes/decorations/big_post_lamp_redstone_lamp.json new file mode 100644 index 0000000..1c87e6e --- /dev/null +++ b/src/main/generated/data/new_soviet/advancements/recipes/decorations/big_post_lamp_redstone_lamp.json @@ -0,0 +1,48 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_lamp_post_base": { + "conditions": { + "items": [ + { + "items": [ + "new_soviet:lamp_post_base" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_redstone_lamp": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:redstone_lamp" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "new_soviet:big_post_lamp_redstone_lamp" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_lamp_post_base", + "has_redstone_lamp", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "new_soviet:big_post_lamp_redstone_lamp" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/main/generated/data/new_soviet/advancements/recipes/decorations/big_post_lamp_sea_lantern.json b/src/main/generated/data/new_soviet/advancements/recipes/decorations/big_post_lamp_sea_lantern.json new file mode 100644 index 0000000..3674454 --- /dev/null +++ b/src/main/generated/data/new_soviet/advancements/recipes/decorations/big_post_lamp_sea_lantern.json @@ -0,0 +1,48 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_lamp_post_base": { + "conditions": { + "items": [ + { + "items": [ + "new_soviet:lamp_post_base" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_sea_lantern": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:sea_lantern" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "new_soviet:big_post_lamp_sea_lantern" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_lamp_post_base", + "has_sea_lantern", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "new_soviet:big_post_lamp_sea_lantern" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/main/generated/data/new_soviet/advancements/recipes/decorations/big_post_lamp.json b/src/main/generated/data/new_soviet/advancements/recipes/decorations/big_post_lamp_shroomlight.json similarity index 89% rename from src/main/generated/data/new_soviet/advancements/recipes/decorations/big_post_lamp.json rename to src/main/generated/data/new_soviet/advancements/recipes/decorations/big_post_lamp_shroomlight.json index aba7edb..ad2fd80 100644 --- a/src/main/generated/data/new_soviet/advancements/recipes/decorations/big_post_lamp.json +++ b/src/main/generated/data/new_soviet/advancements/recipes/decorations/big_post_lamp_shroomlight.json @@ -27,7 +27,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "new_soviet:big_post_lamp" + "recipe": "new_soviet:big_post_lamp_shroomlight" }, "trigger": "minecraft:recipe_unlocked" } @@ -41,7 +41,7 @@ ], "rewards": { "recipes": [ - "new_soviet:big_post_lamp" + "new_soviet:big_post_lamp_shroomlight" ] }, "sends_telemetry_event": false diff --git a/src/main/generated/data/new_soviet/advancements/recipes/decorations/caged_post_lamp.json b/src/main/generated/data/new_soviet/advancements/recipes/decorations/caged_post_lamp.json new file mode 100644 index 0000000..c428f97 --- /dev/null +++ b/src/main/generated/data/new_soviet/advancements/recipes/decorations/caged_post_lamp.json @@ -0,0 +1,61 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_iron_nugget": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:iron_nugget" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_lamp_post_base": { + "conditions": { + "items": [ + { + "items": [ + "new_soviet:lamp_post_base" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_lantern": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:lantern" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "new_soviet:caged_post_lamp" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_lamp_post_base", + "has_lantern", + "has_iron_nugget", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "new_soviet:caged_post_lamp" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/main/generated/data/new_soviet/advancements/recipes/decorations/vintage_post_lamp_add_ingot.json b/src/main/generated/data/new_soviet/advancements/recipes/decorations/vintage_post_lamp_add_ingot.json new file mode 100644 index 0000000..fb2a2b6 --- /dev/null +++ b/src/main/generated/data/new_soviet/advancements/recipes/decorations/vintage_post_lamp_add_ingot.json @@ -0,0 +1,61 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_caged_post_lamp": { + "conditions": { + "items": [ + { + "items": [ + "new_soviet:vintage_post_lamp" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_iron_ingot": { + "conditions": { + "items": [ + { + "items": [ + "new_soviet:vintage_post_lamp" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "new_soviet:vintage_post_lamp_add_ingot" + }, + "trigger": "minecraft:recipe_unlocked" + }, + "has_vintage_post_lamp": { + "conditions": { + "items": [ + { + "items": [ + "new_soviet:vintage_post_lamp" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + } + }, + "requirements": [ + [ + "has_vintage_post_lamp", + "has_caged_post_lamp", + "has_iron_ingot", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "new_soviet:vintage_post_lamp_add_ingot" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/main/generated/data/new_soviet/advancements/recipes/decorations/vintage_post_lamp_basic.json b/src/main/generated/data/new_soviet/advancements/recipes/decorations/vintage_post_lamp_basic.json new file mode 100644 index 0000000..5599f9d --- /dev/null +++ b/src/main/generated/data/new_soviet/advancements/recipes/decorations/vintage_post_lamp_basic.json @@ -0,0 +1,74 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_iron_ingot": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:iron_ingot" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_iron_nugget": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:iron_nugget" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_lamp_post_base": { + "conditions": { + "items": [ + { + "items": [ + "new_soviet:lamp_post_base" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_lantern": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:lantern" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "new_soviet:vintage_post_lamp_basic" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_lamp_post_base", + "has_lantern", + "has_iron_ingot", + "has_iron_nugget", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "new_soviet:vintage_post_lamp_basic" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/main/generated/data/new_soviet/recipes/big_post_lamp_redstone_lamp.json b/src/main/generated/data/new_soviet/recipes/big_post_lamp_redstone_lamp.json new file mode 100644 index 0000000..6209c27 --- /dev/null +++ b/src/main/generated/data/new_soviet/recipes/big_post_lamp_redstone_lamp.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "P": { + "item": "new_soviet:lamp_post_base" + }, + "S": { + "item": "minecraft:redstone_lamp" + } + }, + "pattern": [ + " S ", + " P ", + " " + ], + "result": { + "item": "new_soviet:big_post_lamp" + }, + "show_notification": true +} \ No newline at end of file diff --git a/src/main/generated/data/new_soviet/recipes/big_post_lamp_sea_lantern.json b/src/main/generated/data/new_soviet/recipes/big_post_lamp_sea_lantern.json new file mode 100644 index 0000000..073b546 --- /dev/null +++ b/src/main/generated/data/new_soviet/recipes/big_post_lamp_sea_lantern.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "P": { + "item": "new_soviet:lamp_post_base" + }, + "S": { + "item": "minecraft:sea_lantern" + } + }, + "pattern": [ + " S ", + " P ", + " " + ], + "result": { + "item": "new_soviet:big_post_lamp" + }, + "show_notification": true +} \ No newline at end of file diff --git a/src/main/generated/data/new_soviet/recipes/big_post_lamp.json b/src/main/generated/data/new_soviet/recipes/big_post_lamp_shroomlight.json similarity index 100% rename from src/main/generated/data/new_soviet/recipes/big_post_lamp.json rename to src/main/generated/data/new_soviet/recipes/big_post_lamp_shroomlight.json diff --git a/src/main/generated/data/new_soviet/recipes/caged_post_lamp.json b/src/main/generated/data/new_soviet/recipes/caged_post_lamp.json new file mode 100644 index 0000000..8366f93 --- /dev/null +++ b/src/main/generated/data/new_soviet/recipes/caged_post_lamp.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "L": { + "item": "minecraft:lantern" + }, + "N": { + "item": "minecraft:iron_nugget" + }, + "P": { + "item": "new_soviet:lamp_post_base" + } + }, + "pattern": [ + " N", + "LP" + ], + "result": { + "item": "new_soviet:caged_post_lamp" + }, + "show_notification": true +} \ No newline at end of file diff --git a/src/main/generated/data/new_soviet/recipes/vintage_post_lamp_add_ingot.json b/src/main/generated/data/new_soviet/recipes/vintage_post_lamp_add_ingot.json new file mode 100644 index 0000000..76d7ffd --- /dev/null +++ b/src/main/generated/data/new_soviet/recipes/vintage_post_lamp_add_ingot.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "new_soviet:caged_post_lamp" + }, + { + "item": "minecraft:iron_ingot" + } + ], + "result": { + "item": "new_soviet:vintage_post_lamp" + } +} \ No newline at end of file diff --git a/src/main/generated/data/new_soviet/recipes/vintage_post_lamp_basic.json b/src/main/generated/data/new_soviet/recipes/vintage_post_lamp_basic.json new file mode 100644 index 0000000..68b0213 --- /dev/null +++ b/src/main/generated/data/new_soviet/recipes/vintage_post_lamp_basic.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "I": { + "item": "minecraft:iron_ingot" + }, + "L": { + "item": "minecraft:lantern" + }, + "N": { + "item": "minecraft:iron_nugget" + }, + "P": { + "item": "new_soviet:lamp_post_base" + } + }, + "pattern": [ + "IN", + "LP" + ], + "result": { + "item": "new_soviet:vintage_post_lamp" + }, + "show_notification": true +} \ No newline at end of file diff --git a/src/main/java/su/a71/new_soviet/datagen/RecipeGenerator.java b/src/main/java/su/a71/new_soviet/datagen/RecipeGenerator.java index badb50e..e459636 100644 --- a/src/main/java/su/a71/new_soviet/datagen/RecipeGenerator.java +++ b/src/main/java/su/a71/new_soviet/datagen/RecipeGenerator.java @@ -5,14 +5,12 @@ import com.google.common.collect.Lists; import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider; import net.minecraft.block.*; -import net.minecraft.data.server.recipe.RecipeJsonProvider; -import net.minecraft.data.server.recipe.RecipeProvider; -import net.minecraft.data.server.recipe.ShapedRecipeJsonBuilder; -import net.minecraft.data.server.recipe.ShapelessRecipeJsonBuilder; +import net.minecraft.data.server.recipe.*; import net.minecraft.item.ItemConvertible; import net.minecraft.item.Items; import net.minecraft.recipe.Ingredient; import net.minecraft.recipe.book.RecipeCategory; +import net.minecraft.registry.Registries; import net.minecraft.registry.tag.ItemTags; import net.minecraft.util.Util; import su.a71.new_soviet.registration.NSE_Blocks; @@ -586,8 +584,45 @@ public class RecipeGenerator extends FabricRecipeProvider { .pattern(" S ").pattern(" P ").pattern(" ") .criterion(hasItem(NSE_Custom.LAMP_POST_BASE), conditionsFromItem(NSE_Custom.LAMP_POST_BASE)) .criterion(hasItem(Blocks.SHROOMLIGHT), conditionsFromItem(Blocks.SHROOMLIGHT)) + .offerTo(exporter, Registries.ITEM.getId(NSE_Custom.BIG_POST_LAMP.asItem()) + "_shroomlight"); + + ShapedRecipeJsonBuilder.create(RecipeCategory.DECORATIONS, NSE_Custom.BIG_POST_LAMP, 1) + .input('P', NSE_Custom.LAMP_POST_BASE).input('S', Blocks.SEA_LANTERN) + .pattern(" S ").pattern(" P ").pattern(" ") + .criterion(hasItem(NSE_Custom.LAMP_POST_BASE), conditionsFromItem(NSE_Custom.LAMP_POST_BASE)) + .criterion(hasItem(Blocks.SEA_LANTERN), conditionsFromItem(Blocks.SEA_LANTERN)) + .offerTo(exporter, Registries.ITEM.getId(NSE_Custom.BIG_POST_LAMP.asItem()) + "_sea_lantern"); + + ShapedRecipeJsonBuilder.create(RecipeCategory.DECORATIONS, NSE_Custom.BIG_POST_LAMP, 1) + .input('P', NSE_Custom.LAMP_POST_BASE).input('S', Blocks.REDSTONE_LAMP) + .pattern(" S ").pattern(" P ").pattern(" ") + .criterion(hasItem(NSE_Custom.LAMP_POST_BASE), conditionsFromItem(NSE_Custom.LAMP_POST_BASE)) + .criterion(hasItem(Blocks.REDSTONE_LAMP), conditionsFromItem(Blocks.REDSTONE_LAMP)) + .offerTo(exporter, Registries.ITEM.getId(NSE_Custom.BIG_POST_LAMP.asItem()) + "_redstone_lamp"); + + ShapedRecipeJsonBuilder.create(RecipeCategory.DECORATIONS, NSE_Custom.CAGED_POST_LAMP, 1) + .input('P', NSE_Custom.LAMP_POST_BASE).input('N', Items.IRON_NUGGET).input('L', Blocks.LANTERN) + .pattern(" N").pattern("LP") + .criterion(hasItem(NSE_Custom.LAMP_POST_BASE), conditionsFromItem(NSE_Custom.LAMP_POST_BASE)) + .criterion(hasItem(Blocks.LANTERN), conditionsFromItem(Blocks.LANTERN)) + .criterion(hasItem(Items.IRON_NUGGET), conditionsFromItem(Items.IRON_NUGGET)) .offerTo(exporter); + ShapedRecipeJsonBuilder.create(RecipeCategory.DECORATIONS, NSE_Custom.VINTAGE_POST_LAMP, 1) + .input('P', NSE_Custom.LAMP_POST_BASE).input('N', Items.IRON_NUGGET).input('I', Items.IRON_INGOT).input('L', Blocks.LANTERN) + .pattern("IN").pattern("LP") + .criterion(hasItem(NSE_Custom.LAMP_POST_BASE), conditionsFromItem(NSE_Custom.LAMP_POST_BASE)) + .criterion(hasItem(Blocks.LANTERN), conditionsFromItem(Blocks.LANTERN)) + .criterion(hasItem(Items.IRON_INGOT), conditionsFromItem(Items.IRON_INGOT)) + .criterion(hasItem(Items.IRON_NUGGET), conditionsFromItem(Items.IRON_NUGGET)) + .offerTo(exporter, Registries.ITEM.getId(NSE_Custom.VINTAGE_POST_LAMP.asItem()) + "_basic"); + + ShapelessRecipeJsonBuilder.create(RecipeCategory.DECORATIONS, NSE_Custom.VINTAGE_POST_LAMP).input(NSE_Custom.CAGED_POST_LAMP).input(Items.IRON_INGOT).criterion(FabricRecipeProvider.hasItem(NSE_Custom.VINTAGE_POST_LAMP), + FabricRecipeProvider.conditionsFromItem(NSE_Custom.VINTAGE_POST_LAMP)).criterion(FabricRecipeProvider.hasItem(NSE_Custom.CAGED_POST_LAMP), + FabricRecipeProvider.conditionsFromItem(NSE_Custom.VINTAGE_POST_LAMP)).criterion(FabricRecipeProvider.hasItem(Items.IRON_INGOT), + FabricRecipeProvider.conditionsFromItem(NSE_Custom.VINTAGE_POST_LAMP)).offerTo(exporter, Registries.ITEM.getId(NSE_Custom.VINTAGE_POST_LAMP.asItem()) + "_add_ingot"); + + ShapedRecipeJsonBuilder.create(RecipeCategory.DECORATIONS, NSE_Custom.SIREN, 1) .input('R', Items.REDSTONE).input('N', Blocks.NOTE_BLOCK).input('I', Items.IRON_NUGGET) .pattern(" ").pattern("IRI").pattern("NIN")