diff --git a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_bucket.json b/src/main/generated/data/bclib/advancements/recipes/decorations/tag_bucket.json deleted file mode 100644 index 72d3a54d..00000000 --- a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_bucket.json +++ /dev/null @@ -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" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_cauldron.json b/src/main/generated/data/bclib/advancements/recipes/decorations/tag_cauldron.json deleted file mode 100644 index c30f88d7..00000000 --- a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_cauldron.json +++ /dev/null @@ -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" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_compass.json b/src/main/generated/data/bclib/advancements/recipes/decorations/tag_compass.json deleted file mode 100644 index dc65a797..00000000 --- a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_compass.json +++ /dev/null @@ -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" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_hopper.json b/src/main/generated/data/bclib/advancements/recipes/decorations/tag_hopper.json deleted file mode 100644 index 05cd1428..00000000 --- a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_hopper.json +++ /dev/null @@ -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" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_minecart.json b/src/main/generated/data/bclib/advancements/recipes/decorations/tag_minecart.json deleted file mode 100644 index 7959629f..00000000 --- a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_minecart.json +++ /dev/null @@ -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" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_piston.json b/src/main/generated/data/bclib/advancements/recipes/decorations/tag_piston.json deleted file mode 100644 index 1ca254bf..00000000 --- a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_piston.json +++ /dev/null @@ -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" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_rail.json b/src/main/generated/data/bclib/advancements/recipes/decorations/tag_rail.json deleted file mode 100644 index b2c6dc96..00000000 --- a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_rail.json +++ /dev/null @@ -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" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_shield.json b/src/main/generated/data/bclib/advancements/recipes/decorations/tag_shield.json deleted file mode 100644 index 8a803e64..00000000 --- a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_shield.json +++ /dev/null @@ -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" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_shulker_box.json b/src/main/generated/data/bclib/advancements/recipes/decorations/tag_shulker_box.json deleted file mode 100644 index f8344027..00000000 --- a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_shulker_box.json +++ /dev/null @@ -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" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_smith_table.json b/src/main/generated/data/bclib/advancements/recipes/decorations/tag_smith_table.json deleted file mode 100644 index 7717b303..00000000 --- a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_smith_table.json +++ /dev/null @@ -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" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_stonecutter.json b/src/main/generated/data/bclib/advancements/recipes/decorations/tag_stonecutter.json deleted file mode 100644 index 5efb75ae..00000000 --- a/src/main/generated/data/bclib/advancements/recipes/decorations/tag_stonecutter.json +++ /dev/null @@ -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" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/worldgen/noise_settings/amplified_nether.json b/src/main/generated/data/bclib/worldgen/noise_settings/amplified_nether.json deleted file mode 100644 index af1d8561..00000000 --- a/src/main/generated/data/bclib/worldgen/noise_settings/amplified_nether.json +++ /dev/null @@ -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" - } - } - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/worldgen/world_preset/amplified.json b/src/main/generated/data/bclib/worldgen/world_preset/amplified.json deleted file mode 100644 index 122dcc41..00000000 --- a/src/main/generated/data/bclib/worldgen/world_preset/amplified.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/worldgen/world_preset/large.json b/src/main/generated/data/bclib/worldgen/world_preset/large.json deleted file mode 100644 index be05265c..00000000 --- a/src/main/generated/data/bclib/worldgen/world_preset/large.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/worldgen/world_preset/legacy_17.json b/src/main/generated/data/bclib/worldgen/world_preset/legacy_17.json deleted file mode 100644 index 3db83a28..00000000 --- a/src/main/generated/data/bclib/worldgen/world_preset/legacy_17.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/generated/data/bclib/worldgen/world_preset/normal.json b/src/main/generated/data/bclib/worldgen/world_preset/normal.json deleted file mode 100644 index 6b80def1..00000000 --- a/src/main/generated/data/bclib/worldgen/world_preset/normal.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/tags/worldgen/world_preset/normal.json b/src/main/generated/data/minecraft/tags/worldgen/world_preset/normal.json deleted file mode 100644 index 7ae335c2..00000000 --- a/src/main/generated/data/minecraft/tags/worldgen/world_preset/normal.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "replace": false, - "values": [ - "bclib:normal", - "bclib:amplified", - "bclib:large" - ] -} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/worldgen/betterx/biome/basalt_deltas.json b/src/main/generated/data/minecraft/worldgen/betterx/biome/basalt_deltas.json deleted file mode 100644 index 956593b1..00000000 --- a/src/main/generated/data/minecraft/worldgen/betterx/biome/basalt_deltas.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/worldgen/betterx/biome/crimson_forest.json b/src/main/generated/data/minecraft/worldgen/betterx/biome/crimson_forest.json deleted file mode 100644 index 724df855..00000000 --- a/src/main/generated/data/minecraft/worldgen/betterx/biome/crimson_forest.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/worldgen/betterx/biome/end_barrens.json b/src/main/generated/data/minecraft/worldgen/betterx/biome/end_barrens.json deleted file mode 100644 index 19c80d2f..00000000 --- a/src/main/generated/data/minecraft/worldgen/betterx/biome/end_barrens.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/worldgen/betterx/biome/end_highlands.json b/src/main/generated/data/minecraft/worldgen/betterx/biome/end_highlands.json deleted file mode 100644 index 5d82aa48..00000000 --- a/src/main/generated/data/minecraft/worldgen/betterx/biome/end_highlands.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/worldgen/betterx/biome/end_midlands.json b/src/main/generated/data/minecraft/worldgen/betterx/biome/end_midlands.json deleted file mode 100644 index eebd9660..00000000 --- a/src/main/generated/data/minecraft/worldgen/betterx/biome/end_midlands.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/worldgen/betterx/biome/nether_wastes.json b/src/main/generated/data/minecraft/worldgen/betterx/biome/nether_wastes.json deleted file mode 100644 index 71aaebde..00000000 --- a/src/main/generated/data/minecraft/worldgen/betterx/biome/nether_wastes.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/worldgen/betterx/biome/small_end_islands.json b/src/main/generated/data/minecraft/worldgen/betterx/biome/small_end_islands.json deleted file mode 100644 index 23fc086d..00000000 --- a/src/main/generated/data/minecraft/worldgen/betterx/biome/small_end_islands.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/worldgen/betterx/biome/soul_sand_valley.json b/src/main/generated/data/minecraft/worldgen/betterx/biome/soul_sand_valley.json deleted file mode 100644 index 6a341bdb..00000000 --- a/src/main/generated/data/minecraft/worldgen/betterx/biome/soul_sand_valley.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/worldgen/betterx/biome/the_end.json b/src/main/generated/data/minecraft/worldgen/betterx/biome/the_end.json deleted file mode 100644 index 35673a72..00000000 --- a/src/main/generated/data/minecraft/worldgen/betterx/biome/the_end.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/worldgen/betterx/biome/the_void.json b/src/main/generated/data/minecraft/worldgen/betterx/biome/the_void.json deleted file mode 100644 index 4c7fca75..00000000 --- a/src/main/generated/data/minecraft/worldgen/betterx/biome/the_void.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/worldgen/betterx/biome/warped_forest.json b/src/main/generated/data/minecraft/worldgen/betterx/biome/warped_forest.json deleted file mode 100644 index 7d9f1fe6..00000000 --- a/src/main/generated/data/minecraft/worldgen/betterx/biome/warped_forest.json +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/src/main/java/org/betterx/bclib/recipes/GridRecipe.java b/src/main/java/org/betterx/bclib/recipes/GridRecipe.java index 34beeb1a..edee418b 100644 --- a/src/main/java/org/betterx/bclib/recipes/GridRecipe.java +++ b/src/main/java/org/betterx/bclib/recipes/GridRecipe.java @@ -4,18 +4,24 @@ import org.betterx.bclib.BCLib; import org.betterx.bclib.config.PathConfig; import net.minecraft.core.NonNullList; +import net.minecraft.data.recipes.*; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; 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 com.google.common.collect.Maps; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import java.util.Map; +import java.util.function.Consumer; public class GridRecipe extends AbstractAdvancementRecipe { private static final GridRecipe INSTANCE = new GridRecipe(); @@ -28,10 +34,12 @@ public class GridRecipe extends AbstractAdvancementRecipe { private boolean shaped; private String[] shape; private final Map materialKeys = Maps.newHashMap(); + private final Map> materialTagKeys = Maps.newHashMap(); private int count; + private boolean showNotification; private boolean exist; - protected CraftingBookCategory bookCategory; + protected RecipeCategory bookCategory; private GridRecipe() { } @@ -43,21 +51,25 @@ public class GridRecipe extends AbstractAdvancementRecipe { * @param output * @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) { - INSTANCE.id = id; - 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; + return new GridRecipe(id, output); } public GridRecipe checkConfig(PathConfig config) { @@ -83,7 +95,8 @@ public class GridRecipe extends AbstractAdvancementRecipe { public GridRecipe addMaterial(char key, TagKey value) { unlockedBy(value); - return addMaterial(key, Ingredient.of(value)); + materialTagKeys.put(key, value); + return this; } public GridRecipe addMaterial(char key, ItemStack... values) { @@ -109,6 +122,11 @@ public class GridRecipe extends AbstractAdvancementRecipe { return this; } + public GridRecipe showNotification(boolean showNotification) { + this.showNotification = showNotification; + return this; + } + private NonNullList getMaterials(int width, int height) { NonNullList materials = NonNullList.withSize(width * height, Ingredient.EMPTY); int pos = 0; @@ -116,7 +134,9 @@ public class GridRecipe extends AbstractAdvancementRecipe { for (String line : shape) { for (int i = 0; i < width; 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; materials.set(pos++, material == null ? Ingredient.EMPTY : material); } @@ -125,13 +145,29 @@ public class GridRecipe extends AbstractAdvancementRecipe { return materials; } - public GridRecipe setCraftingBookCategory(CraftingBookCategory c) { + public GridRecipe setCategory(RecipeCategory c) { bookCategory = c; return this; } + private static List RECIPES; - public void build() { + public GridRecipe build() { + if (RECIPES == null) RECIPES = new ArrayList<>(); + RECIPES.add(this); + return this; + } + + public static void registerRecipes(Consumer cc) { + if (RECIPES == null) return; + + for (var r : RECIPES) { + r.build(cc); + } + RECIPES.clear(); + } + + public void build(Consumer cc) { if (!exist) { BCLib.LOGGER.warning("Unable to build Recipe " + id); return; @@ -144,23 +180,70 @@ public class GridRecipe extends AbstractAdvancementRecipe { BCLib.LOGGER.warning("Unable to build Recipe " + id + ": Result is AIR"); return; } + NonNullList materials = this.getMaterials(width, height); if (materials == null || materials.isEmpty()) { BCLib.LOGGER.warning("Unable to build Recipe " + id + ": Empty Material List"); return; } - CraftingRecipe recipe = shaped ? new ShapedRecipe( - id, - group, - bookCategory, - width, - height, - materials, - result - ) : new ShapelessRecipe(id, group, bookCategory, result, materials); + if (shaped) { + final ShapedRecipeBuilder builder = ShapedRecipeBuilder + .shaped(bookCategory, output, count) + .group(group) + .showNotification(showNotification); - BCLRecipeManager.addRecipe(type, recipe); - registerAdvancement(recipe, output); + for (String row : this.shape) { + builder.pattern(row); + } + + for (Map.Entry 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> 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 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> 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); + } } } diff --git a/src/main/java/org/betterx/datagen/bclib/BCLibDatagen.java b/src/main/java/org/betterx/datagen/bclib/BCLibDatagen.java index 7a8eed1f..ae253024 100644 --- a/src/main/java/org/betterx/datagen/bclib/BCLibDatagen.java +++ b/src/main/java/org/betterx/datagen/bclib/BCLibDatagen.java @@ -4,6 +4,7 @@ import org.betterx.bclib.BCLib; import org.betterx.datagen.bclib.advancement.BCLAdvancementDataProvider; import org.betterx.datagen.bclib.preset.WorldPresetDataProvider; 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.worldgen.BCLibRegistriesDataProvider; @@ -13,7 +14,7 @@ import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint; import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; public class BCLibDatagen implements DataGeneratorEntrypoint { - public static final boolean ADD_TESTS = false; + public static final boolean ADD_TESTS = true; @Override public void onInitializeDataGenerator(FabricDataGenerator dataGenerator) { @@ -23,6 +24,7 @@ public class BCLibDatagen implements DataGeneratorEntrypoint { if (ADD_TESTS) { pack.addProvider(TestWorldgenProvider::new); pack.addProvider(TestBiomes::new); + pack.addProvider(TestRecipes::new); } pack.addProvider(WorldPresetDataProvider::new); diff --git a/src/main/java/org/betterx/datagen/bclib/tests/TestRecipes.java b/src/main/java/org/betterx/datagen/bclib/tests/TestRecipes.java new file mode 100644 index 00000000..3a95f5bd --- /dev/null +++ b/src/main/java/org/betterx/datagen/bclib/tests/TestRecipes.java @@ -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 exporter) { + GridRecipe.registerRecipes(exporter); + } +}