Testing GridRecipe for DataGen

This commit is contained in:
Frank 2023-04-08 15:01:56 +02:00
parent bd47215916
commit f60fcd02d5
31 changed files with 151 additions and 1749 deletions

View file

@ -1,47 +0,0 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_tag_iron_ingots": {
"conditions": {
"items": [
{
"tag": "c:iron_ingots"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "bclib:tag_bucket"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"display": {
"announce_to_chat": false,
"description": {
"translate": "advancements.bclib.recipes/decorations/tag_bucket.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "minecraft:bucket"
},
"show_toast": false,
"title": {
"translate": "advancements.bclib.recipes/decorations/tag_bucket.title"
}
},
"requirements": [
[
"has_tag_iron_ingots",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"bclib:tag_bucket"
]
}
}

View file

@ -1,47 +0,0 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_tag_iron_ingots": {
"conditions": {
"items": [
{
"tag": "c:iron_ingots"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "bclib:tag_cauldron"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"display": {
"announce_to_chat": false,
"description": {
"translate": "advancements.bclib.recipes/decorations/tag_cauldron.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "minecraft:cauldron"
},
"show_toast": false,
"title": {
"translate": "advancements.bclib.recipes/decorations/tag_cauldron.title"
}
},
"requirements": [
[
"has_tag_iron_ingots",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"bclib:tag_cauldron"
]
}
}

View file

@ -1,60 +0,0 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_4_redstone": {
"conditions": {
"items": [
{
"items": [
"minecraft:redstone"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_tag_iron_ingots": {
"conditions": {
"items": [
{
"tag": "c:iron_ingots"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "bclib:tag_compass"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"display": {
"announce_to_chat": false,
"description": {
"translate": "advancements.bclib.recipes/decorations/tag_compass.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "minecraft:compass"
},
"show_toast": false,
"title": {
"translate": "advancements.bclib.recipes/decorations/tag_compass.title"
}
},
"requirements": [
[
"has_tag_iron_ingots",
"has_4_redstone",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"bclib:tag_compass"
]
}
}

View file

@ -1,58 +0,0 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_tag_chest": {
"conditions": {
"items": [
{
"tag": "c:chest"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_tag_iron_ingots": {
"conditions": {
"items": [
{
"tag": "c:iron_ingots"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "bclib:tag_hopper"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"display": {
"announce_to_chat": false,
"description": {
"translate": "advancements.bclib.recipes/decorations/tag_hopper.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "minecraft:hopper"
},
"show_toast": false,
"title": {
"translate": "advancements.bclib.recipes/decorations/tag_hopper.title"
}
},
"requirements": [
[
"has_tag_iron_ingots",
"has_tag_chest",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"bclib:tag_hopper"
]
}
}

View file

@ -1,47 +0,0 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_tag_iron_ingots": {
"conditions": {
"items": [
{
"tag": "c:iron_ingots"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "bclib:tag_minecart"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"display": {
"announce_to_chat": false,
"description": {
"translate": "advancements.bclib.recipes/decorations/tag_minecart.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "minecraft:minecart"
},
"show_toast": false,
"title": {
"translate": "advancements.bclib.recipes/decorations/tag_minecart.title"
}
},
"requirements": [
[
"has_tag_iron_ingots",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"bclib:tag_minecart"
]
}
}

View file

@ -1,84 +0,0 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_0_redstone": {
"conditions": {
"items": [
{
"items": [
"minecraft:redstone"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_1_cobblestone": {
"conditions": {
"items": [
{
"items": [
"minecraft:cobblestone"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_tag_iron_ingots": {
"conditions": {
"items": [
{
"tag": "c:iron_ingots"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_tag_planks": {
"conditions": {
"items": [
{
"tag": "minecraft:planks"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "bclib:tag_piston"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"display": {
"announce_to_chat": false,
"description": {
"translate": "advancements.bclib.recipes/decorations/tag_piston.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "minecraft:piston"
},
"show_toast": false,
"title": {
"translate": "advancements.bclib.recipes/decorations/tag_piston.title"
}
},
"requirements": [
[
"has_tag_iron_ingots",
"has_0_redstone",
"has_1_cobblestone",
"has_tag_planks",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"bclib:tag_piston"
]
}
}

View file

@ -1,60 +0,0 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_2_stick": {
"conditions": {
"items": [
{
"items": [
"minecraft:stick"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_tag_iron_ingots": {
"conditions": {
"items": [
{
"tag": "c:iron_ingots"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "bclib:tag_rail"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"display": {
"announce_to_chat": false,
"description": {
"translate": "advancements.bclib.recipes/decorations/tag_rail.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "minecraft:rail"
},
"show_toast": false,
"title": {
"translate": "advancements.bclib.recipes/decorations/tag_rail.title"
}
},
"requirements": [
[
"has_tag_iron_ingots",
"has_2_stick",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"bclib:tag_rail"
]
}
}

View file

@ -1,59 +0,0 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_tag_iron_ingots": {
"conditions": {
"items": [
{
"tag": "c:iron_ingots"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_tag_planks": {
"conditions": {
"items": [
{
"tag": "minecraft:planks"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "bclib:tag_shield"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"display": {
"announce_to_chat": false,
"description": {
"translate": "advancements.bclib.recipes/decorations/tag_shield.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "minecraft:shield",
"nbt": "{Damage:0}"
},
"show_toast": false,
"title": {
"translate": "advancements.bclib.recipes/decorations/tag_shield.title"
}
},
"requirements": [
[
"has_tag_iron_ingots",
"has_tag_planks",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"bclib:tag_shield"
]
}
}

View file

@ -1,60 +0,0 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_5_shulker_shell": {
"conditions": {
"items": [
{
"items": [
"minecraft:shulker_shell"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_tag_chest": {
"conditions": {
"items": [
{
"tag": "c:chest"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "bclib:tag_shulker_box"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"display": {
"announce_to_chat": false,
"description": {
"translate": "advancements.bclib.recipes/decorations/tag_shulker_box.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "minecraft:shulker_box"
},
"show_toast": false,
"title": {
"translate": "advancements.bclib.recipes/decorations/tag_shulker_box.title"
}
},
"requirements": [
[
"has_5_shulker_shell",
"has_tag_chest",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"bclib:tag_shulker_box"
]
}
}

View file

@ -1,58 +0,0 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_tag_iron_ingots": {
"conditions": {
"items": [
{
"tag": "c:iron_ingots"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_tag_planks": {
"conditions": {
"items": [
{
"tag": "minecraft:planks"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "bclib:tag_smith_table"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"display": {
"announce_to_chat": false,
"description": {
"translate": "advancements.bclib.recipes/decorations/tag_smith_table.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "minecraft:smithing_table"
},
"show_toast": false,
"title": {
"translate": "advancements.bclib.recipes/decorations/tag_smith_table.title"
}
},
"requirements": [
[
"has_tag_planks",
"has_tag_iron_ingots",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"bclib:tag_smith_table"
]
}
}

View file

@ -1,60 +0,0 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_3_stone": {
"conditions": {
"items": [
{
"items": [
"minecraft:stone"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_tag_iron_ingots": {
"conditions": {
"items": [
{
"tag": "c:iron_ingots"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "bclib:tag_stonecutter"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"display": {
"announce_to_chat": false,
"description": {
"translate": "advancements.bclib.recipes/decorations/tag_stonecutter.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "minecraft:stonecutter"
},
"show_toast": false,
"title": {
"translate": "advancements.bclib.recipes/decorations/tag_stonecutter.title"
}
},
"requirements": [
[
"has_tag_iron_ingots",
"has_3_stone",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"bclib:tag_stonecutter"
]
}
}

View file

@ -1,737 +0,0 @@
{
"aquifers_enabled": false,
"default_block": {
"Name": "minecraft:netherrack"
},
"default_fluid": {
"Name": "minecraft:lava",
"Properties": {
"level": "0"
}
},
"disable_mob_generation": false,
"legacy_random_source": true,
"noise": {
"height": 256,
"min_y": 0,
"size_horizontal": 1,
"size_vertical": 4
},
"noise_router": {
"barrier": 0.0,
"continents": 0.0,
"depth": 0.0,
"erosion": 0.0,
"final_density": {
"type": "minecraft:squeeze",
"argument": {
"type": "minecraft:mul",
"argument1": 0.64,
"argument2": {
"type": "minecraft:interpolated",
"argument": {
"type": "minecraft:blend_density",
"argument": {
"type": "minecraft:add",
"argument1": 2.5,
"argument2": {
"type": "minecraft:mul",
"argument1": {
"type": "minecraft:y_clamped_gradient",
"from_value": 0.0,
"from_y": -8,
"to_value": 1.0,
"to_y": 24
},
"argument2": {
"type": "minecraft:add",
"argument1": -2.5,
"argument2": {
"type": "minecraft:add",
"argument1": 0.9375,
"argument2": {
"type": "minecraft:mul",
"argument1": {
"type": "minecraft:y_clamped_gradient",
"from_value": 1.0,
"from_y": 232,
"to_value": 0.0,
"to_y": 256
},
"argument2": {
"type": "minecraft:add",
"argument1": -0.9375,
"argument2": "minecraft:nether/base_3d_noise"
}
}
}
}
}
}
}
}
}
},
"fluid_level_floodedness": 0.0,
"fluid_level_spread": 0.0,
"initial_density_without_jaggedness": 0.0,
"lava": 0.0,
"ridges": 0.0,
"temperature": {
"type": "minecraft:shifted_noise",
"noise": "minecraft:temperature",
"shift_x": "minecraft:shift_x",
"shift_y": 0.0,
"shift_z": "minecraft:shift_z",
"xz_scale": 0.25,
"y_scale": 0.0
},
"vegetation": {
"type": "minecraft:shifted_noise",
"noise": "minecraft:vegetation",
"shift_x": "minecraft:shift_x",
"shift_y": 0.0,
"shift_z": "minecraft:shift_z",
"xz_scale": 0.25,
"y_scale": 0.0
},
"vein_gap": 0.0,
"vein_ridged": 0.0,
"vein_toggle": 0.0
},
"ore_veins_enabled": false,
"sea_level": 32,
"spawn_target": [],
"surface_rule": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:vertical_gradient",
"false_at_and_above": {
"above_bottom": 5
},
"random_name": "minecraft:bedrock_floor",
"true_at_and_below": {
"above_bottom": 0
}
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:bedrock"
}
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:not",
"invert": {
"type": "minecraft:vertical_gradient",
"false_at_and_above": {
"below_top": 0
},
"random_name": "minecraft:bedrock_roof",
"true_at_and_below": {
"below_top": 5
}
}
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:bedrock"
}
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:y_above",
"add_stone_depth": false,
"anchor": {
"below_top": 5
},
"surface_depth_multiplier": 0
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:netherrack"
}
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:biome",
"biome_is": [
"minecraft:basalt_deltas"
]
},
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:stone_depth",
"add_surface_depth": true,
"offset": 0,
"secondary_depth_range": 0,
"surface_type": "ceiling"
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:basalt",
"Properties": {
"axis": "y"
}
}
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:stone_depth",
"add_surface_depth": true,
"offset": 0,
"secondary_depth_range": 0,
"surface_type": "floor"
},
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:noise_threshold",
"max_threshold": 1.7976931348623157E308,
"min_threshold": -0.012,
"noise": "minecraft:patch"
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:y_above",
"add_stone_depth": true,
"anchor": {
"absolute": 30
},
"surface_depth_multiplier": 0
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:not",
"invert": {
"type": "minecraft:y_above",
"add_stone_depth": true,
"anchor": {
"absolute": 35
},
"surface_depth_multiplier": 0
}
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:gravel"
}
}
}
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:noise_threshold",
"max_threshold": 1.7976931348623157E308,
"min_threshold": 0.0,
"noise": "minecraft:nether_state_selector"
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:basalt",
"Properties": {
"axis": "y"
}
}
}
},
{
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:blackstone"
}
}
]
}
}
]
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:biome",
"biome_is": [
"minecraft:soul_sand_valley"
]
},
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:stone_depth",
"add_surface_depth": true,
"offset": 0,
"secondary_depth_range": 0,
"surface_type": "ceiling"
},
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:noise_threshold",
"max_threshold": 1.7976931348623157E308,
"min_threshold": 0.0,
"noise": "minecraft:nether_state_selector"
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:soul_sand"
}
}
},
{
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:soul_soil"
}
}
]
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:stone_depth",
"add_surface_depth": true,
"offset": 0,
"secondary_depth_range": 0,
"surface_type": "floor"
},
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:noise_threshold",
"max_threshold": 1.7976931348623157E308,
"min_threshold": -0.012,
"noise": "minecraft:patch"
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:y_above",
"add_stone_depth": true,
"anchor": {
"absolute": 30
},
"surface_depth_multiplier": 0
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:not",
"invert": {
"type": "minecraft:y_above",
"add_stone_depth": true,
"anchor": {
"absolute": 35
},
"surface_depth_multiplier": 0
}
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:gravel"
}
}
}
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:noise_threshold",
"max_threshold": 1.7976931348623157E308,
"min_threshold": 0.0,
"noise": "minecraft:nether_state_selector"
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:soul_sand"
}
}
},
{
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:soul_soil"
}
}
]
}
}
]
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:stone_depth",
"add_surface_depth": false,
"offset": 0,
"secondary_depth_range": 0,
"surface_type": "floor"
},
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:not",
"invert": {
"type": "minecraft:y_above",
"add_stone_depth": false,
"anchor": {
"absolute": 32
},
"surface_depth_multiplier": 0
}
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:hole"
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:lava",
"Properties": {
"level": "0"
}
}
}
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:biome",
"biome_is": [
"minecraft:warped_forest"
]
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:not",
"invert": {
"type": "minecraft:noise_threshold",
"max_threshold": 1.7976931348623157E308,
"min_threshold": 0.54,
"noise": "minecraft:netherrack"
}
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:y_above",
"add_stone_depth": false,
"anchor": {
"absolute": 31
},
"surface_depth_multiplier": 0
},
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:noise_threshold",
"max_threshold": 1.7976931348623157E308,
"min_threshold": 1.17,
"noise": "minecraft:nether_wart"
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:warped_wart_block"
}
}
},
{
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:warped_nylium"
}
}
]
}
}
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:biome",
"biome_is": [
"minecraft:crimson_forest"
]
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:not",
"invert": {
"type": "minecraft:noise_threshold",
"max_threshold": 1.7976931348623157E308,
"min_threshold": 0.54,
"noise": "minecraft:netherrack"
}
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:y_above",
"add_stone_depth": false,
"anchor": {
"absolute": 31
},
"surface_depth_multiplier": 0
},
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:noise_threshold",
"max_threshold": 1.7976931348623157E308,
"min_threshold": 1.17,
"noise": "minecraft:nether_wart"
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:nether_wart_block"
}
}
},
{
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:crimson_nylium"
}
}
]
}
}
}
}
]
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:biome",
"biome_is": [
"minecraft:nether_wastes"
]
},
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:stone_depth",
"add_surface_depth": true,
"offset": 0,
"secondary_depth_range": 0,
"surface_type": "floor"
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:noise_threshold",
"max_threshold": 1.7976931348623157E308,
"min_threshold": -0.012,
"noise": "minecraft:soul_sand_layer"
},
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:not",
"invert": {
"type": "minecraft:hole"
}
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:y_above",
"add_stone_depth": true,
"anchor": {
"absolute": 30
},
"surface_depth_multiplier": 0
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:not",
"invert": {
"type": "minecraft:y_above",
"add_stone_depth": true,
"anchor": {
"absolute": 35
},
"surface_depth_multiplier": 0
}
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:soul_sand"
}
}
}
}
},
{
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:netherrack"
}
}
]
}
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:stone_depth",
"add_surface_depth": false,
"offset": 0,
"secondary_depth_range": 0,
"surface_type": "floor"
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:y_above",
"add_stone_depth": false,
"anchor": {
"absolute": 31
},
"surface_depth_multiplier": 0
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:not",
"invert": {
"type": "minecraft:y_above",
"add_stone_depth": true,
"anchor": {
"absolute": 35
},
"surface_depth_multiplier": 0
}
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:noise_threshold",
"max_threshold": 1.7976931348623157E308,
"min_threshold": -0.012,
"noise": "minecraft:gravel_layer"
},
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:y_above",
"add_stone_depth": false,
"anchor": {
"absolute": 32
},
"surface_depth_multiplier": 0
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:gravel"
}
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:not",
"invert": {
"type": "minecraft:hole"
}
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:gravel"
}
}
}
]
}
}
}
}
}
]
}
},
{
"type": "minecraft:block",
"result_state": {
"Name": "minecraft:netherrack"
}
}
]
}
}

View file

@ -1,55 +0,0 @@
{
"dimensions": {
"minecraft:overworld": {
"type": "minecraft:overworld",
"generator": {
"type": "minecraft:noise",
"biome_source": {
"type": "minecraft:multi_noise",
"preset": "minecraft:overworld"
},
"settings": "minecraft:amplified"
}
},
"minecraft:the_end": {
"type": "minecraft:the_end",
"generator": {
"type": "bclib:betterx",
"biome_source": {
"type": "bclib:end_biome_source",
"config": {
"barrens_biomes_size": 256,
"center_biomes_size": 256,
"generator_version": "paulevs",
"inner_void_radius_squared": 1048576,
"land_biomes_size": 256,
"map_type": "hex",
"void_biomes_size": 256,
"with_void_biomes": true
},
"seed": 0
},
"settings": "minecraft:end"
}
},
"minecraft:the_nether": {
"type": "minecraft:the_nether",
"generator": {
"type": "bclib:betterx",
"biome_source": {
"type": "bclib:nether_biome_source",
"config": {
"amplified": true,
"biome_size": 256,
"biome_size_vertical": 128,
"map_type": "hex",
"use_vertical_biomes": true
},
"seed": 0
},
"settings": "bclib:amplified_nether"
}
}
},
"sort_order": 1000
}

View file

@ -1,55 +0,0 @@
{
"dimensions": {
"minecraft:overworld": {
"type": "minecraft:overworld",
"generator": {
"type": "minecraft:noise",
"biome_source": {
"type": "minecraft:multi_noise",
"preset": "minecraft:overworld"
},
"settings": "minecraft:large_biomes"
}
},
"minecraft:the_end": {
"type": "minecraft:the_end",
"generator": {
"type": "bclib:betterx",
"biome_source": {
"type": "bclib:end_biome_source",
"config": {
"barrens_biomes_size": 512,
"center_biomes_size": 256,
"generator_version": "paulevs",
"inner_void_radius_squared": 1048576,
"land_biomes_size": 1024,
"map_type": "hex",
"void_biomes_size": 512,
"with_void_biomes": true
},
"seed": 0
},
"settings": "minecraft:end"
}
},
"minecraft:the_nether": {
"type": "minecraft:the_nether",
"generator": {
"type": "bclib:betterx",
"biome_source": {
"type": "bclib:nether_biome_source",
"config": {
"amplified": false,
"biome_size": 1024,
"biome_size_vertical": 172,
"map_type": "hex",
"use_vertical_biomes": true
},
"seed": 0
},
"settings": "minecraft:nether"
}
}
},
"sort_order": 1000
}

View file

@ -1,55 +0,0 @@
{
"dimensions": {
"minecraft:overworld": {
"type": "minecraft:overworld",
"generator": {
"type": "minecraft:noise",
"biome_source": {
"type": "minecraft:multi_noise",
"preset": "minecraft:overworld"
},
"settings": "minecraft:overworld"
}
},
"minecraft:the_end": {
"type": "minecraft:the_end",
"generator": {
"type": "bclib:betterx",
"biome_source": {
"type": "bclib:end_biome_source",
"config": {
"barrens_biomes_size": 256,
"center_biomes_size": 256,
"generator_version": "paulevs",
"inner_void_radius_squared": 1048576,
"land_biomes_size": 256,
"map_type": "square",
"void_biomes_size": 256,
"with_void_biomes": true
},
"seed": 0
},
"settings": "minecraft:end"
}
},
"minecraft:the_nether": {
"type": "minecraft:the_nether",
"generator": {
"type": "bclib:betterx",
"biome_source": {
"type": "bclib:nether_biome_source",
"config": {
"amplified": false,
"biome_size": 256,
"biome_size_vertical": 86,
"map_type": "square",
"use_vertical_biomes": true
},
"seed": 0
},
"settings": "minecraft:nether"
}
}
},
"sort_order": 1000
}

View file

@ -1,55 +0,0 @@
{
"dimensions": {
"minecraft:overworld": {
"type": "minecraft:overworld",
"generator": {
"type": "minecraft:noise",
"biome_source": {
"type": "minecraft:multi_noise",
"preset": "minecraft:overworld"
},
"settings": "minecraft:overworld"
}
},
"minecraft:the_end": {
"type": "minecraft:the_end",
"generator": {
"type": "bclib:betterx",
"biome_source": {
"type": "bclib:end_biome_source",
"config": {
"barrens_biomes_size": 256,
"center_biomes_size": 256,
"generator_version": "paulevs",
"inner_void_radius_squared": 1048576,
"land_biomes_size": 256,
"map_type": "hex",
"void_biomes_size": 256,
"with_void_biomes": true
},
"seed": 0
},
"settings": "minecraft:end"
}
},
"minecraft:the_nether": {
"type": "minecraft:the_nether",
"generator": {
"type": "bclib:betterx",
"biome_source": {
"type": "bclib:nether_biome_source",
"config": {
"amplified": false,
"biome_size": 256,
"biome_size_vertical": 86,
"map_type": "hex",
"use_vertical_biomes": true
},
"seed": 0
},
"settings": "minecraft:nether"
}
}
},
"sort_order": 1000
}

View file

@ -1,8 +0,0 @@
{
"replace": false,
"values": [
"bclib:normal",
"bclib:amplified",
"bclib:large"
]
}

View file

@ -1,10 +0,0 @@
{
"type": "bclib:biome",
"biome": "minecraft:basalt_deltas",
"edgeSize": 0,
"fogDensity": 1.0,
"genChance": 1.0,
"intended_for": "OTHER_NETHER",
"terrainHeight": 0.1,
"vertical": false
}

View file

@ -1,10 +0,0 @@
{
"type": "bclib:biome",
"biome": "minecraft:crimson_forest",
"edgeSize": 0,
"fogDensity": 1.0,
"genChance": 1.0,
"intended_for": "OTHER_NETHER",
"terrainHeight": 0.1,
"vertical": false
}

View file

@ -1,10 +0,0 @@
{
"type": "bclib:biome",
"biome": "minecraft:end_barrens",
"edgeSize": 0,
"fogDensity": 1.0,
"genChance": 1.0,
"intended_for": "OTHER_END_BARRENS",
"terrainHeight": 0.1,
"vertical": false
}

View file

@ -1,11 +0,0 @@
{
"type": "bclib:biome",
"biome": "minecraft:end_highlands",
"edge": "minecraft:end_midlands",
"edgeSize": 8,
"fogDensity": 1.0,
"genChance": 0.5,
"intended_for": "OTHER_END_LAND",
"terrainHeight": 0.1,
"vertical": false
}

View file

@ -1,11 +0,0 @@
{
"type": "bclib:biome",
"parent": "minecraft:end_highlands",
"biome": "minecraft:end_midlands",
"edgeSize": 0,
"fogDensity": 1.0,
"genChance": 0.5,
"intended_for": "OTHER_END_LAND",
"terrainHeight": 0.1,
"vertical": false
}

View file

@ -1,10 +0,0 @@
{
"type": "bclib:biome",
"biome": "minecraft:nether_wastes",
"edgeSize": 0,
"fogDensity": 1.0,
"genChance": 1.0,
"intended_for": "OTHER_NETHER",
"terrainHeight": 0.1,
"vertical": false
}

View file

@ -1,10 +0,0 @@
{
"type": "bclib:biome",
"biome": "minecraft:small_end_islands",
"edgeSize": 0,
"fogDensity": 1.0,
"genChance": 1.0,
"intended_for": "OTHER_END_VOID",
"terrainHeight": 0.1,
"vertical": false
}

View file

@ -1,10 +0,0 @@
{
"type": "bclib:biome",
"biome": "minecraft:soul_sand_valley",
"edgeSize": 0,
"fogDensity": 1.0,
"genChance": 1.0,
"intended_for": "OTHER_NETHER",
"terrainHeight": 0.1,
"vertical": false
}

View file

@ -1,10 +0,0 @@
{
"type": "bclib:biome",
"biome": "minecraft:the_end",
"edgeSize": 0,
"fogDensity": 1.0,
"genChance": 1.0,
"intended_for": "OTHER_END_CENTER",
"terrainHeight": 0.1,
"vertical": false
}

View file

@ -1,10 +0,0 @@
{
"type": "bclib:biome",
"biome": "minecraft:the_void",
"edgeSize": 0,
"fogDensity": 1.0,
"genChance": 1.0,
"intended_for": "NONE",
"terrainHeight": 0.1,
"vertical": false
}

View file

@ -1,10 +0,0 @@
{
"type": "bclib:biome",
"biome": "minecraft:warped_forest",
"edgeSize": 0,
"fogDensity": 1.0,
"genChance": 1.0,
"intended_for": "OTHER_NETHER",
"terrainHeight": 0.1,
"vertical": false
}

View file

@ -4,18 +4,24 @@ import org.betterx.bclib.BCLib;
import org.betterx.bclib.config.PathConfig; import org.betterx.bclib.config.PathConfig;
import net.minecraft.core.NonNullList; import net.minecraft.core.NonNullList;
import net.minecraft.data.recipes.*;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey; import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item; import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items; import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.*; import net.minecraft.world.item.crafting.CraftingRecipe;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.crafting.RecipeType;
import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.ItemLike;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.function.Consumer;
public class GridRecipe extends AbstractAdvancementRecipe { public class GridRecipe extends AbstractAdvancementRecipe {
private static final GridRecipe INSTANCE = new GridRecipe(); private static final GridRecipe INSTANCE = new GridRecipe();
@ -28,10 +34,12 @@ public class GridRecipe extends AbstractAdvancementRecipe {
private boolean shaped; private boolean shaped;
private String[] shape; private String[] shape;
private final Map<Character, Ingredient> materialKeys = Maps.newHashMap(); private final Map<Character, Ingredient> materialKeys = Maps.newHashMap();
private final Map<Character, TagKey<Item>> materialTagKeys = Maps.newHashMap();
private int count; private int count;
private boolean showNotification;
private boolean exist; private boolean exist;
protected CraftingBookCategory bookCategory; protected RecipeCategory bookCategory;
private GridRecipe() { private GridRecipe() {
} }
@ -43,21 +51,25 @@ public class GridRecipe extends AbstractAdvancementRecipe {
* @param output * @param output
* @return * @return
*/ */
private GridRecipe(ResourceLocation id, ItemLike output) {
this.id = id;
this.output = output;
this.group = "";
this.type = RecipeType.CRAFTING;
this.shaped = true;
this.showNotification = true;
this.shape = new String[]{"#"};
this.materialKeys.clear();
this.count = 1;
this.bookCategory = RecipeCategory.MISC;
this.exist = output != null && BCLRecipeManager.exists(output);
this.createAdvancement(id, output);
}
static GridRecipe make(ResourceLocation id, ItemLike output) { static GridRecipe make(ResourceLocation id, ItemLike output) {
INSTANCE.id = id; return new GridRecipe(id, output);
INSTANCE.output = output;
INSTANCE.group = "";
INSTANCE.type = RecipeType.CRAFTING;
INSTANCE.shaped = true;
INSTANCE.shape = new String[]{"#"};
INSTANCE.materialKeys.clear();
INSTANCE.count = 1;
INSTANCE.bookCategory = CraftingBookCategory.MISC;
INSTANCE.exist = output != null && BCLRecipeManager.exists(output);
INSTANCE.createAdvancement(id, output);
return INSTANCE;
} }
public GridRecipe checkConfig(PathConfig config) { public GridRecipe checkConfig(PathConfig config) {
@ -83,7 +95,8 @@ public class GridRecipe extends AbstractAdvancementRecipe {
public GridRecipe addMaterial(char key, TagKey<Item> value) { public GridRecipe addMaterial(char key, TagKey<Item> value) {
unlockedBy(value); unlockedBy(value);
return addMaterial(key, Ingredient.of(value)); materialTagKeys.put(key, value);
return this;
} }
public GridRecipe addMaterial(char key, ItemStack... values) { public GridRecipe addMaterial(char key, ItemStack... values) {
@ -109,6 +122,11 @@ public class GridRecipe extends AbstractAdvancementRecipe {
return this; return this;
} }
public GridRecipe showNotification(boolean showNotification) {
this.showNotification = showNotification;
return this;
}
private NonNullList<Ingredient> getMaterials(int width, int height) { private NonNullList<Ingredient> getMaterials(int width, int height) {
NonNullList<Ingredient> materials = NonNullList.withSize(width * height, Ingredient.EMPTY); NonNullList<Ingredient> materials = NonNullList.withSize(width * height, Ingredient.EMPTY);
int pos = 0; int pos = 0;
@ -116,7 +134,9 @@ public class GridRecipe extends AbstractAdvancementRecipe {
for (String line : shape) { for (String line : shape) {
for (int i = 0; i < width; i++) { for (int i = 0; i < width; i++) {
char c = line.charAt(i); char c = line.charAt(i);
Ingredient material = materialKeys.get(c); Ingredient material = materialKeys.containsKey(c)
? materialKeys.get(c)
: Ingredient.of(materialTagKeys.get(c));
if (material != null && !material.isEmpty()) hasNonEmpty = true; if (material != null && !material.isEmpty()) hasNonEmpty = true;
materials.set(pos++, material == null ? Ingredient.EMPTY : material); materials.set(pos++, material == null ? Ingredient.EMPTY : material);
} }
@ -125,13 +145,29 @@ public class GridRecipe extends AbstractAdvancementRecipe {
return materials; return materials;
} }
public GridRecipe setCraftingBookCategory(CraftingBookCategory c) { public GridRecipe setCategory(RecipeCategory c) {
bookCategory = c; bookCategory = c;
return this; return this;
} }
private static List<GridRecipe> RECIPES;
public void build() { public GridRecipe build() {
if (RECIPES == null) RECIPES = new ArrayList<>();
RECIPES.add(this);
return this;
}
public static void registerRecipes(Consumer<FinishedRecipe> cc) {
if (RECIPES == null) return;
for (var r : RECIPES) {
r.build(cc);
}
RECIPES.clear();
}
public void build(Consumer<FinishedRecipe> cc) {
if (!exist) { if (!exist) {
BCLib.LOGGER.warning("Unable to build Recipe " + id); BCLib.LOGGER.warning("Unable to build Recipe " + id);
return; return;
@ -144,23 +180,70 @@ public class GridRecipe extends AbstractAdvancementRecipe {
BCLib.LOGGER.warning("Unable to build Recipe " + id + ": Result is AIR"); BCLib.LOGGER.warning("Unable to build Recipe " + id + ": Result is AIR");
return; return;
} }
NonNullList<Ingredient> materials = this.getMaterials(width, height); NonNullList<Ingredient> materials = this.getMaterials(width, height);
if (materials == null || materials.isEmpty()) { if (materials == null || materials.isEmpty()) {
BCLib.LOGGER.warning("Unable to build Recipe " + id + ": Empty Material List"); BCLib.LOGGER.warning("Unable to build Recipe " + id + ": Empty Material List");
return; return;
} }
CraftingRecipe recipe = shaped ? new ShapedRecipe( if (shaped) {
id, final ShapedRecipeBuilder builder = ShapedRecipeBuilder
group, .shaped(bookCategory, output, count)
bookCategory, .group(group)
width, .showNotification(showNotification);
height,
materials,
result
) : new ShapelessRecipe(id, group, bookCategory, result, materials);
BCLRecipeManager.addRecipe(type, recipe); for (String row : this.shape) {
registerAdvancement(recipe, output); builder.pattern(row);
}
for (Map.Entry<Character, Ingredient> in : materialKeys.entrySet()) {
Arrays
.stream(in.getValue().getItems())
.filter(i -> i.getCount() > 0)
.forEach(stack -> builder.unlockedBy(
"has_" + stack.getDescriptionId(),
RecipeProvider.has(stack.getItem())
));
builder.define(in.getKey(), in.getValue());
}
for (Map.Entry<Character, TagKey<Item>> in : materialTagKeys.entrySet()) {
builder.unlockedBy(
"has_tag_" + in.getValue().location().getNamespace() + "_" + in.getValue().location().getPath(),
RecipeProvider.has(in.getValue())
);
builder.define(in.getKey(), in.getValue());
}
builder.save(cc, id);
} else {
final ShapelessRecipeBuilder builder = ShapelessRecipeBuilder
.shapeless(bookCategory, output, count)
.group(group);
for (Map.Entry<Character, Ingredient> in : materialKeys.entrySet()) {
Arrays
.stream(in.getValue().getItems())
.filter(i -> i.getCount() > 0)
.forEach(stack -> builder.unlockedBy(
"has_" + stack.getDescriptionId(),
RecipeProvider.has(stack.getItem())
));
builder.requires(in.getValue());
}
for (Map.Entry<Character, TagKey<Item>> in : materialTagKeys.entrySet()) {
builder.unlockedBy(
"has_tag_" + in.getValue().location().getNamespace() + "_" + in.getValue().location().getPath(),
RecipeProvider.has(in.getValue())
);
builder.requires(in.getValue());
}
builder.save(cc, id);
}
} }
} }

View file

@ -4,6 +4,7 @@ import org.betterx.bclib.BCLib;
import org.betterx.datagen.bclib.advancement.BCLAdvancementDataProvider; import org.betterx.datagen.bclib.advancement.BCLAdvancementDataProvider;
import org.betterx.datagen.bclib.preset.WorldPresetDataProvider; import org.betterx.datagen.bclib.preset.WorldPresetDataProvider;
import org.betterx.datagen.bclib.tests.TestBiomes; import org.betterx.datagen.bclib.tests.TestBiomes;
import org.betterx.datagen.bclib.tests.TestRecipes;
import org.betterx.datagen.bclib.tests.TestWorldgenProvider; import org.betterx.datagen.bclib.tests.TestWorldgenProvider;
import org.betterx.datagen.bclib.worldgen.BCLibRegistriesDataProvider; import org.betterx.datagen.bclib.worldgen.BCLibRegistriesDataProvider;
@ -13,7 +14,7 @@ import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
public class BCLibDatagen implements DataGeneratorEntrypoint { public class BCLibDatagen implements DataGeneratorEntrypoint {
public static final boolean ADD_TESTS = false; public static final boolean ADD_TESTS = true;
@Override @Override
public void onInitializeDataGenerator(FabricDataGenerator dataGenerator) { public void onInitializeDataGenerator(FabricDataGenerator dataGenerator) {
@ -23,6 +24,7 @@ public class BCLibDatagen implements DataGeneratorEntrypoint {
if (ADD_TESTS) { if (ADD_TESTS) {
pack.addProvider(TestWorldgenProvider::new); pack.addProvider(TestWorldgenProvider::new);
pack.addProvider(TestBiomes::new); pack.addProvider(TestBiomes::new);
pack.addProvider(TestRecipes::new);
} }
pack.addProvider(WorldPresetDataProvider::new); pack.addProvider(WorldPresetDataProvider::new);

View file

@ -0,0 +1,34 @@
package org.betterx.datagen.bclib.tests;
import org.betterx.bclib.BCLib;
import org.betterx.bclib.recipes.BCLRecipeBuilder;
import org.betterx.bclib.recipes.GridRecipe;
import net.minecraft.data.recipes.FinishedRecipe;
import net.minecraft.data.recipes.RecipeCategory;
import net.minecraft.world.item.Items;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider;
import java.util.function.Consumer;
public class TestRecipes extends FabricRecipeProvider {
public TestRecipes(FabricDataOutput output) {
super(output);
}
final GridRecipe WONDER = BCLRecipeBuilder
.crafting(BCLib.makeID("test_star"), Items.NETHER_STAR)
.setOutputCount(1)
.setShape("ggg", "glg", "ggg")
.addMaterial('g', Items.GLASS_PANE)
.addMaterial('l', Items.LAPIS_LAZULI)
.setCategory(RecipeCategory.TOOLS)
.build();
@Override
public void buildRecipes(Consumer<FinishedRecipe> exporter) {
GridRecipe.registerRecipes(exporter);
}
}