Add dirty block recipes

This commit is contained in:
Andrew-71 2023-08-30 12:26:00 +03:00
parent b390026a1f
commit eb5316aea5
21 changed files with 515 additions and 84 deletions

View file

@ -0,0 +1,35 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_red_bricks": {
"conditions": {
"items": [
{
"items": [
"new_soviet:red_bricks"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "new_soviet:cracked_red_bricks"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_red_bricks",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"new_soviet:cracked_red_bricks"
]
},
"sends_telemetry_event": false
}

View file

@ -0,0 +1,61 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_aquamarine_tiles": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_aquamarine_tiles"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirt": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_aquamarine_tiles"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirty_aquamarine_tiles": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_aquamarine_tiles"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "new_soviet:dirty_aquamarine_tiles"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_dirty_aquamarine_tiles",
"has_aquamarine_tiles",
"has_dirt",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"new_soviet:dirty_aquamarine_tiles"
]
},
"sends_telemetry_event": false
}

View file

@ -1,12 +1,36 @@
{ {
"parent": "minecraft:recipes/root", "parent": "minecraft:recipes/root",
"criteria": { "criteria": {
"has_dirty_aquamarine_tiles": { "has_aquamarine_tiles_slab": {
"conditions": { "conditions": {
"items": [ "items": [
{ {
"items": [ "items": [
"new_soviet:dirty_aquamarine_tiles" "new_soviet:dirty_aquamarine_tiles_slab"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirt": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_aquamarine_tiles_slab"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirty_aquamarine_tiles_slab": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_aquamarine_tiles_slab"
] ]
} }
] ]
@ -22,7 +46,9 @@
}, },
"requirements": [ "requirements": [
[ [
"has_dirty_aquamarine_tiles", "has_dirty_aquamarine_tiles_slab",
"has_aquamarine_tiles_slab",
"has_dirt",
"has_the_recipe" "has_the_recipe"
] ]
], ],

View file

@ -1,12 +1,36 @@
{ {
"parent": "minecraft:recipes/root", "parent": "minecraft:recipes/root",
"criteria": { "criteria": {
"has_dirty_aquamarine_tiles": { "has_aquamarine_tiles_stairs": {
"conditions": { "conditions": {
"items": [ "items": [
{ {
"items": [ "items": [
"new_soviet:dirty_aquamarine_tiles" "new_soviet:dirty_aquamarine_tiles_stairs"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirt": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_aquamarine_tiles_stairs"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirty_aquamarine_tiles_stairs": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_aquamarine_tiles_stairs"
] ]
} }
] ]
@ -22,7 +46,9 @@
}, },
"requirements": [ "requirements": [
[ [
"has_dirty_aquamarine_tiles", "has_dirty_aquamarine_tiles_stairs",
"has_aquamarine_tiles_stairs",
"has_dirt",
"has_the_recipe" "has_the_recipe"
] ]
], ],

View file

@ -0,0 +1,61 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_brick_tiles": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_brick_tiles"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirt": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_brick_tiles"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirty_brick_tiles": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_brick_tiles"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "new_soviet:dirty_brick_tiles"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_dirty_brick_tiles",
"has_brick_tiles",
"has_dirt",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"new_soviet:dirty_brick_tiles"
]
},
"sends_telemetry_event": false
}

View file

@ -1,12 +1,36 @@
{ {
"parent": "minecraft:recipes/root", "parent": "minecraft:recipes/root",
"criteria": { "criteria": {
"has_dirty_brick_tiles": { "has_brick_tiles_slab": {
"conditions": { "conditions": {
"items": [ "items": [
{ {
"items": [ "items": [
"new_soviet:dirty_brick_tiles" "new_soviet:dirty_brick_tiles_slab"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirt": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_brick_tiles_slab"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirty_brick_tiles_slab": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_brick_tiles_slab"
] ]
} }
] ]
@ -22,7 +46,9 @@
}, },
"requirements": [ "requirements": [
[ [
"has_dirty_brick_tiles", "has_dirty_brick_tiles_slab",
"has_brick_tiles_slab",
"has_dirt",
"has_the_recipe" "has_the_recipe"
] ]
], ],

View file

@ -1,12 +1,36 @@
{ {
"parent": "minecraft:recipes/root", "parent": "minecraft:recipes/root",
"criteria": { "criteria": {
"has_dirty_brick_tiles": { "has_brick_tiles_stairs": {
"conditions": { "conditions": {
"items": [ "items": [
{ {
"items": [ "items": [
"new_soviet:dirty_brick_tiles" "new_soviet:dirty_brick_tiles_stairs"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirt": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_brick_tiles_stairs"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirty_brick_tiles_stairs": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_brick_tiles_stairs"
] ]
} }
] ]
@ -22,7 +46,9 @@
}, },
"requirements": [ "requirements": [
[ [
"has_dirty_brick_tiles", "has_dirty_brick_tiles_stairs",
"has_brick_tiles_stairs",
"has_dirt",
"has_the_recipe" "has_the_recipe"
] ]
], ],

View file

@ -0,0 +1,61 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_dark_brick_tiles": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_dark_brick_tiles"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirt": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_dark_brick_tiles"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirty_dark_brick_tiles": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_dark_brick_tiles"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "new_soviet:dirty_dark_brick_tiles"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_dirty_dark_brick_tiles",
"has_dark_brick_tiles",
"has_dirt",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"new_soviet:dirty_dark_brick_tiles"
]
},
"sends_telemetry_event": false
}

View file

@ -1,12 +1,36 @@
{ {
"parent": "minecraft:recipes/root", "parent": "minecraft:recipes/root",
"criteria": { "criteria": {
"has_dirty_dark_brick_tiles": { "has_dark_brick_tiles_slab": {
"conditions": { "conditions": {
"items": [ "items": [
{ {
"items": [ "items": [
"new_soviet:dirty_dark_brick_tiles" "new_soviet:dirty_dark_brick_tiles_slab"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirt": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_dark_brick_tiles_slab"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirty_dark_brick_tiles_slab": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_dark_brick_tiles_slab"
] ]
} }
] ]
@ -22,7 +46,9 @@
}, },
"requirements": [ "requirements": [
[ [
"has_dirty_dark_brick_tiles", "has_dirty_dark_brick_tiles_slab",
"has_dark_brick_tiles_slab",
"has_dirt",
"has_the_recipe" "has_the_recipe"
] ]
], ],

View file

@ -1,12 +1,36 @@
{ {
"parent": "minecraft:recipes/root", "parent": "minecraft:recipes/root",
"criteria": { "criteria": {
"has_dirty_dark_brick_tiles": { "has_dark_brick_tiles_stairs": {
"conditions": { "conditions": {
"items": [ "items": [
{ {
"items": [ "items": [
"new_soviet:dirty_dark_brick_tiles" "new_soviet:dirty_dark_brick_tiles_stairs"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirt": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_dark_brick_tiles_stairs"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_dirty_dark_brick_tiles_stairs": {
"conditions": {
"items": [
{
"items": [
"new_soviet:dirty_dark_brick_tiles_stairs"
] ]
} }
] ]
@ -22,7 +46,9 @@
}, },
"requirements": [ "requirements": [
[ [
"has_dirty_dark_brick_tiles", "has_dirty_dark_brick_tiles_stairs",
"has_dark_brick_tiles_stairs",
"has_dirt",
"has_the_recipe" "has_the_recipe"
] ]
], ],

View file

@ -0,0 +1,10 @@
{
"type": "minecraft:smelting",
"category": "blocks",
"cookingtime": 200,
"experience": 0.1,
"ingredient": {
"item": "new_soviet:red_bricks"
},
"result": "new_soviet:cracked_red_bricks"
}

View file

@ -0,0 +1,15 @@
{
"type": "minecraft:crafting_shapeless",
"category": "building",
"ingredients": [
{
"item": "new_soviet:aquamarine_tiles"
},
{
"item": "minecraft:dirt"
}
],
"result": {
"item": "new_soviet:dirty_aquamarine_tiles"
}
}

View file

@ -1,17 +1,15 @@
{ {
"type": "minecraft:crafting_shaped", "type": "minecraft:crafting_shapeless",
"category": "building", "category": "building",
"key": { "ingredients": [
"#": { {
"item": "new_soviet:dirty_aquamarine_tiles" "item": "new_soviet:aquamarine_tiles_slab"
}
}, },
"pattern": [ {
"###" "item": "minecraft:dirt"
}
], ],
"result": { "result": {
"count": 6,
"item": "new_soviet:dirty_aquamarine_tiles_slab" "item": "new_soviet:dirty_aquamarine_tiles_slab"
}, }
"show_notification": true
} }

View file

@ -1,19 +1,15 @@
{ {
"type": "minecraft:crafting_shaped", "type": "minecraft:crafting_shapeless",
"category": "building", "category": "building",
"key": { "ingredients": [
"#": { {
"item": "new_soviet:dirty_aquamarine_tiles" "item": "new_soviet:aquamarine_tiles_stairs"
}
}, },
"pattern": [ {
"# ", "item": "minecraft:dirt"
"## ", }
"###"
], ],
"result": { "result": {
"count": 4,
"item": "new_soviet:dirty_aquamarine_tiles_stairs" "item": "new_soviet:dirty_aquamarine_tiles_stairs"
}, }
"show_notification": true
} }

View file

@ -0,0 +1,15 @@
{
"type": "minecraft:crafting_shapeless",
"category": "building",
"ingredients": [
{
"item": "new_soviet:brick_tiles"
},
{
"item": "minecraft:dirt"
}
],
"result": {
"item": "new_soviet:dirty_brick_tiles"
}
}

View file

@ -1,17 +1,15 @@
{ {
"type": "minecraft:crafting_shaped", "type": "minecraft:crafting_shapeless",
"category": "building", "category": "building",
"key": { "ingredients": [
"#": { {
"item": "new_soviet:dirty_brick_tiles" "item": "new_soviet:brick_tiles_slab"
}
}, },
"pattern": [ {
"###" "item": "minecraft:dirt"
}
], ],
"result": { "result": {
"count": 6,
"item": "new_soviet:dirty_brick_tiles_slab" "item": "new_soviet:dirty_brick_tiles_slab"
}, }
"show_notification": true
} }

View file

@ -1,19 +1,15 @@
{ {
"type": "minecraft:crafting_shaped", "type": "minecraft:crafting_shapeless",
"category": "building", "category": "building",
"key": { "ingredients": [
"#": { {
"item": "new_soviet:dirty_brick_tiles" "item": "new_soviet:brick_tiles_stairs"
}
}, },
"pattern": [ {
"# ", "item": "minecraft:dirt"
"## ", }
"###"
], ],
"result": { "result": {
"count": 4,
"item": "new_soviet:dirty_brick_tiles_stairs" "item": "new_soviet:dirty_brick_tiles_stairs"
}, }
"show_notification": true
} }

View file

@ -0,0 +1,15 @@
{
"type": "minecraft:crafting_shapeless",
"category": "building",
"ingredients": [
{
"item": "new_soviet:dark_brick_tiles"
},
{
"item": "minecraft:dirt"
}
],
"result": {
"item": "new_soviet:dirty_dark_brick_tiles"
}
}

View file

@ -1,17 +1,15 @@
{ {
"type": "minecraft:crafting_shaped", "type": "minecraft:crafting_shapeless",
"category": "building", "category": "building",
"key": { "ingredients": [
"#": { {
"item": "new_soviet:dirty_dark_brick_tiles" "item": "new_soviet:dark_brick_tiles_slab"
}
}, },
"pattern": [ {
"###" "item": "minecraft:dirt"
}
], ],
"result": { "result": {
"count": 6,
"item": "new_soviet:dirty_dark_brick_tiles_slab" "item": "new_soviet:dirty_dark_brick_tiles_slab"
}, }
"show_notification": true
} }

View file

@ -1,19 +1,15 @@
{ {
"type": "minecraft:crafting_shaped", "type": "minecraft:crafting_shapeless",
"category": "building", "category": "building",
"key": { "ingredients": [
"#": { {
"item": "new_soviet:dirty_dark_brick_tiles" "item": "new_soviet:dark_brick_tiles_stairs"
}
}, },
"pattern": [ {
"# ", "item": "minecraft:dirt"
"## ", }
"###"
], ],
"result": { "result": {
"count": 4,
"item": "new_soviet:dirty_dark_brick_tiles_stairs" "item": "new_soviet:dirty_dark_brick_tiles_stairs"
}, }
"show_notification": true
} }

View file

@ -842,6 +842,13 @@ public class DataGeneration implements DataGeneratorEntrypoint {
FabricRecipeProvider.conditionsFromItem(output)).offerTo(exporter); FabricRecipeProvider.conditionsFromItem(output)).offerTo(exporter);
} }
private void dirtyRecipe(Consumer<RecipeJsonProvider> exporter, ItemConvertible output, ItemConvertible input) {
ShapelessRecipeJsonBuilder.create(RecipeCategory.BUILDING_BLOCKS, output).input(input).input(Items.DIRT).criterion(FabricRecipeProvider.hasItem(output),
FabricRecipeProvider.conditionsFromItem(output)).criterion(FabricRecipeProvider.hasItem(input),
FabricRecipeProvider.conditionsFromItem(output)).criterion(FabricRecipeProvider.hasItem(Items.DIRT),
FabricRecipeProvider.conditionsFromItem(output)).offerTo(exporter);
}
private void stoneCuttingCategory(Consumer<RecipeJsonProvider> exporter, List<ItemConvertible> category, RecipeCategory recipe_category) { private void stoneCuttingCategory(Consumer<RecipeJsonProvider> exporter, List<ItemConvertible> category, RecipeCategory recipe_category) {
for (int i = 0; i < category.size(); i++) { for (int i = 0; i < category.size(); i++) {
for (int j = 0; j < category.size(); j++) { for (int j = 0; j < category.size(); j++) {
@ -1079,6 +1086,18 @@ public class DataGeneration implements DataGeneratorEntrypoint {
mossRecipe(exporter, NSE_Blocks.MOSSY_BRICK_TILES, NSE_Blocks.BRICK_TILES); mossRecipe(exporter, NSE_Blocks.MOSSY_BRICK_TILES, NSE_Blocks.BRICK_TILES);
mossRecipe(exporter, NSE_Blocks.MOSSY_DARK_BRICK_TILES, NSE_Blocks.DARK_BRICK_TILES); mossRecipe(exporter, NSE_Blocks.MOSSY_DARK_BRICK_TILES, NSE_Blocks.DARK_BRICK_TILES);
// Dirty blocks recipe
dirtyRecipe(exporter, NSE_Blocks.DIRTY_AQUAMARINE_TILES, NSE_Blocks.AQUAMARINE_TILES);
dirtyRecipe(exporter, NSE_Blocks.DIRTY_AQUAMARINE_TILES_SLAB, NSE_Blocks.AQUAMARINE_TILES_SLAB);
dirtyRecipe(exporter, NSE_Blocks.DIRTY_AQUAMARINE_TILES_STAIRS, NSE_Blocks.AQUAMARINE_TILES_STAIRS);
dirtyRecipe(exporter, NSE_Blocks.DIRTY_BRICK_TILES, NSE_Blocks.BRICK_TILES);
dirtyRecipe(exporter, NSE_Blocks.DIRTY_BRICK_TILES_SLAB, NSE_Blocks.BRICK_TILES_SLAB);
dirtyRecipe(exporter, NSE_Blocks.DIRTY_BRICK_TILES_STAIRS, NSE_Blocks.BRICK_TILES_STAIRS);
dirtyRecipe(exporter, NSE_Blocks.DIRTY_DARK_BRICK_TILES, NSE_Blocks.DARK_BRICK_TILES);
dirtyRecipe(exporter, NSE_Blocks.DIRTY_DARK_BRICK_TILES_SLAB, NSE_Blocks.DARK_BRICK_TILES_SLAB);
dirtyRecipe(exporter, NSE_Blocks.DIRTY_DARK_BRICK_TILES_STAIRS, NSE_Blocks.DARK_BRICK_TILES_STAIRS);
// Warning stripes
warningStripeRecipe(exporter, NSE_Blocks.INDUSTRIAL_WARNING, Items.BLACK_DYE); warningStripeRecipe(exporter, NSE_Blocks.INDUSTRIAL_WARNING, Items.BLACK_DYE);
warningStripeRecipe(exporter, NSE_Blocks.RED_WARNING, Items.RED_DYE); warningStripeRecipe(exporter, NSE_Blocks.RED_WARNING, Items.RED_DYE);
warningStripeRecipe(exporter, NSE_Blocks.BLUE_WARNING, Items.BLUE_DYE); warningStripeRecipe(exporter, NSE_Blocks.BLUE_WARNING, Items.BLUE_DYE);
@ -1722,6 +1741,7 @@ public class DataGeneration implements DataGeneratorEntrypoint {
@Override @Override
public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) { public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) {
// BlockStateModelGenerator.createStairsBlockState(NSE_Blocks.SAND_TILES_STAIRS, new Identifier(NewSoviet.MOD_ID, "sand_tiles_stairs")); // BlockStateModelGenerator.createStairsBlockState(NSE_Blocks.SAND_TILES_STAIRS, new Identifier(NewSoviet.MOD_ID, "sand_tiles_stairs"));
} }