From c4b99eae59f58cf5416ee29d7a1b5531267ee10f Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sun, 11 Oct 2026 05:55:21 +0200 Subject: [PATCH 01/85] Add Flint tests for all_signs (44 blocks) --- .../signs/lava_ignites_hanging_signs.json | 94 +++++++++++ .../signs/lava_ignites_standing_signs.json | 84 ++++++++++ .../lava_ignites_wall_hanging_signs.json | 92 +++++++++++ .../signs/lava_ignites_wall_signs.json | 89 +++++++++++ .../signs/oak_hanging_sign_chaining.json | 58 +++++++ .../signs/oak_hanging_sign_placement.json | 77 +++++++++ .../oak_hanging_sign_support_and_drop.json | 75 +++++++++ .../signs/oak_hanging_sign_wax.json | 55 +++++++ .../signs/oak_sign_adventure_no_dye.json | 59 +++++++ tests/decoration/signs/oak_sign_dyeing.json | 131 ++++++++++++++++ .../oak_sign_ink_wax_and_click_commands.json | 148 ++++++++++++++++++ .../decoration/signs/oak_sign_placement.json | 57 +++++++ tests/decoration/signs/oak_sign_stacking.json | 49 ++++++ .../signs/oak_sign_support_and_drop.json | 66 ++++++++ .../signs/oak_wall_hanging_sign_chaining.json | 67 ++++++++ .../oak_wall_hanging_sign_never_breaks.json | 52 ++++++ .../oak_wall_hanging_sign_placement.json | 89 +++++++++++ .../oak_wall_hanging_sign_side_of_block.json | 49 ++++++ .../signs/oak_wall_sign_placement.json | 63 ++++++++ .../signs/oak_wall_sign_support_and_drop.json | 69 ++++++++ tests/decoration/signs/sign_fuel.json | 75 +++++++++ 21 files changed, 1598 insertions(+) create mode 100644 tests/decoration/signs/lava_ignites_hanging_signs.json create mode 100644 tests/decoration/signs/lava_ignites_standing_signs.json create mode 100644 tests/decoration/signs/lava_ignites_wall_hanging_signs.json create mode 100644 tests/decoration/signs/lava_ignites_wall_signs.json create mode 100644 tests/decoration/signs/oak_hanging_sign_chaining.json create mode 100644 tests/decoration/signs/oak_hanging_sign_placement.json create mode 100644 tests/decoration/signs/oak_hanging_sign_support_and_drop.json create mode 100644 tests/decoration/signs/oak_hanging_sign_wax.json create mode 100644 tests/decoration/signs/oak_sign_adventure_no_dye.json create mode 100644 tests/decoration/signs/oak_sign_dyeing.json create mode 100644 tests/decoration/signs/oak_sign_ink_wax_and_click_commands.json create mode 100644 tests/decoration/signs/oak_sign_placement.json create mode 100644 tests/decoration/signs/oak_sign_stacking.json create mode 100644 tests/decoration/signs/oak_sign_support_and_drop.json create mode 100644 tests/decoration/signs/oak_wall_hanging_sign_chaining.json create mode 100644 tests/decoration/signs/oak_wall_hanging_sign_never_breaks.json create mode 100644 tests/decoration/signs/oak_wall_hanging_sign_placement.json create mode 100644 tests/decoration/signs/oak_wall_hanging_sign_side_of_block.json create mode 100644 tests/decoration/signs/oak_wall_sign_placement.json create mode 100644 tests/decoration/signs/oak_wall_sign_support_and_drop.json create mode 100644 tests/decoration/signs/sign_fuel.json diff --git a/tests/decoration/signs/lava_ignites_hanging_signs.json b/tests/decoration/signs/lava_ignites_hanging_signs.json new file mode 100644 index 0000000..5bf71fc --- /dev/null +++ b/tests/decoration/signs/lava_ignites_hanging_signs.json @@ -0,0 +1,94 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lava_ignites_hanging_signs", + "description": "One lava pool sits directly under an oak hanging sign and a crimson hanging sign; lava sets fire on the floor cell beside the oak sign, which is ignited by lava, and never beside the crimson sign, which is not.", + "tags": ["decoration", "sign", "lava", "fire", "ignite", "random-tick"], + "minecraftIds": ["minecraft:oak_hanging_sign", "minecraft:crimson_hanging_sign", "minecraft:lava"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -2], [4, 4, 2] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -2], [4, 4, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 1, -1], [3, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 1, -1], [3, 1, 1] ], + "with": {"id": "minecraft:lava"} + }, + { "at": 0, "do": "place", "pos": [-2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [-3, 3, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "place", + "pos": [-3, 2, 0], + "block": {"id": "minecraft:oak_hanging_sign", "rotation": 8, "attached": false} + }, + { "at": 0, "do": "place", "pos": [3, 3, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "place", + "pos": [3, 2, 0], + "block": {"id": "minecraft:crimson_hanging_sign", "rotation": 8, "attached": false} + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_hanging_sign" } }, + { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_hanging_sign"} }, + { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } + ] + }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_hanging_sign" } }, + { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_hanging_sign"} }, + { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } + ] + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_hanging_sign" } }, + { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_hanging_sign"} }, + { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } + ] + }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [-2, 2, 0], "is": {"id": "minecraft:fire"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/lava_ignites_standing_signs.json b/tests/decoration/signs/lava_ignites_standing_signs.json new file mode 100644 index 0000000..27af157 --- /dev/null +++ b/tests/decoration/signs/lava_ignites_standing_signs.json @@ -0,0 +1,84 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lava_ignites_standing_signs", + "description": "One lava pool borders the supports of an oak sign and a crimson sign; lava sets fire on the floor cell beside the oak sign, which is ignited by lava, and never beside the crimson sign, which is not.", + "tags": ["decoration", "sign", "lava", "fire", "ignite", "random-tick"], + "minecraftIds": ["minecraft:oak_sign", "minecraft:crimson_sign", "minecraft:lava"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -2], [4, 4, 2] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -2], [4, 4, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 1, -1], [3, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 1, -1], [3, 1, 1] ], + "with": {"id": "minecraft:lava"} + }, + { "at": 0, "do": "place", "pos": [-2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [-3, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [3, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "place", "pos": [-3, 2, 0], "block": {"id": "minecraft:oak_sign", "rotation": 8} }, + { "at": 1, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:crimson_sign", "rotation": 8} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_sign" } }, + { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_sign"} }, + { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } + ] + }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_sign" } }, + { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_sign"} }, + { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } + ] + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_sign" } }, + { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_sign"} }, + { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } + ] + }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [-2, 2, 0], "is": {"id": "minecraft:fire"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/lava_ignites_wall_hanging_signs.json b/tests/decoration/signs/lava_ignites_wall_hanging_signs.json new file mode 100644 index 0000000..34d1486 --- /dev/null +++ b/tests/decoration/signs/lava_ignites_wall_hanging_signs.json @@ -0,0 +1,92 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lava_ignites_wall_hanging_signs", + "description": "One lava pool sits directly under an oak wall hanging sign and a crimson wall hanging sign; lava sets fire on the floor cell beside the oak sign, which is ignited by lava, and never beside the crimson sign, which is not.", + "tags": ["decoration", "sign", "lava", "fire", "ignite", "random-tick"], + "minecraftIds": ["minecraft:oak_wall_hanging_sign", "minecraft:crimson_wall_hanging_sign", "minecraft:lava"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -2], [4, 4, 2] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -2], [4, 4, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 1, -1], [3, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 1, -1], [3, 1, 1] ], + "with": {"id": "minecraft:lava"} + }, + { "at": 0, "do": "place", "pos": [-2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "place", + "pos": [-3, 2, 0], + "block": {"id": "minecraft:oak_wall_hanging_sign", "facing": "north"} + }, + { + "at": 1, + "do": "place", + "pos": [3, 2, 0], + "block": {"id": "minecraft:crimson_wall_hanging_sign", "facing": "north"} + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_wall_hanging_sign" } }, + { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_wall_hanging_sign"} }, + { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } + ] + }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_wall_hanging_sign" } }, + { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_wall_hanging_sign"} }, + { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } + ] + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_wall_hanging_sign" } }, + { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_wall_hanging_sign"} }, + { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } + ] + }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [-2, 2, 0], "is": {"id": "minecraft:fire"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/lava_ignites_wall_signs.json b/tests/decoration/signs/lava_ignites_wall_signs.json new file mode 100644 index 0000000..d22f3e4 --- /dev/null +++ b/tests/decoration/signs/lava_ignites_wall_signs.json @@ -0,0 +1,89 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lava_ignites_wall_signs", + "description": "One lava pool sits directly under an oak wall sign and a crimson wall sign; lava sets fire on the floor cell beside the oak sign, which is ignited by lava, and never beside the crimson sign, which is not.", + "tags": ["decoration", "sign", "lava", "fire", "ignite", "random-tick"], + "minecraftIds": ["minecraft:oak_wall_sign", "minecraft:crimson_wall_sign", "minecraft:lava"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -2], [4, 4, 2] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -2], [4, 4, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 1, -1], [3, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 1, -1], [3, 1, 1] ], + "with": {"id": "minecraft:lava"} + }, + { "at": 0, "do": "place", "pos": [-2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [-3, 2, 1], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "place", "pos": [-3, 2, 0], "block": {"id": "minecraft:oak_wall_sign", "facing": "north"} }, + { "at": 0, "do": "place", "pos": [3, 2, 1], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "place", + "pos": [3, 2, 0], + "block": {"id": "minecraft:crimson_wall_sign", "facing": "north"} + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_wall_sign" } }, + { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_wall_sign"} }, + { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } + ] + }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_wall_sign" } }, + { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_wall_sign"} }, + { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } + ] + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_wall_sign" } }, + { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_wall_sign"} }, + { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } + ] + }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [-2, 2, 0], "is": {"id": "minecraft:fire"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_hanging_sign_chaining.json b/tests/decoration/signs/oak_hanging_sign_chaining.json new file mode 100644 index 0000000..9b18857 --- /dev/null +++ b/tests/decoration/signs/oak_hanging_sign_chaining.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_hanging_sign_chaining", + "description": "A hanging sign used on the bottom of another hanging sign chains below it, with attached=false when facing along the sign's axis and attached=true when facing across it.", + "tags": ["decoration", "sign", "hanging-sign", "chain", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:oak_hanging_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 5, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:oak_hanging_sign", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [4, 5, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [4, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 5, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 4, 0], "block": {"id": "minecraft:oak_hanging_sign", "rotation": 8, "attached": false} }, + { "pos": [3, 5, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 4, 0], "block": {"id": "minecraft:oak_hanging_sign", "rotation": 8, "attached": false} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, -90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 1, 0.5], "rot": [90, -90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 3, 0], "is": {"id": "minecraft:oak_hanging_sign", "rotation": 8, "attached": false} }, + { "pos": [3, 3, 0], "is": {"id": "minecraft:oak_hanging_sign", "rotation": 12, "attached": true} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_hanging_sign_placement.json b/tests/decoration/signs/oak_hanging_sign_placement.json new file mode 100644 index 0000000..9f3d78f --- /dev/null +++ b/tests/decoration/signs/oak_hanging_sign_placement.json @@ -0,0 +1,77 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_hanging_sign_placement", + "description": "A hanging sign placed under a full block gets a cardinal rotation and attached=false, under a fence it gets attached=true with the player's exact rotation, and it is waterlogged when it replaces water.", + "tags": ["decoration", "sign", "hanging-sign", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:oak_hanging_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [10, 5, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:oak_hanging_sign", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [10, 5, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [10, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 5, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 5, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [6, 5, 0], "block": {"id": "minecraft:oak_fence"} }, + { "pos": [9, 5, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [9, 4, 0], "block": {"id": "minecraft:water" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, -90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 1, 0.5], "rot": [90, -90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [6.5, 1, 0.5], "rot": [45, -90] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [9.5, 1, 0.5], "rot": [0, -90] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [0, 4, 0], + "is": {"id": "minecraft:oak_hanging_sign", "rotation": 8, "attached": false, "waterlogged": false} + }, + { + "pos": [3, 4, 0], + "is": {"id": "minecraft:oak_hanging_sign", "rotation": 12, "attached": false, "waterlogged": false} + }, + { + "pos": [6, 4, 0], + "is": {"id": "minecraft:oak_hanging_sign", "rotation": 10, "attached": true, "waterlogged": false} + }, + { + "pos": [9, 4, 0], + "is": {"id": "minecraft:oak_hanging_sign", "rotation": 8, "attached": false, "waterlogged": true} + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_hanging_sign_support_and_drop.json b/tests/decoration/signs/oak_hanging_sign_support_and_drop.json new file mode 100644 index 0000000..daa3fe3 --- /dev/null +++ b/tests/decoration/signs/oak_hanging_sign_support_and_drop.json @@ -0,0 +1,75 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_hanging_sign_support_and_drop", + "description": "A hanging sign breaks and drops an oak hanging sign item when the block above is removed, and a hanging sign item used on top of a block with no side support places nothing.", + "tags": ["decoration", "sign", "hanging-sign", "support", "neighbor-update", "drops", "player"], + "minecraftIds": ["minecraft:oak_hanging_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 5, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:oak_hanging_sign", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 5, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 5, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 4, 0], + "block": {"id": "minecraft:oak_hanging_sign", "rotation": 8, "attached": false} + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 4, 0], "is": {"id": "minecraft:oak_hanging_sign", "rotation": 8, "attached": false} } + ] + }, + { "at": 1, "do": "remove", "pos": [0, 5, 0] }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 4, 0], "is": {"id": "minecraft:air"} }, + { + "is": "minecraft:item", + "exists": true, + "count": 1, + "pos": [0.5, 4, 0.5], + "position_tolerance": 1.5, + "Item.id": "minecraft:oak_hanging_sign" + } + ] + }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [4, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:oak_hanging_sign", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_hanging_sign_wax.json b/tests/decoration/signs/oak_hanging_sign_wax.json new file mode 100644 index 0000000..6e7604d --- /dev/null +++ b/tests/decoration/signs/oak_hanging_sign_wax.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_hanging_sign_wax", + "description": "Honeycomb used on the face of a hanging sign waxes it and is used up, so the hanging sign's own interaction code still passes other items to the shared sign handling.", + "tags": ["decoration", "sign", "hanging-sign", "wax", "block-entity", "player"], + "minecraftIds": ["minecraft:oak_hanging_sign", "minecraft:honeycomb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -3], [1, 5, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [1, 5, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 4, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 3, 0], + "block": {"id": "minecraft:oak_hanging_sign", "rotation": 8, "attached": false} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -1.5], "rot": [0, -19] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 3, 0], + "is": { "id": "minecraft:oak_hanging_sign", "nbt": {"is_waxed": "1b"} } + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_sign_adventure_no_dye.json b/tests/decoration/signs/oak_sign_adventure_no_dye.json new file mode 100644 index 0000000..24a06f5 --- /dev/null +++ b/tests/decoration/signs/oak_sign_adventure_no_dye.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_sign_adventure_no_dye", + "description": "A player in adventure mode cannot dye an oak sign: the colour is unchanged and the dye is kept.", + "tags": ["decoration", "sign", "dye", "adventure", "block-entity", "player"], + "minecraftIds": ["minecraft:oak_sign", "minecraft:red_dye"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -3], [1, 2, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:red_dye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Adventure" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [1, 2, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [1, 0, -2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 8, + "nbt": {"front_text": "{messages: [\"hi\", \"\", \"\", \"\"]}"} + } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -1.5], "rot": [0, 29] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:oak_sign", "nbt": {"front_text.color": "black"} } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:red_dye", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_sign_dyeing.json b/tests/decoration/signs/oak_sign_dyeing.json new file mode 100644 index 0000000..759e1fd --- /dev/null +++ b/tests/decoration/signs/oak_sign_dyeing.json @@ -0,0 +1,131 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_sign_dyeing", + "description": "Dye recolours only the side of an oak sign the player faces, is used up on success, and is kept when the side has no text or already has that colour.", + "tags": ["decoration", "sign", "dye", "block-entity", "player"], + "minecraftIds": ["minecraft:oak_sign", "minecraft:red_dye", "minecraft:black_dye"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -3], [10, 3, 4] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [10, 3, 4] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [10, 0, -2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, 2], [10, 0, 4] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 8, + "nbt": {"front_text": "{messages: [\"hi\", \"\", \"\", \"\"]}"} + } + }, + { + "pos": [3, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 8, + "nbt": { + "front_text": "{messages: [\"hi\", \"\", \"\", \"\"]}", + "back_text" : "{messages: [\"hi\", \"\", \"\", \"\"]}" + } + } + }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:oak_sign", "rotation": 8} }, + { + "pos": [9, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 8, + "nbt": {"front_text": "{messages: [\"hi\", \"\", \"\", \"\"]}"} + } + } + ] + }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:red_dye", "count": 1}, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -1.5], "rot": [0, 29] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:oak_sign", "nbt": {"front_text.color": "red"} } + }, + {"slot": "hotbar1", "is": "empty"} + ] + }, + {"at": 3, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:red_dye", "count": 1}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [3.5, 1, 2.5], "rot": [180, 29] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { + "pos": [3, 1, 0], + "is": { "id": "minecraft:oak_sign", "nbt": {"front_text.color": "black", "back_text.color": "red"} } + }, + {"slot": "hotbar1", "is": "empty"} + ] + }, + {"at": 5, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:red_dye", "count": 1}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [6.5, 1, -1.5], "rot": [0, 29] }, + {"at": 5, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { + "pos": [6, 1, 0], + "is": { "id": "minecraft:oak_sign", "nbt": {"front_text.color": "black"} } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:red_dye", "count": 1} } + ] + }, + {"at": 7, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:black_dye", "count": 1}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [9.5, 1, -1.5], "rot": [0, 29] }, + {"at": 7, "do": "interact"}, + { + "at": 8, + "do": "assert", + "checks": [ + { + "pos": [9, 1, 0], + "is": { "id": "minecraft:oak_sign", "nbt": {"front_text.color": "black"} } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:black_dye", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_sign_ink_wax_and_click_commands.json b/tests/decoration/signs/oak_sign_ink_wax_and_click_commands.json new file mode 100644 index 0000000..1382d27 --- /dev/null +++ b/tests/decoration/signs/oak_sign_ink_wax_and_click_commands.json @@ -0,0 +1,148 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_sign_ink_wax_and_click_commands", + "description": "Glow ink and ink sacs toggle glowing text, honeycomb waxes a sign and blocks dyeing, and an empty hand runs a sign's click command whether or not it is waxed.", + "tags": ["decoration", "sign", "glow-ink", "wax", "click-event", "block-entity", "player"], + "minecraftIds": [ + "minecraft:oak_sign" , "minecraft:glow_ink_sac", "minecraft:ink_sac" , "minecraft:honeycomb" , + "minecraft:red_dye" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -3], [10, 3, 4] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [10, 3, 4] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [10, 0, -2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 8, + "nbt": {"front_text": "{messages: [\"hi\", \"\", \"\", \"\"]}"} + } + }, + { + "pos": [3, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 8, + "nbt": {"front_text": "{messages: [\"hi\", \"\", \"\", \"\"]}"} + } + }, + { + "pos": [6, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 8, + "nbt": { + "is_waxed": "1b", + "front_text": "{messages: [{text: \"go\", click_event: {action: \"run_command\", command: \"setblock ~ ~2 ~ minecraft:gold_block\"}}, \"\", \"\", \"\"]}" + } + } + }, + { + "pos": [9, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 8, + "nbt": { + "front_text": "{messages: [{text: \"go\", click_event: {action: \"run_command\", command: \"setblock ~ ~2 ~ minecraft:gold_block\"}}, \"\", \"\", \"\"]}" + } + } + } + ] + }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:glow_ink_sac", "count": 1}, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -1.5], "rot": [0, 29] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:oak_sign", "nbt": {"front_text.has_glowing_text": "1b"} } + }, + {"slot": "hotbar1", "is": "empty"} + ] + }, + {"at": 3, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:ink_sac", "count": 1}, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:oak_sign", "nbt": {"front_text.has_glowing_text": "0b"} } + }, + {"slot": "hotbar1", "is": "empty"} + ] + }, + {"at": 5, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:honeycomb", "count": 1}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [3.5, 1, -1.5], "rot": [0, 29] }, + {"at": 5, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { + "pos": [3, 1, 0], + "is": { "id": "minecraft:oak_sign", "nbt": {"is_waxed": "1b"} } + }, + {"slot": "hotbar1", "is": "empty"} + ] + }, + {"at": 7, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:red_dye", "count": 1}, + {"at": 7, "do": "interact"}, + { + "at": 8, + "do": "assert", + "checks": [ + { + "pos": [3, 1, 0], + "is": { "id": "minecraft:oak_sign", "nbt": {"front_text.color": "black", "is_waxed": "1b"} } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:red_dye", "count": 1} } + ] + }, + {"at": 9, "do": "set_slot", "slot": "hotbar1"}, + { "at": 9, "do": "tp", "entity_alias": "player", "pos": [6.5, 1, -1.5], "rot": [0, 29] }, + {"at": 9, "do": "interact"}, + { "at": 10, "do": "tp", "entity_alias": "player", "pos": [9.5, 1, -1.5], "rot": [0, 29] }, + {"at": 10, "do": "interact"}, + { + "at": 11, + "do": "assert", + "checks": [ + { "pos": [6, 3, 0], "is": {"id": "minecraft:gold_block"} }, + { "pos": [9, 3, 0], "is": {"id": "minecraft:gold_block"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_sign_placement.json b/tests/decoration/signs/oak_sign_placement.json new file mode 100644 index 0000000..15255b5 --- /dev/null +++ b/tests/decoration/signs/oak_sign_placement.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_sign_placement", + "description": "Using an oak sign on top of stone places a standing sign whose rotation follows the player's yaw, uses up the item, and waterlogs the sign when it replaces a water source.", + "tags": ["decoration", "sign", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:oak_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 2, 3] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:oak_sign", "count": 5} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:water"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [2.5, 3, 0.5], "rot": [90, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [180, 90] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [6.5, 3, 0.5], "rot": [-90, 90] }, + {"at": 4, "do": "interact"}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [8.5, 3, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_sign", "rotation": 8, "waterlogged": false} } , + { "pos": [2, 1, 0], "is": {"id": "minecraft:oak_sign", "rotation": 12, "waterlogged": false} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:oak_sign", "rotation": 0, "waterlogged": false} } , + { "pos": [6, 1, 0], "is": {"id": "minecraft:oak_sign", "rotation": 4, "waterlogged": false} } , + { "pos": [8, 1, 0], "is": {"id": "minecraft:oak_sign", "rotation": 8, "waterlogged": true} } , + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_sign_stacking.json b/tests/decoration/signs/oak_sign_stacking.json new file mode 100644 index 0000000..d01726c --- /dev/null +++ b/tests/decoration/signs/oak_sign_stacking.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_sign_stacking", + "description": "A standing sign survives on top of another sign because sign blocks count as solid, and it breaks once the sign below it is gone.", + "tags": ["decoration", "sign", "support", "neighbor-update", "block-state"], + "minecraftIds": ["minecraft:oak_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 3, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [4, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:oak_sign", "rotation": 8} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:oak_sign", "rotation": 8} }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:oak_sign", "rotation": 8} }, + { "pos": [3, 2, 0], "block": {"id": "minecraft:oak_sign", "rotation": 8} } + ] + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_sign", "rotation": 4} }, + { "at": 1, "do": "remove", "pos": [3, 0, 0] }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_sign", "rotation": 4} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:oak_sign", "rotation": 8} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [3, 2, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_sign_support_and_drop.json b/tests/decoration/signs/oak_sign_support_and_drop.json new file mode 100644 index 0000000..f6f6df8 --- /dev/null +++ b/tests/decoration/signs/oak_sign_support_and_drop.json @@ -0,0 +1,66 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_sign_support_and_drop", + "description": "A standing oak sign breaks and drops an oak sign item when its support is removed, and a sign item used on a ceiling with no support places nothing.", + "tags": ["decoration", "sign", "support", "neighbor-update", "drops", "player"], + "minecraftIds": ["minecraft:oak_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 5, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:oak_sign", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 5, 2] ], + "with": {"id": "minecraft:air"} + }, + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_sign", "rotation": 8} }, + { "at": 0, "do": "place", "pos": [4, 4, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_sign", "rotation": 8} } + ] + }, + { "at": 1, "do": "remove", "pos": [0, 0, 0] }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, + { + "is": "minecraft:item", + "exists": true, + "count": 1, + "pos": [0.5, 1, 0.5], + "position_tolerance": 1.5, + "Item.id": "minecraft:oak_sign" + } + ] + }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [4.5, 0, 0.5], "rot": [0, -90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [4, 3, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:oak_sign", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_wall_hanging_sign_chaining.json b/tests/decoration/signs/oak_wall_hanging_sign_chaining.json new file mode 100644 index 0000000..d825f55 --- /dev/null +++ b/tests/decoration/signs/oak_wall_hanging_sign_chaining.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_wall_hanging_sign_chaining", + "description": "A wall hanging sign can attach to the side of another wall hanging sign facing along the same axis, but not to one facing across it.", + "tags": ["decoration", "sign", "wall-hanging-sign", "chain", "placement", "player"], + "minecraftIds": ["minecraft:oak_wall_hanging_sign", "minecraft:oak_hanging_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [8, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:oak_hanging_sign", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [8, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [8, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place", + "pos": [1, 1, 0], + "block": {"id": "minecraft:oak_wall_hanging_sign", "facing": "north"} + }, + { + "at": 0, + "do": "place", + "pos": [6, 1, 0], + "block": {"id": "minecraft:oak_wall_hanging_sign", "facing": "east"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:oak_wall_hanging_sign", "facing": "north"} }, + { "slot": "hotbar1", "is": {"id": "minecraft:oak_hanging_sign", "count": 1} } + ] + }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [7.5, 3, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [7, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:oak_hanging_sign", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_wall_hanging_sign_never_breaks.json b/tests/decoration/signs/oak_wall_hanging_sign_never_breaks.json new file mode 100644 index 0000000..d9c60ee --- /dev/null +++ b/tests/decoration/signs/oak_wall_hanging_sign_never_breaks.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_wall_hanging_sign_never_breaks", + "description": "A wall hanging sign stays in place after the blocks it was placed between are removed, because it has no survival check.", + "tags": ["decoration", "sign", "wall-hanging-sign", "support", "neighbor-update"], + "minecraftIds": ["minecraft:oak_wall_hanging_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 3, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:oak_wall_hanging_sign", "facing": "north"} } + ] + }, + { "at": 1, "do": "remove", "pos": [0, 1, 0] }, + { "at": 1, "do": "remove", "pos": [2, 1, 0] }, + { "at": 1, "do": "remove", "pos": [1, 0, 0] }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:oak_wall_hanging_sign", "facing": "north"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_wall_hanging_sign_placement.json b/tests/decoration/signs/oak_wall_hanging_sign_placement.json new file mode 100644 index 0000000..3774c92 --- /dev/null +++ b/tests/decoration/signs/oak_wall_hanging_sign_placement.json @@ -0,0 +1,89 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_wall_hanging_sign_placement", + "description": "A hanging sign used on the floor between two blocks becomes an oak wall hanging sign whose facing is opposite the player's look direction and which is waterlogged when it replaces water.", + "tags": ["decoration", "sign", "wall-hanging-sign", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:oak_wall_hanging_sign", "minecraft:oak_hanging_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -2], [13, 3, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:oak_hanging_sign", "count": 5} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -2], [13, 3, 2] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -2], [13, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 4, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 6, 1, -1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 6, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 9, 1, -1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 9, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [11, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [13, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 3, 0.5], "rot": [180, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [6.5, 3, 0.5], "rot": [90, 90] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [9.5, 3, 0.5], "rot": [-90, 90] }, + {"at": 4, "do": "interact"}, + { "at": 4, "do": "place", "pos": [12, 1, 0], "block": {"id": "minecraft:water"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [12.5, 3, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:oak_wall_hanging_sign", "facing": "north", "waterlogged": false} + }, + { + "pos": [3, 1, 0], + "is": {"id": "minecraft:oak_wall_hanging_sign", "facing": "south", "waterlogged": false} + }, + { + "pos": [6, 1, 0], + "is": {"id": "minecraft:oak_wall_hanging_sign", "facing": "east", "waterlogged": false} + }, + { + "pos": [9, 1, 0], + "is": {"id": "minecraft:oak_wall_hanging_sign", "facing": "west", "waterlogged": false} + }, + { + "pos": [12, 1, 0], + "is": {"id": "minecraft:oak_wall_hanging_sign", "facing": "north", "waterlogged": true} + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_wall_hanging_sign_side_of_block.json b/tests/decoration/signs/oak_wall_hanging_sign_side_of_block.json new file mode 100644 index 0000000..c489db5 --- /dev/null +++ b/tests/decoration/signs/oak_wall_hanging_sign_side_of_block.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_wall_hanging_sign_side_of_block", + "description": "A hanging sign used on the side of a block becomes a wall hanging sign at right angles to the clicked face, attached to the clicked block's side.", + "tags": ["decoration", "sign", "wall-hanging-sign", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:oak_wall_hanging_sign", "minecraft:oak_hanging_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, -3], [2, 3, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:oak_hanging_sign", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-3, 0, -3], [2, 3, 2] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 0, -3], [2, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-0.94, 1, -2.5], "rot": [-30, 21] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 1, -1], + "is": {"id": "minecraft:oak_wall_hanging_sign", "facing": "west", "waterlogged": false} + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_wall_sign_placement.json b/tests/decoration/signs/oak_wall_sign_placement.json new file mode 100644 index 0000000..5a3a557 --- /dev/null +++ b/tests/decoration/signs/oak_wall_sign_placement.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_wall_sign_placement", + "description": "Using an oak sign on the side of a block places an oak wall sign facing away from that face on all four sides, and the sign is waterlogged when it replaces a water source.", + "tags": ["decoration", "sign", "wall-sign", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:oak_wall_sign", "minecraft:oak_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, -3], [10, 2, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:oak_sign", "count": 5} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-3, 0, -3], [10, 2, 4] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 0, -3], [10, 0, 4] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [8, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [8, 1, -1], "block": {"id": "minecraft:water"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 24] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 3.5], "rot": [180, 24] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [3.5, 1, 0.5], "rot": [90, 24] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [-2.5, 1, 0.5], "rot": [-90, 24] }, + {"at": 4, "do": "interact"}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [8.5, 1, -2.5], "rot": [0, 24] }, + {"at": 5, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { + "pos": [0, 1, -1], + "is": {"id": "minecraft:oak_wall_sign", "facing": "north", "waterlogged": false} + }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:oak_wall_sign", "facing": "south", "waterlogged": false} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:oak_wall_sign", "facing": "east", "waterlogged": false} }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:oak_wall_sign", "facing": "west", "waterlogged": false} }, + { "pos": [8, 1, -1], "is": {"id": "minecraft:oak_wall_sign", "facing": "north", "waterlogged": true} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/oak_wall_sign_support_and_drop.json b/tests/decoration/signs/oak_wall_sign_support_and_drop.json new file mode 100644 index 0000000..014b545 --- /dev/null +++ b/tests/decoration/signs/oak_wall_sign_support_and_drop.json @@ -0,0 +1,69 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_wall_sign_support_and_drop", + "description": "An oak wall sign breaks and drops an oak sign item when the block it hangs on is removed, but stays when a neighbouring block that is not its support is removed.", + "tags": ["decoration", "sign", "wall-sign", "support", "neighbor-update", "drops"], + "minecraftIds": ["minecraft:oak_wall_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -2], [5, 3, 2] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -2], [5, 3, 2] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -2], [5, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, -1], "block": {"id": "minecraft:oak_wall_sign", "facing": "north"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 1, -1], "block": {"id": "minecraft:oak_wall_sign", "facing": "north"} }, + { "pos": [5, 1, -1], "block": {"id": "minecraft:stone" } } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, -1], "is": {"id": "minecraft:oak_wall_sign", "facing": "north"} }, + { "pos": [4, 1, -1], "is": {"id": "minecraft:oak_wall_sign", "facing": "north"} } + ] + }, + { "at": 1, "do": "remove", "pos": [0, 1, 0] }, + { "at": 1, "do": "remove", "pos": [5, 1, -1] }, + { "at": 1, "do": "remove", "pos": [4, 0, -1] }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, -1], "is": {"id": "minecraft:air"} }, + { "pos": [4, 1, -1], "is": {"id": "minecraft:oak_wall_sign", "facing": "north"} }, + { + "is": "minecraft:item", + "exists": true, + "count": 1, + "pos": [0.5, 1, -0.5], + "position_tolerance": 1.5, + "Item.id": "minecraft:oak_sign" + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/signs/sign_fuel.json b/tests/decoration/signs/sign_fuel.json new file mode 100644 index 0000000..9310fa4 --- /dev/null +++ b/tests/decoration/signs/sign_fuel.json @@ -0,0 +1,75 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "sign_fuel", + "description": "Oak signs and oak hanging signs burn as furnace fuel, while crimson signs and crimson hanging signs, which are non-flammable wood, do not.", + "tags": ["decoration", "sign", "fuel", "furnace", "item"], + "minecraftIds": [ + "minecraft:oak_sign" , "minecraft:oak_hanging_sign" , "minecraft:crimson_sign" , + "minecraft:crimson_hanging_sign" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, id: \"minecraft:raw_iron\", count: 1}, {Slot: 1b, id: \"minecraft:oak_sign\", count: 1}]" + } + } + }, + { + "at": 0, + "do": "place", + "pos": [1, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, id: \"minecraft:raw_iron\", count: 1}, {Slot: 1b, id: \"minecraft:crimson_sign\", count: 1}]" + } + } + }, + { + "at": 0, + "do": "place", + "pos": [2, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, id: \"minecraft:raw_iron\", count: 1}, {Slot: 1b, id: \"minecraft:oak_hanging_sign\", count: 1}]" + } + } + }, + { + "at": 0, + "do": "place", + "pos": [3, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, id: \"minecraft:raw_iron\", count: 1}, {Slot: 1b, id: \"minecraft:crimson_hanging_sign\", count: 1}]" + } + } + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:furnace", "lit": true } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:furnace", "lit": false} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:furnace", "lit": true } }, + { "pos": [3, 0, 0], "is": {"id": "minecraft:furnace", "lit": false} } + ] + } + ], + "breakpoints": [] +} + From 619403dcce9d92a550fc328720240a485d3dd68d Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 12 Oct 2026 05:51:20 +0200 Subject: [PATCH 02/85] Add Flint tests for pressure_plates (16 blocks) --- .../crimson_pressure_plate_activation.json | 63 ++ .../crimson_pressure_plate_default_state.json | 39 + ..._weighted_pressure_plate_power_levels.json | 727 ++++++++++++++++++ ..._weighted_pressure_plate_power_levels.json | 349 +++++++++ ...light_weighted_pressure_plate_recheck.json | 106 +++ .../oak_pressure_plate_activation.json | 63 ++ .../oak_pressure_plate_default_state.json | 39 + ...k_pressure_plate_marker_stand_ignored.json | 57 ++ .../oak_pressure_plate_piston_destroy.json | 36 + .../oak_pressure_plate_placement.json | 30 + .../oak_pressure_plate_stays_pressed.json | 64 ++ .../oak_pressure_plate_support.json | 52 ++ .../stone_pressure_plate_mob_sensitivity.json | 74 ++ 13 files changed, 1699 insertions(+) create mode 100644 tests/redstone/pressure_plate/crimson_pressure_plate_activation.json create mode 100644 tests/redstone/pressure_plate/crimson_pressure_plate_default_state.json create mode 100644 tests/redstone/pressure_plate/heavy_weighted_pressure_plate_power_levels.json create mode 100644 tests/redstone/pressure_plate/light_weighted_pressure_plate_power_levels.json create mode 100644 tests/redstone/pressure_plate/light_weighted_pressure_plate_recheck.json create mode 100644 tests/redstone/pressure_plate/oak_pressure_plate_activation.json create mode 100644 tests/redstone/pressure_plate/oak_pressure_plate_default_state.json create mode 100644 tests/redstone/pressure_plate/oak_pressure_plate_marker_stand_ignored.json create mode 100644 tests/redstone/pressure_plate/oak_pressure_plate_piston_destroy.json create mode 100644 tests/redstone/pressure_plate/oak_pressure_plate_placement.json create mode 100644 tests/redstone/pressure_plate/oak_pressure_plate_stays_pressed.json create mode 100644 tests/redstone/pressure_plate/oak_pressure_plate_support.json create mode 100644 tests/redstone/pressure_plate/stone_pressure_plate_mob_sensitivity.json diff --git a/tests/redstone/pressure_plate/crimson_pressure_plate_activation.json b/tests/redstone/pressure_plate/crimson_pressure_plate_activation.json new file mode 100644 index 0000000..b2d4a1c --- /dev/null +++ b/tests/redstone/pressure_plate/crimson_pressure_plate_activation.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "crimson_pressure_plate_activation", + "description": "An entity landing on a crimson pressure plate powers it, strongly powers the block below (lighting an adjacent lamp), and the plate releases about 20 ticks after the entity is removed.", + "tags": ["redstone", "pressure-plate", "entity-trigger", "strong-power"], + "minecraftIds": ["minecraft:crimson_pressure_plate", "minecraft:redstone_lamp"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 3, 1] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:redstone_lamp"} }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_pressure_plate"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_pressure_plate", "powered": false } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": false} } + ] + }, + { + "at": 3, + "do": "summon", + "entity_alias": "trigger", + "entity_type": "minecraft:item", + "pos": [0.5, 1, 0.5], + "Item": "{count: 1, id: \"minecraft:stone\"}", + "PickupDelay": "32767s" + }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_pressure_plate", "powered": true } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": true} } + ] + }, + { "at": 10, "do": "tp", "entity_alias": "trigger", "pos": [0.5, 10, 5.5] }, + { + "at": 11, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_pressure_plate", "powered": true } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": true} } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_pressure_plate", "powered": false } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/pressure_plate/crimson_pressure_plate_default_state.json b/tests/redstone/pressure_plate/crimson_pressure_plate_default_state.json new file mode 100644 index 0000000..4d04a69 --- /dev/null +++ b/tests/redstone/pressure_plate/crimson_pressure_plate_default_state.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "crimson_pressure_plate_default_state", + "description": "A placed crimson pressure plate is unpowered and stays unpowered while nothing stands on it.", + "tags": ["redstone", "pressure-plate", "block-state"], + "minecraftIds": ["minecraft:crimson_pressure_plate"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_pressure_plate"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_pressure_plate", "powered": false} } + ] + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_pressure_plate", "powered": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/pressure_plate/heavy_weighted_pressure_plate_power_levels.json b/tests/redstone/pressure_plate/heavy_weighted_pressure_plate_power_levels.json new file mode 100644 index 0000000..c28440f --- /dev/null +++ b/tests/redstone/pressure_plate/heavy_weighted_pressure_plate_power_levels.json @@ -0,0 +1,727 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "heavy_weighted_pressure_plate_power_levels", + "description": "A heavy weighted pressure plate needs ten times as many entities as a light one per power level: ceil(count / 150 * 15).", + "tags": ["redstone", "pressure-plate", "weighted", "entity-trigger", "power"], + "minecraftIds": ["minecraft:heavy_weighted_pressure_plate"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [8, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [8, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:heavy_weighted_pressure_plate"} }, + { "at": 1, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:heavy_weighted_pressure_plate"} }, + { "at": 1, "do": "place", "pos": [4, 1, 0], "block": {"id": "minecraft:heavy_weighted_pressure_plate"} }, + { "at": 1, "do": "place", "pos": [6, 1, 0], "block": {"id": "minecraft:heavy_weighted_pressure_plate"} }, + { + "at": 2, + "do": "summon", + "entity_alias": "s0_0", + "entity_type": "minecraft:armor_stand", + "pos": [0.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_0", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_1", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_2", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_3", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_4", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_5", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_6", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_7", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_8", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_9", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_0", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_1", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_2", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_3", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_4", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_5", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_6", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_7", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_8", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_9", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_10", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_0", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_1", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_2", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_3", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_4", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_5", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_6", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_7", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_8", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_9", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_10", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_11", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_12", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_13", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_14", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_15", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_16", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_17", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_18", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_19", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_20", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_21", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_22", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_23", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_24", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_25", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_26", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_27", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_28", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_29", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_30", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_31", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_32", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_33", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_34", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_35", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_36", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_37", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_38", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_39", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_40", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_41", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_42", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_43", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_44", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_45", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_46", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_47", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_48", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_49", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_50", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_51", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_52", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_53", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_54", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_55", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_56", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_57", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_58", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_59", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_60", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_61", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_62", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_63", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_64", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_65", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_66", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_67", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_68", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_69", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_70", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_71", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_72", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_73", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_74", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 14, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 1} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 1} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 2} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 8} } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 1} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 1} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 2} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 8} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/pressure_plate/light_weighted_pressure_plate_power_levels.json b/tests/redstone/pressure_plate/light_weighted_pressure_plate_power_levels.json new file mode 100644 index 0000000..c8971f2 --- /dev/null +++ b/tests/redstone/pressure_plate/light_weighted_pressure_plate_power_levels.json @@ -0,0 +1,349 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "light_weighted_pressure_plate_power_levels", + "description": "A light weighted pressure plate outputs power equal to the number of entities on it, capped at 15.", + "tags": ["redstone", "pressure-plate", "weighted", "entity-trigger", "power"], + "minecraftIds": ["minecraft:light_weighted_pressure_plate"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [8, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [8, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:light_weighted_pressure_plate"} }, + { "at": 1, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:light_weighted_pressure_plate"} }, + { "at": 1, "do": "place", "pos": [4, 1, 0], "block": {"id": "minecraft:light_weighted_pressure_plate"} }, + { "at": 1, "do": "place", "pos": [6, 1, 0], "block": {"id": "minecraft:light_weighted_pressure_plate"} }, + { + "at": 2, + "do": "summon", + "entity_alias": "s0_0", + "entity_type": "minecraft:armor_stand", + "pos": [0.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_0", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_1", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_2", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_3", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_4", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_5", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s1_6", + "entity_type": "minecraft:armor_stand", + "pos": [2.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_0", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_1", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_2", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_3", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_4", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_5", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_6", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_7", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_8", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_9", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_10", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_11", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_12", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_13", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s2_14", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_0", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_1", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_2", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_3", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_4", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_5", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_6", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_7", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_8", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_9", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_10", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_11", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_12", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_13", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_14", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_15", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_16", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_17", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_18", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "s3_19", + "entity_type": "minecraft:armor_stand", + "pos": [6.5, 1, 0.5] + }, + { + "at": 14, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:light_weighted_pressure_plate", "power": 1} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:light_weighted_pressure_plate", "power": 7} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:light_weighted_pressure_plate", "power": 15} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:light_weighted_pressure_plate", "power": 15} } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:light_weighted_pressure_plate", "power": 1} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:light_weighted_pressure_plate", "power": 7} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:light_weighted_pressure_plate", "power": 15} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:light_weighted_pressure_plate", "power": 15} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/pressure_plate/light_weighted_pressure_plate_recheck.json b/tests/redstone/pressure_plate/light_weighted_pressure_plate_recheck.json new file mode 100644 index 0000000..654bf46 --- /dev/null +++ b/tests/redstone/pressure_plate/light_weighted_pressure_plate_recheck.json @@ -0,0 +1,106 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "light_weighted_pressure_plate_recheck", + "description": "Entities added to an already pressed light weighted plate only raise its power at the next scheduled 10 tick re-check, and it returns to power 0 after they leave.", + "tags": ["redstone", "pressure-plate", "weighted", "scheduled-tick", "entity-trigger"], + "minecraftIds": ["minecraft:light_weighted_pressure_plate"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 2, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:redstone_lamp"} }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:light_weighted_pressure_plate"} }, + { + "at": 2, + "do": "summon", + "entity_alias": "first", + "entity_type": "minecraft:armor_stand", + "pos": [0.5, 1, 0.5] + }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:light_weighted_pressure_plate", "power": 1} } + ] + }, + { + "at": 5, + "do": "summon", + "entity_alias": "extra0", + "entity_type": "minecraft:armor_stand", + "pos": [0.5, 1, 0.5] + }, + { + "at": 5, + "do": "summon", + "entity_alias": "extra1", + "entity_type": "minecraft:armor_stand", + "pos": [0.5, 1, 0.5] + }, + { + "at": 5, + "do": "summon", + "entity_alias": "extra2", + "entity_type": "minecraft:armor_stand", + "pos": [0.5, 1, 0.5] + }, + { + "at": 5, + "do": "summon", + "entity_alias": "extra3", + "entity_type": "minecraft:armor_stand", + "pos": [0.5, 1, 0.5] + }, + { + "at": 5, + "do": "summon", + "entity_alias": "extra4", + "entity_type": "minecraft:armor_stand", + "pos": [0.5, 1, 0.5] + }, + { + "at": 5, + "do": "summon", + "entity_alias": "extra5", + "entity_type": "minecraft:armor_stand", + "pos": [0.5, 1, 0.5] + }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:light_weighted_pressure_plate", "power": 1} } + ] + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:light_weighted_pressure_plate", "power": 7} } + ] + }, + { "at": 31, "do": "tp", "entity_alias": "first", "pos": [0.5, 10, 5.5] }, + { "at": 31, "do": "tp", "entity_alias": "extra0", "pos": [0.5, 10, 5.5] }, + { "at": 31, "do": "tp", "entity_alias": "extra1", "pos": [0.5, 10, 5.5] }, + { "at": 31, "do": "tp", "entity_alias": "extra2", "pos": [0.5, 10, 5.5] }, + { "at": 31, "do": "tp", "entity_alias": "extra3", "pos": [0.5, 10, 5.5] }, + { "at": 31, "do": "tp", "entity_alias": "extra4", "pos": [0.5, 10, 5.5] }, + { "at": 31, "do": "tp", "entity_alias": "extra5", "pos": [0.5, 10, 5.5] }, + { + "at": 60, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:light_weighted_pressure_plate", "power": 0} }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/pressure_plate/oak_pressure_plate_activation.json b/tests/redstone/pressure_plate/oak_pressure_plate_activation.json new file mode 100644 index 0000000..6953582 --- /dev/null +++ b/tests/redstone/pressure_plate/oak_pressure_plate_activation.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_pressure_plate_activation", + "description": "An entity landing on a wooden pressure plate powers it, strongly powers the block below (lighting an adjacent lamp), and the plate releases about 20 ticks after the entity is removed.", + "tags": ["redstone", "pressure-plate", "entity-trigger", "strong-power"], + "minecraftIds": ["minecraft:oak_pressure_plate", "minecraft:redstone_lamp"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 3, 1] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:redstone_lamp"} }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_pressure_plate"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": false } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": false} } + ] + }, + { + "at": 3, + "do": "summon", + "entity_alias": "trigger", + "entity_type": "minecraft:item", + "pos": [0.5, 1, 0.5], + "Item": "{count: 1, id: \"minecraft:stone\"}", + "PickupDelay": "32767s" + }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": true } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": true} } + ] + }, + { "at": 10, "do": "tp", "entity_alias": "trigger", "pos": [0.5, 10, 5.5] }, + { + "at": 11, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": true } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": true} } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": false } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/pressure_plate/oak_pressure_plate_default_state.json b/tests/redstone/pressure_plate/oak_pressure_plate_default_state.json new file mode 100644 index 0000000..061864a --- /dev/null +++ b/tests/redstone/pressure_plate/oak_pressure_plate_default_state.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_pressure_plate_default_state", + "description": "A placed wooden pressure plate is unpowered and stays unpowered while nothing stands on it.", + "tags": ["redstone", "pressure-plate", "block-state"], + "minecraftIds": ["minecraft:oak_pressure_plate"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_pressure_plate"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": false} } + ] + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/pressure_plate/oak_pressure_plate_marker_stand_ignored.json b/tests/redstone/pressure_plate/oak_pressure_plate_marker_stand_ignored.json new file mode 100644 index 0000000..e5cf43f --- /dev/null +++ b/tests/redstone/pressure_plate/oak_pressure_plate_marker_stand_ignored.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_pressure_plate_marker_stand_ignored", + "description": "A marker armor stand does not power a wooden pressure plate (it ignores block triggers) while a normal armor stand on a second plate does.", + "tags": ["redstone", "pressure-plate", "entity-trigger"], + "minecraftIds": ["minecraft:oak_pressure_plate"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [5, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [5, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_pressure_plate"} }, + { "at": 1, "do": "place", "pos": [4, 1, 0], "block": {"id": "minecraft:oak_pressure_plate"} }, + { + "at": 2, + "do": "summon", + "entity_alias": "marker", + "entity_type": "minecraft:armor_stand", + "pos": [0.5, 1, 0.5], + "Marker": "1b" + }, + { + "at": 2, + "do": "summon", + "entity_alias": "normal", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": false} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": true } } + ] + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": false} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": true } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/pressure_plate/oak_pressure_plate_piston_destroy.json b/tests/redstone/pressure_plate/oak_pressure_plate_piston_destroy.json new file mode 100644 index 0000000..63731ab --- /dev/null +++ b/tests/redstone/pressure_plate/oak_pressure_plate_piston_destroy.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_pressure_plate_piston_destroy", + "description": "A piston extending into a wooden pressure plate destroys it and takes its place.", + "tags": ["redstone", "pressure-plate", "piston", "push-reaction"], + "minecraftIds": ["minecraft:oak_pressure_plate", "minecraft:piston"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 2, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:piston", "facing": "up"} }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_pressure_plate"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate"} } + ] + }, + { "at": 3, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:piston" , "extended": true } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "up"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/pressure_plate/oak_pressure_plate_placement.json b/tests/redstone/pressure_plate/oak_pressure_plate_placement.json new file mode 100644 index 0000000..5257b8d --- /dev/null +++ b/tests/redstone/pressure_plate/oak_pressure_plate_placement.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_pressure_plate_placement", + "description": "A survival player using a wooden pressure plate on top of stone places an unpowered plate and uses up the item.", + "tags": ["redstone", "pressure-plate", "placement", "player"], + "minecraftIds": ["minecraft:oak_pressure_plate"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:oak_pressure_plate"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": false} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/pressure_plate/oak_pressure_plate_stays_pressed.json b/tests/redstone/pressure_plate/oak_pressure_plate_stays_pressed.json new file mode 100644 index 0000000..cf098d0 --- /dev/null +++ b/tests/redstone/pressure_plate/oak_pressure_plate_stays_pressed.json @@ -0,0 +1,64 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_pressure_plate_stays_pressed", + "description": "A wooden pressure plate keeps being powered across several 20 tick re-checks while the entity stays on it.", + "tags": ["redstone", "pressure-plate", "entity-trigger", "scheduled-tick"], + "minecraftIds": ["minecraft:oak_pressure_plate"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 2, 1] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_pressure_plate"} }, + { + "at": 2, + "do": "summon", + "entity_alias": "trigger", + "entity_type": "minecraft:item", + "pos": [0.5, 1, 0.5], + "Item": "{count: 1, id: \"minecraft:stone\"}", + "PickupDelay": "32767s" + }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": true} } + ] + }, + { + "at": 25, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": true} } + ] + }, + { + "at": 45, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": true} } + ] + }, + { + "at": 65, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": true} } + ] + }, + { + "at": 85, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": true} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/pressure_plate/oak_pressure_plate_support.json b/tests/redstone/pressure_plate/oak_pressure_plate_support.json new file mode 100644 index 0000000..3338da2 --- /dev/null +++ b/tests/redstone/pressure_plate/oak_pressure_plate_support.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oak_pressure_plate_support", + "description": "A wooden pressure plate survives when its support becomes a fence or a top slab, but breaks when the support is removed or replaced by a bottom slab.", + "tags": ["redstone", "pressure-plate", "support", "neighbor-update"], + "minecraftIds": ["minecraft:oak_pressure_plate"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [6, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [6, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_pressure_plate"} }, + { "at": 1, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:oak_pressure_plate"} }, + { "at": 1, "do": "place", "pos": [4, 1, 0], "block": {"id": "minecraft:oak_pressure_plate"} }, + { "at": 1, "do": "place", "pos": [6, 1, 0], "block": {"id": "minecraft:oak_pressure_plate"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:oak_pressure_plate"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:oak_pressure_plate"} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:oak_pressure_plate"} } + ] + }, + { "at": 3, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_fence"} }, + { "at": 3, "do": "place", "pos": [2, 0, 0], "block": {"id": "minecraft:stone_slab", "type": "top"} }, + { "at": 3, "do": "place", "pos": [4, 0, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 3, "do": "remove", "pos": [6, 0, 0] }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:oak_pressure_plate"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/pressure_plate/stone_pressure_plate_mob_sensitivity.json b/tests/redstone/pressure_plate/stone_pressure_plate_mob_sensitivity.json new file mode 100644 index 0000000..f82253d --- /dev/null +++ b/tests/redstone/pressure_plate/stone_pressure_plate_mob_sensitivity.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "stone_pressure_plate_mob_sensitivity", + "description": "A stone pressure plate ignores an item entity but is powered by an armor stand (a living entity), and releases once the armor stand is removed.", + "tags": ["redstone", "pressure-plate", "entity-trigger", "sensitivity"], + "minecraftIds": ["minecraft:stone_pressure_plate"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [5, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [5, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone_pressure_plate"} }, + { "at": 1, "do": "place", "pos": [4, 1, 0], "block": {"id": "minecraft:stone_pressure_plate"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone_pressure_plate", "powered": false} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:stone_pressure_plate", "powered": false} } + ] + }, + { + "at": 3, + "do": "summon", + "entity_alias": "item", + "entity_type": "minecraft:item", + "pos": [0.5, 1, 0.5], + "Item": "{count: 1, id: \"minecraft:stone\"}", + "PickupDelay": "32767s" + }, + { + "at": 3, + "do": "summon", + "entity_alias": "mob", + "entity_type": "minecraft:armor_stand", + "pos": [4.5, 1, 0.5] + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone_pressure_plate", "powered": false} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:stone_pressure_plate", "powered": true } } + ] + }, + { + "at": 35, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone_pressure_plate", "powered": false} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:stone_pressure_plate", "powered": true } } + ] + }, + { "at": 36, "do": "tp", "entity_alias": "mob", "pos": [4.5, 10, 5.5] }, + { + "at": 70, + "do": "assert", + "checks": [ + { "pos": [4, 1, 0], "is": {"id": "minecraft:stone_pressure_plate", "powered": false} } + ] + } + ], + "breakpoints": [] +} + From aa1bb7be417dc7a0ed5fe956f1cad5c5db1b8b16 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 12 Oct 2026 07:02:36 +0200 Subject: [PATCH 03/85] Add Flint tests for slabs (68 blocks) --- .../building/slabs/copper_slab_scraping.json | 50 +++++++++++ tests/building/slabs/copper_slab_waxing.json | 57 ++++++++++++ tests/building/slabs/slab_merging.json | 61 +++++++++++++ .../building/slabs/slab_placement_faces.json | 51 +++++++++++ .../slabs/slab_waterlogged_water_flow.json | 85 ++++++++++++++++++ .../slabs/slab_waterlogging_placement.json | 86 +++++++++++++++++++ .../slabs/waxed_copper_slab_wax_removal.json | 46 ++++++++++ 7 files changed, 436 insertions(+) create mode 100644 tests/building/slabs/copper_slab_scraping.json create mode 100644 tests/building/slabs/copper_slab_waxing.json create mode 100644 tests/building/slabs/slab_merging.json create mode 100644 tests/building/slabs/slab_placement_faces.json create mode 100644 tests/building/slabs/slab_waterlogged_water_flow.json create mode 100644 tests/building/slabs/slab_waterlogging_placement.json create mode 100644 tests/building/slabs/waxed_copper_slab_wax_removal.json diff --git a/tests/building/slabs/copper_slab_scraping.json b/tests/building/slabs/copper_slab_scraping.json new file mode 100644 index 0000000..53d3da2 --- /dev/null +++ b/tests/building/slabs/copper_slab_scraping.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_slab_scraping", + "description": "An axe scrapes an exposed cut copper slab back to a plain cut copper slab keeping its type and waterlogging, and does nothing to an unaffected one.", + "tags": ["building", "slab", "copper", "weathering", "scrape", "player"], + "minecraftIds": ["minecraft:exposed_cut_copper_slab", "minecraft:cut_copper_slab", "minecraft:iron_axe"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [10, 3, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [0, 1, 0], + "block": {"id": "minecraft:exposed_cut_copper_slab", "type": "top", "waterlogged": true} + }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:exposed_cut_copper_slab", "type": "double"} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:cut_copper_slab", "type": "bottom"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [6.5, 3, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:cut_copper_slab", "type": "top" , "waterlogged": true} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:cut_copper_slab", "type": "double" } }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:cut_copper_slab", "type": "bottom" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/building/slabs/copper_slab_waxing.json b/tests/building/slabs/copper_slab_waxing.json new file mode 100644 index 0000000..453d802 --- /dev/null +++ b/tests/building/slabs/copper_slab_waxing.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_slab_waxing", + "description": "Honeycomb waxes an exposed cut copper slab into the waxed exposed variant keeping its type and waterlogging, and does nothing to an already waxed slab.", + "tags": ["building", "slab", "copper", "wax", "honeycomb", "player"], + "minecraftIds": [ + "minecraft:exposed_cut_copper_slab" , + "minecraft:waxed_exposed_cut_copper_slab", + "minecraft:honeycomb" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [10, 3, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [0, 1, 0], + "block": {"id": "minecraft:exposed_cut_copper_slab", "type": "top", "waterlogged": true} + }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:exposed_cut_copper_slab", "type": "double"} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "bottom"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [6.5, 3, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "top", "waterlogged": true} + }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "double"} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "bottom"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/building/slabs/slab_merging.json b/tests/building/slabs/slab_merging.json new file mode 100644 index 0000000..5dca5e3 --- /dev/null +++ b/tests/building/slabs/slab_merging.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "slab_merging", + "description": "A matching slab merges into a double slab when clicked on the face leading into its free half; clicking the far face or the side of the occupied half, and using another slab type, places a new slab instead.", + "tags": ["building", "slab", "double-slab", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:oak_slab", "minecraft:stone_slab"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [10, 3, 2] ] + }, + "player": { + "inventory": { + "hotbar1": {"id": "minecraft:oak_slab" , "count": 8}, + "hotbar2": {"id": "minecraft:stone_slab", "count": 1} + }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:oak_slab", "type": "bottom"} }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:oak_slab", "type": "top" } }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:oak_slab", "type": "top" } }, + { "pos": [9, 1, 0], "block": {"id": "minecraft:oak_slab", "type": "bottom"} }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:oak_slab", "type": "bottom"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, -2, 0.5], "rot": [0, -90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [6.5, 3, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [9.5, -0.42, -3.5], "rot": [0, 0] }, + {"at": 4, "do": "interact"}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 1.5], "rot": [0, 90] }, + {"at": 5, "do": "interact", "item": "minecraft:stone_slab"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_slab" , "type": "double"} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:oak_slab" , "type": "double"} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:oak_slab" , "type": "top" } }, + { "pos": [6, 2, 0], "is": {"id": "minecraft:oak_slab" , "type": "bottom"} }, + { "pos": [9, 1, 0], "is": {"id": "minecraft:oak_slab" , "type": "bottom"} }, + { "pos": [9, 1, -1], "is": {"id": "minecraft:oak_slab" , "type": "bottom"} }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:oak_slab" , "type": "bottom"} }, + { "pos": [0, 2, 1], "is": {"id": "minecraft:stone_slab", "type": "bottom"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/building/slabs/slab_placement_faces.json b/tests/building/slabs/slab_placement_faces.json new file mode 100644 index 0000000..f3c4786 --- /dev/null +++ b/tests/building/slabs/slab_placement_faces.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "slab_placement_faces", + "description": "A slab placed on a block's top face is a bottom slab, on its bottom face a top slab, and on a side face it is bottom or top depending on which half of the face was clicked.", + "tags": ["building", "slab", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:oak_slab"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [10, 3, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:oak_slab", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, -2, 0.5], "rot": [0, -90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [6.5, -0.42, -3.5], "rot": [0, 0] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [9.5, 0.18, -3.5], "rot": [0, 0] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_slab", "type": "bottom", "waterlogged": false} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:oak_slab", "type": "top" , "waterlogged": false} }, + { "pos": [6, 1, -1], "is": {"id": "minecraft:oak_slab", "type": "bottom", "waterlogged": false} }, + { "pos": [9, 1, -1], "is": {"id": "minecraft:oak_slab", "type": "top" , "waterlogged": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/building/slabs/slab_waterlogged_water_flow.json b/tests/building/slabs/slab_waterlogged_water_flow.json new file mode 100644 index 0000000..c3a25e3 --- /dev/null +++ b/tests/building/slabs/slab_waterlogged_water_flow.json @@ -0,0 +1,85 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "slab_waterlogged_water_flow", + "description": "A waterlogged slab acts as a water source and spreads flowing water into adjacent air, while a dry slab does not.", + "tags": ["building", "slab", "waterlogged", "fluid"], + "minecraftIds": ["minecraft:oak_slab", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 3, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [9, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [9, 2, -1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, 2], [9, 2, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [-1, 2, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [4, 1, -1], [4, 2, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [9, 1, -1], [9, 2, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:oak_slab", "type": "bottom", "waterlogged": true} + }, + { + "at": 1, + "do": "place", + "pos": [5, 1, 0], + "block": {"id": "minecraft:oak_slab", "type": "bottom", "waterlogged": false} + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:air"} } + ] + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_slab", "type": "bottom", "waterlogged": true} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water", "level": 1} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:water", "level": 2} }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:oak_slab", "type": "bottom", "waterlogged": false} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/building/slabs/slab_waterlogging_placement.json b/tests/building/slabs/slab_waterlogging_placement.json new file mode 100644 index 0000000..6e4abbd --- /dev/null +++ b/tests/building/slabs/slab_waterlogging_placement.json @@ -0,0 +1,86 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "slab_waterlogging_placement", + "description": "A slab placed into a water source is waterlogged, and merging a waterlogged slab into a double slab removes the water state.", + "tags": ["building", "slab", "waterlogged", "double-slab", "placement", "player"], + "minecraftIds": ["minecraft:oak_slab", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 3, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:oak_slab", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [9, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [9, 2, -1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, 2], [9, 2, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [-1, 2, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [4, 1, -1], [4, 2, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [9, 1, -1], [9, 2, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:water"} }, + { + "at": 1, + "do": "place", + "pos": [6, 1, 0], + "block": {"id": "minecraft:oak_slab", "type": "bottom", "waterlogged": true} + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:water" } }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:oak_slab", "type": "bottom", "waterlogged": true} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [1.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [6.5, 3, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:oak_slab", "type": "bottom", "waterlogged": true } }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:oak_slab", "type": "double", "waterlogged": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/building/slabs/waxed_copper_slab_wax_removal.json b/tests/building/slabs/waxed_copper_slab_wax_removal.json new file mode 100644 index 0000000..b0ba48b --- /dev/null +++ b/tests/building/slabs/waxed_copper_slab_wax_removal.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "waxed_copper_slab_wax_removal", + "description": "An axe removes the wax from a waxed cut copper slab, giving a plain cut copper slab with the same type and waterlogging.", + "tags": ["building", "slab", "copper", "wax", "axe", "player"], + "minecraftIds": ["minecraft:waxed_cut_copper_slab", "minecraft:cut_copper_slab", "minecraft:iron_axe"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 3, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [0, 1, 0], + "block": {"id": "minecraft:waxed_cut_copper_slab", "type": "top", "waterlogged": true} + }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:waxed_cut_copper_slab", "type": "double"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:cut_copper_slab", "type": "top" , "waterlogged": true} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:cut_copper_slab", "type": "double" } } + ] + } + ], + "breakpoints": [] +} + From 140a1e329fb7e81780f6356717e7439bfa540f29 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 12 Oct 2026 07:13:31 +0200 Subject: [PATCH 04/85] Add Flint tests for stairs (64 blocks) --- .../stairs_corner_between_materials.json | 45 +++++++++ .../stairs/stairs_corner_blocked.json | 57 +++++++++++ .../stairs/stairs_corner_neighbor_update.json | 52 ++++++++++ .../stairs/stairs_corner_placement.json | 55 +++++++++++ .../stairs/stairs_shape_vertical_update.json | 36 +++++++ .../stairs/copper_stairs_honeycomb.json | 98 +++++++++++++++++++ .../stairs/copper_stairs_scrape.json | 75 ++++++++++++++ .../stairs/copper_stairs_wax_off.json | 85 ++++++++++++++++ .../stairs/copper_stairs_weathering.json | 67 +++++++++++++ .../stairs/oak_stairs_flammable.json | 47 +++++++++ .../stairs/oak_stairs_furnace_fuel.json | 65 ++++++++++++ .../stairs/stairs_placement_facing.json | 88 +++++++++++++++++ .../stairs/stairs_placement_half.json | 48 +++++++++ .../stairs/stairs_waterlogging_placement.json | 49 ++++++++++ 14 files changed, 867 insertions(+) create mode 100644 tests/connectible/stairs/stairs_corner_between_materials.json create mode 100644 tests/connectible/stairs/stairs_corner_blocked.json create mode 100644 tests/connectible/stairs/stairs_corner_neighbor_update.json create mode 100644 tests/connectible/stairs/stairs_corner_placement.json create mode 100644 tests/connectible/stairs/stairs_shape_vertical_update.json create mode 100644 tests/decoration/stairs/copper_stairs_honeycomb.json create mode 100644 tests/decoration/stairs/copper_stairs_scrape.json create mode 100644 tests/decoration/stairs/copper_stairs_wax_off.json create mode 100644 tests/decoration/stairs/copper_stairs_weathering.json create mode 100644 tests/decoration/stairs/oak_stairs_flammable.json create mode 100644 tests/decoration/stairs/oak_stairs_furnace_fuel.json create mode 100644 tests/decoration/stairs/stairs_placement_facing.json create mode 100644 tests/decoration/stairs/stairs_placement_half.json create mode 100644 tests/decoration/stairs/stairs_waterlogging_placement.json diff --git a/tests/connectible/stairs/stairs_corner_between_materials.json b/tests/connectible/stairs/stairs_corner_between_materials.json new file mode 100644 index 0000000..c3c4f67 --- /dev/null +++ b/tests/connectible/stairs/stairs_corner_between_materials.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "stairs_corner_between_materials", + "description": "Stairs of different materials still form outer and inner corners with each other.", + "tags": ["connectible", "stairs", "shape", "placement", "player"], + "minecraftIds": ["minecraft:stone_stairs", "minecraft:oak_stairs", "minecraft:cut_copper_stairs"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [4, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone_stairs", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 2, 1], "block": {"id": "minecraft:oak_stairs" , "facing": "east"} }, + { "pos": [4, 2, -1], "block": {"id": "minecraft:cut_copper_stairs", "facing": "west"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "outerleft" } }, + { "pos": [4, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "innerright"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/stairs/stairs_corner_blocked.json b/tests/connectible/stairs/stairs_corner_blocked.json new file mode 100644 index 0000000..0a7f1d4 --- /dev/null +++ b/tests/connectible/stairs/stairs_corner_blocked.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "stairs_corner_blocked", + "description": "A placed stair stays straight when the perpendicular neighbor is the opposite half, or when the block on the corner's open side is already a stair with the same facing and half.", + "tags": ["connectible", "stairs", "shape", "placement", "player"], + "minecraftIds": ["minecraft:stone_stairs"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [12, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone_stairs", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 4, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 8, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [12, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 1], "block": {"id": "minecraft:stone_stairs", "facing": "east" , "half": "top"} }, + { "pos": [ 4, 2, 1], "block": {"id": "minecraft:stone_stairs", "facing": "east" } }, + { "pos": [ 3, 2, 0], "block": {"id": "minecraft:stone_stairs", "facing": "south" } }, + { "pos": [ 8, 2, -1], "block": {"id": "minecraft:stone_stairs", "facing": "east" } }, + { "pos": [ 9, 2, 0], "block": {"id": "minecraft:stone_stairs", "facing": "south" } }, + { "pos": [12, 2, -1], "block": {"id": "minecraft:stone_stairs", "facing": "east" , "half": "top"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [8.5, 3, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [12.5, 3, 0.5], "rot": [0, 90] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [ 0, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "straight"} }, + { "pos": [ 4, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "straight"} }, + { "pos": [ 8, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "straight"} }, + { "pos": [12, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "straight"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/stairs/stairs_corner_neighbor_update.json b/tests/connectible/stairs/stairs_corner_neighbor_update.json new file mode 100644 index 0000000..7e7a2dd --- /dev/null +++ b/tests/connectible/stairs/stairs_corner_neighbor_update.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "stairs_corner_neighbor_update", + "description": "An existing straight stair turns into an outer or inner corner when a perpendicular stair appears beside it, and returns to straight when that neighbor is removed.", + "tags": ["connectible", "stairs", "shape", "neighbor-update"], + "minecraftIds": ["minecraft:stone_stairs"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [4, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone_stairs", "facing": "south"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:stone_stairs", "facing": "south"} } + ] + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 1], "block": {"id": "minecraft:stone_stairs", "facing": "east"} }, + { "pos": [4, 1, -1], "block": {"id": "minecraft:stone_stairs", "facing": "west"} } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "outerleft" } }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "innerright"} } + ] + }, + { "at": 3, "do": "remove", "pos": [0, 1, 1] }, + { "at": 3, "do": "remove", "pos": [4, 1, -1] }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "straight"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "straight"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/stairs/stairs_corner_placement.json b/tests/connectible/stairs/stairs_corner_placement.json new file mode 100644 index 0000000..adb8544 --- /dev/null +++ b/tests/connectible/stairs/stairs_corner_placement.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "stairs_corner_placement", + "description": "A stair placed by a player next to a perpendicular same-half stair becomes an outer corner when that stair is in front of it and an inner corner when it is behind, left or right depending on the neighbor's facing.", + "tags": ["connectible", "stairs", "shape", "placement", "player"], + "minecraftIds": ["minecraft:stone_stairs"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [12, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone_stairs", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 4, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 8, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [12, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 1], "block": {"id": "minecraft:stone_stairs", "facing": "east"} }, + { "pos": [ 4, 2, 1], "block": {"id": "minecraft:stone_stairs", "facing": "west"} }, + { "pos": [ 8, 2, -1], "block": {"id": "minecraft:stone_stairs", "facing": "east"} }, + { "pos": [12, 2, -1], "block": {"id": "minecraft:stone_stairs", "facing": "west"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [8.5, 3, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [12.5, 3, 0.5], "rot": [0, 90] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "outerleft"} }, + { "pos": [4, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "outerright"} }, + { "pos": [8, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "innerleft"} }, + { "pos": [12, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "innerright"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/stairs/stairs_shape_vertical_update.json b/tests/connectible/stairs/stairs_shape_vertical_update.json new file mode 100644 index 0000000..991b2e1 --- /dev/null +++ b/tests/connectible/stairs/stairs_shape_vertical_update.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "stairs_shape_vertical_update", + "description": "A stair's corner shape is not changed by blocks placed directly above or below it, since only horizontal neighbor updates recompute the shape.", + "tags": ["connectible", "stairs", "shape", "neighbor-update"], + "minecraftIds": ["minecraft:stone_stairs"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 3, 2] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [1, 1, 2], "block": {"id": "minecraft:stone_stairs", "facing": "south"} }, + { "at": 1, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:stone_stairs", "facing": "east"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 2], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "innerleft"} } + ] + }, + { "at": 3, "do": "place", "pos": [1, 2, 2], "block": {"id": "minecraft:stone"} }, + { "at": 3, "do": "place", "pos": [1, 0, 2], "block": {"id": "minecraft:stone"} }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [1, 1, 2], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "innerleft"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/stairs/copper_stairs_honeycomb.json b/tests/decoration/stairs/copper_stairs_honeycomb.json new file mode 100644 index 0000000..f71ed12 --- /dev/null +++ b/tests/decoration/stairs/copper_stairs_honeycomb.json @@ -0,0 +1,98 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_stairs_honeycomb", + "description": "Honeycomb waxes each cut copper stair stage into its waxed variant and uses one honeycomb per stair, but does nothing to an already waxed stair.", + "tags": ["decoration", "stairs", "copper", "wax", "player"], + "minecraftIds": [ + "minecraft:cut_copper_stairs" , + "minecraft:exposed_cut_copper_stairs" , + "minecraft:weathered_cut_copper_stairs" , + "minecraft:oxidized_cut_copper_stairs" , + "minecraft:waxed_cut_copper_stairs" , + "minecraft:waxed_exposed_cut_copper_stairs" , + "minecraft:waxed_weathered_cut_copper_stairs", + "minecraft:waxed_oxidized_cut_copper_stairs" , + "minecraft:honeycomb" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [12, 3, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 5} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:cut_copper_stairs", "facing": "west", "half": "top"} }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [3, 2, 0], + "block": {"id": "minecraft:exposed_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [6, 2, 0], + "block": {"id": "minecraft:weathered_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { "pos": [9, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [9, 2, 0], + "block": {"id": "minecraft:oxidized_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { "pos": [12, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [12, 2, 0], + "block": {"id": "minecraft:waxed_cut_copper_stairs", "facing": "west", "half": "top"} + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 4, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [6.5, 4, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [9.5, 4, 0.5], "rot": [0, 90] }, + {"at": 4, "do": "interact"}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [12.5, 4, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": {"id": "minecraft:waxed_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { + "pos": [3, 2, 0], + "is": {"id": "minecraft:waxed_exposed_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { + "pos": [6, 2, 0], + "is": {"id": "minecraft:waxed_weathered_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { + "pos": [9, 2, 0], + "is": {"id": "minecraft:waxed_oxidized_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { + "pos": [12, 2, 0], + "is": {"id": "minecraft:waxed_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/stairs/copper_stairs_scrape.json b/tests/decoration/stairs/copper_stairs_scrape.json new file mode 100644 index 0000000..a6830d2 --- /dev/null +++ b/tests/decoration/stairs/copper_stairs_scrape.json @@ -0,0 +1,75 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_stairs_scrape", + "description": "An axe scrapes exposed, weathered and oxidized cut copper stairs back one stage, keeps facing and half, and does nothing to unweathered cut copper stairs.", + "tags": ["decoration", "stairs", "copper", "weathering", "player"], + "minecraftIds": [ + "minecraft:cut_copper_stairs" , + "minecraft:exposed_cut_copper_stairs" , + "minecraft:weathered_cut_copper_stairs", + "minecraft:oxidized_cut_copper_stairs" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [9, 3, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 2, 0], + "block": {"id": "minecraft:exposed_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [3, 2, 0], + "block": {"id": "minecraft:weathered_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [6, 2, 0], + "block": {"id": "minecraft:oxidized_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { "pos": [9, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 2, 0], "block": {"id": "minecraft:cut_copper_stairs", "facing": "west", "half": "top"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 4, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [6.5, 4, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [9.5, 4, 0.5], "rot": [0, 90] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:cut_copper_stairs", "facing": "west", "half": "top"} }, + { + "pos": [3, 2, 0], + "is": {"id": "minecraft:exposed_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { + "pos": [6, 2, 0], + "is": {"id": "minecraft:weathered_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { "pos": [9, 2, 0], "is": {"id": "minecraft:cut_copper_stairs", "facing": "west", "half": "top"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/stairs/copper_stairs_wax_off.json b/tests/decoration/stairs/copper_stairs_wax_off.json new file mode 100644 index 0000000..c37440f --- /dev/null +++ b/tests/decoration/stairs/copper_stairs_wax_off.json @@ -0,0 +1,85 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_stairs_wax_off", + "description": "An axe turns each waxed cut copper stair variant into its unwaxed counterpart and keeps facing and half.", + "tags": ["decoration", "stairs", "copper", "wax", "player"], + "minecraftIds": [ + "minecraft:waxed_cut_copper_stairs" , + "minecraft:waxed_exposed_cut_copper_stairs" , + "minecraft:waxed_weathered_cut_copper_stairs", + "minecraft:waxed_oxidized_cut_copper_stairs" , + "minecraft:cut_copper_stairs" , + "minecraft:exposed_cut_copper_stairs" , + "minecraft:weathered_cut_copper_stairs" , + "minecraft:oxidized_cut_copper_stairs" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [9, 3, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 2, 0], + "block": {"id": "minecraft:waxed_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [3, 2, 0], + "block": {"id": "minecraft:waxed_exposed_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [6, 2, 0], + "block": {"id": "minecraft:waxed_weathered_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { "pos": [9, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [9, 2, 0], + "block": {"id": "minecraft:waxed_oxidized_cut_copper_stairs", "facing": "west", "half": "top"} + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 4, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [6.5, 4, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [9.5, 4, 0.5], "rot": [0, 90] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:cut_copper_stairs", "facing": "west", "half": "top"} }, + { + "pos": [3, 2, 0], + "is": {"id": "minecraft:exposed_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { + "pos": [6, 2, 0], + "is": {"id": "minecraft:weathered_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { + "pos": [9, 2, 0], + "is": {"id": "minecraft:oxidized_cut_copper_stairs", "facing": "west", "half": "top"} + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/stairs/copper_stairs_weathering.json b/tests/decoration/stairs/copper_stairs_weathering.json new file mode 100644 index 0000000..f7ed637 --- /dev/null +++ b/tests/decoration/stairs/copper_stairs_weathering.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_stairs_weathering", + "description": "With a high random tick speed an unwaxed cut copper stair weathers to a later stage and keeps its properties, while a fully oxidized stair and a waxed stair stay unchanged.", + "tags": ["decoration", "stairs", "copper", "weathering", "random-tick"], + "minecraftIds": [ + "minecraft:cut_copper_stairs" , + "minecraft:oxidized_cut_copper_stairs", + "minecraft:waxed_cut_copper_stairs" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [12, 3, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 1000 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:cut_copper_stairs", "facing": "west", "half": "top"} }, + { + "pos": [6, 1, 0], + "block": {"id": "minecraft:oxidized_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { + "pos": [12, 1, 0], + "block": {"id": "minecraft:waxed_cut_copper_stairs", "facing": "west", "half": "top"} + } + ] + }, + { + "at": 800, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": [ + {"id": "minecraft:exposed_cut_copper_stairs" , "facing": "west", "half": "top"}, + {"id": "minecraft:weathered_cut_copper_stairs", "facing": "west", "half": "top"}, + {"id": "minecraft:oxidized_cut_copper_stairs" , "facing": "west", "half": "top"} + ] + }, + { + "pos": [6, 1, 0], + "is": {"id": "minecraft:oxidized_cut_copper_stairs", "facing": "west", "half": "top"} + }, + { + "pos": [12, 1, 0], + "is": {"id": "minecraft:waxed_cut_copper_stairs", "facing": "west", "half": "top"} + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/stairs/oak_stairs_flammable.json b/tests/decoration/stairs/oak_stairs_flammable.json new file mode 100644 index 0000000..b14d0cd --- /dev/null +++ b/tests/decoration/stairs/oak_stairs_flammable.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "oak_stairs_flammable", + "description": "Flint and steel on top of a floating oak stair places fire because the stair is flammable, while the same on a stone stair or a crimson stair places no fire.", + "tags": ["decoration", "stairs", "fire", "flammable", "player"], + "minecraftIds": ["minecraft:oak_stairs", "minecraft:stone_stairs", "minecraft:crimson_stairs"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [8, 4, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:flint_and_steel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 3, 0], "block": {"id": "minecraft:oak_stairs" } }, + { "pos": [4, 3, 0], "block": {"id": "minecraft:stone_stairs" } }, + { "pos": [8, 3, 0], "block": {"id": "minecraft:crimson_stairs"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 5, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 5, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [8.5, 5, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 4, 0], "is": {"id": "minecraft:fire"} }, + { "pos": [4, 4, 0], "is": {"id": "minecraft:air" } }, + { "pos": [8, 4, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/stairs/oak_stairs_furnace_fuel.json b/tests/decoration/stairs/oak_stairs_furnace_fuel.json new file mode 100644 index 0000000..f2dfb0a --- /dev/null +++ b/tests/decoration/stairs/oak_stairs_furnace_fuel.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "oak_stairs_furnace_fuel", + "description": "Oak stairs work as furnace fuel with a 300 tick burn time, while stone stairs and crimson stairs do not light the furnace.", + "tags": ["decoration", "stairs", "fuel", "furnace"], + "minecraftIds": [ + "minecraft:oak_stairs" , "minecraft:stone_stairs" , "minecraft:crimson_stairs", "minecraft:furnace" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:oak_stairs\"}]" + } + } + }, + { + "pos": [2, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:stone_stairs\"}]" + } + } + }, + { + "pos": [4, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:crimson_stairs\"}]" + } + } + } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { "id": "minecraft:furnace", "lit": true, "nbt": {"lit_total_time": "300s"} } + }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:furnace", "lit": false} }, + { "pos": [4, 0, 0], "is": {"id": "minecraft:furnace", "lit": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/stairs/stairs_placement_facing.json b/tests/decoration/stairs/stairs_placement_facing.json new file mode 100644 index 0000000..513ce3f --- /dev/null +++ b/tests/decoration/stairs/stairs_placement_facing.json @@ -0,0 +1,88 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "stairs_placement_facing", + "description": "Survival placement on top of a block gives a stair the player's horizontal facing, bottom half, straight shape, no waterlogging, and consumes the items.", + "tags": ["decoration", "stairs", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:stone_stairs"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [12, 3, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone_stairs", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 4, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 8, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [12, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 4, 0.5], "rot": [90, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [8.5, 4, 0.5], "rot": [180, 90] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [12.5, 4, 0.5], "rot": [-90, 90] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:stone_stairs", + "facing": "south", + "half": "bottom", + "shape": "straight", + "waterlogged": false + } + }, + { + "pos": [4, 2, 0], + "is": { + "id": "minecraft:stone_stairs", + "facing": "west", + "half": "bottom", + "shape": "straight", + "waterlogged": false + } + }, + { + "pos": [8, 2, 0], + "is": { + "id": "minecraft:stone_stairs", + "facing": "north", + "half": "bottom", + "shape": "straight", + "waterlogged": false + } + }, + { + "pos": [12, 2, 0], + "is": { + "id": "minecraft:stone_stairs", + "facing": "east", + "half": "bottom", + "shape": "straight", + "waterlogged": false + } + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/stairs/stairs_placement_half.json b/tests/decoration/stairs/stairs_placement_half.json new file mode 100644 index 0000000..80bad85 --- /dev/null +++ b/tests/decoration/stairs/stairs_placement_half.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "stairs_placement_half", + "description": "Clicking the underside of a block or the upper half of a side face places a top-half stair; clicking the lower half of a side face places a bottom-half stair.", + "tags": ["decoration", "stairs", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:stone_stairs"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [8, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone_stairs", "count": 3} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 3, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 0.13, -2.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [8.5, -0.37, -2.5], "rot": [0, 0] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone_stairs", "half": "top"} }, + { "pos": [4, 1, -1], "is": {"id": "minecraft:stone_stairs", "half": "top"} }, + { "pos": [8, 1, -1], "is": {"id": "minecraft:stone_stairs", "half": "bottom"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/stairs/stairs_waterlogging_placement.json b/tests/decoration/stairs/stairs_waterlogging_placement.json new file mode 100644 index 0000000..ccb991a --- /dev/null +++ b/tests/decoration/stairs/stairs_waterlogging_placement.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "stairs_waterlogging_placement", + "description": "A stair placed into a water source becomes waterlogged, while one placed into flowing water or air is not waterlogged.", + "tags": ["decoration", "stairs", "placement", "waterlogging", "player"], + "minecraftIds": ["minecraft:stone_stairs", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [8, 3, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone_stairs", "count": 3} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [8, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:water", "level": 1} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [8.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone_stairs", "waterlogged": true } }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:stone_stairs", "waterlogged": false} }, + { "pos": [8, 1, 0], "is": {"id": "minecraft:stone_stairs", "waterlogged": false} } + ] + } + ], + "breakpoints": [] +} + From 114c74738d108e6ead704eed439de8e16e9dc165 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Tue, 13 Oct 2026 00:41:19 +0200 Subject: [PATCH 05/85] add an assert --- tests/building/slabs/copper_slab_waxing.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/building/slabs/copper_slab_waxing.json b/tests/building/slabs/copper_slab_waxing.json index 453d802..b730d5b 100644 --- a/tests/building/slabs/copper_slab_waxing.json +++ b/tests/building/slabs/copper_slab_waxing.json @@ -48,7 +48,8 @@ "is": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "top", "waterlogged": true} }, { "pos": [3, 1, 0], "is": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "double"} }, - { "pos": [6, 1, 0], "is": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "bottom"} } + { "pos": [6, 1, 0], "is": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "bottom"} }, + { "is": {"id": "minecraft:honeycomb", "count": 2}, "slot": "hotbar1" } ] } ], From f632293601887c10ad3e1568ad182031d7e9c361 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Tue, 13 Oct 2026 00:42:16 +0200 Subject: [PATCH 06/85] format --- tests/building/slabs/copper_slab_waxing.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/building/slabs/copper_slab_waxing.json b/tests/building/slabs/copper_slab_waxing.json index b730d5b..185242d 100644 --- a/tests/building/slabs/copper_slab_waxing.json +++ b/tests/building/slabs/copper_slab_waxing.json @@ -48,7 +48,7 @@ "is": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "top", "waterlogged": true} }, { "pos": [3, 1, 0], "is": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "double"} }, - { "pos": [6, 1, 0], "is": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "bottom"} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "bottom"} }, { "is": {"id": "minecraft:honeycomb", "count": 2}, "slot": "hotbar1" } ] } From a745243e42cf637372324fd6b00972d5c1fcffbe Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Tue, 13 Oct 2026 06:13:22 +0200 Subject: [PATCH 07/85] Add Flint tests for air (1 blocks) --- tests/world/air/air_fill_clears_region.json | 42 +++++++++++++++++++ .../air_item_empty_hand_places_nothing.json | 35 ++++++++++++++++ tests/world/air/air_no_support_for_torch.json | 37 ++++++++++++++++ tests/world/air/air_place_replaces_block.json | 34 +++++++++++++++ .../world/air/air_replaceable_placement.json | 41 ++++++++++++++++++ 5 files changed, 189 insertions(+) create mode 100644 tests/world/air/air_fill_clears_region.json create mode 100644 tests/world/air/air_item_empty_hand_places_nothing.json create mode 100644 tests/world/air/air_no_support_for_torch.json create mode 100644 tests/world/air/air_place_replaces_block.json create mode 100644 tests/world/air/air_replaceable_placement.json diff --git a/tests/world/air/air_fill_clears_region.json b/tests/world/air/air_fill_clears_region.json new file mode 100644 index 0000000..b7b045b --- /dev/null +++ b/tests/world/air/air_fill_clears_region.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "air_fill_clears_region", + "description": "Filling a stone region with air turns every position in it into air and leaves blocks outside untouched.", + "tags": ["world", "air", "fill"], + "minecraftIds": ["minecraft:air"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 2, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 2, 4] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [1, 1, 1], [3, 2, 3] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [2, 2, 2], "is": {"id": "minecraft:air" } }, + { "pos": [3, 2, 3], "is": {"id": "minecraft:air" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone"} }, + { "pos": [2, 0, 2], "is": {"id": "minecraft:stone"} }, + { "pos": [4, 2, 4], "is": {"id": "minecraft:stone"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/air/air_item_empty_hand_places_nothing.json b/tests/world/air/air_item_empty_hand_places_nothing.json new file mode 100644 index 0000000..55864ab --- /dev/null +++ b/tests/world/air/air_item_empty_hand_places_nothing.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "air_item_empty_hand_places_nothing", + "description": "Interacting with the air item (an empty hand) against a stone block places nothing, so the air cell above stays air.", + "tags": ["world", "air", "item", "player"], + "minecraftIds": ["minecraft:air"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:air", "count": 0} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [1.5, 4, 1.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:stone"} }, + { "pos": [1, 2, 1], "is": {"id": "minecraft:air"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/air/air_no_support_for_torch.json b/tests/world/air/air_no_support_for_torch.json new file mode 100644 index 0000000..0255368 --- /dev/null +++ b/tests/world/air/air_no_support_for_torch.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "air_no_support_for_torch", + "description": "A torch on stone stays put, but breaks once the stone becomes air because air has an empty shape and gives no support.", + "tags": ["world", "air", "support", "neighbor-update"], + "minecraftIds": ["minecraft:air", "minecraft:torch"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 3, 2] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "place", "pos": [1, 2, 1], "block": {"id": "minecraft:torch"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:stone"} }, + { "pos": [1, 2, 1], "is": {"id": "minecraft:torch"} } + ] + }, + { "at": 3, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:air"} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air"} }, + { "pos": [1, 2, 1], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/air/air_place_replaces_block.json b/tests/world/air/air_place_replaces_block.json new file mode 100644 index 0000000..e602cfe --- /dev/null +++ b/tests/world/air/air_place_replaces_block.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "air_place_replaces_block", + "description": "Placing air over a stone block replaces it with plain air that has no block states.", + "tags": ["world", "air", "placement"], + "minecraftIds": ["minecraft:air"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 2, 2] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:stone"} } + ] + }, + { "at": 2, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:air"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/air/air_replaceable_placement.json b/tests/world/air/air_replaceable_placement.json new file mode 100644 index 0000000..ad7e035 --- /dev/null +++ b/tests/world/air/air_replaceable_placement.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "air_replaceable_placement", + "description": "A survival player placing stone against the top face of a stone block fills the replaceable air cell above it and consumes one item.", + "tags": ["world", "air", "replaceable", "placement", "player"], + "minecraftIds": ["minecraft:air"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [1, 2, 1], "is": {"id": "minecraft:air"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [1.5, 4, 1.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [1, 2, 1], "is": {"id": "minecraft:stone" } }, + { "is": {"id": "minecraft:stone", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + From 888aef7571890b291dd807efca52020727169899 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sat, 17 Oct 2026 05:19:59 +0200 Subject: [PATCH 08/85] Add Flint tests for beacon (1 blocks) --- .../beacon_bedrock_above_keeps_beam.json | 36 +++++++++++ .../beacon_broken_layer_caps_level.json | 54 ++++++++++++++++ .../beacon_covered_keeps_stored_level.json | 46 +++++++++++++ ...on_effect_applied_without_level_check.json | 37 +++++++++++ .../beacon_full_pyramid_level_four.json | 53 +++++++++++++++ .../beacon_glass_above_keeps_beam.json | 36 +++++++++++ ...el_four_primary_and_secondary_effects.json | 64 +++++++++++++++++++ ..._level_four_same_effect_amplifier_one.json | 64 +++++++++++++++++++ .../beacon_level_one_speed_effect.json | 37 +++++++++++ .../beacon_mixed_material_pyramid.json | 54 ++++++++++++++++ .../beacons/beacon_no_pyramid_level_zero.json | 30 +++++++++ .../beacons/beacon_one_layer_level_one.json | 35 ++++++++++ ...beacon_opaque_block_above_blocks_beam.json | 36 +++++++++++ .../beacon_primary_effect_nbt_round_trip.json | 40 ++++++++++++ .../beacons/beacon_survival_placement.json | 35 ++++++++++ 15 files changed, 657 insertions(+) create mode 100644 tests/decoration/beacons/beacon_bedrock_above_keeps_beam.json create mode 100644 tests/decoration/beacons/beacon_broken_layer_caps_level.json create mode 100644 tests/decoration/beacons/beacon_covered_keeps_stored_level.json create mode 100644 tests/decoration/beacons/beacon_effect_applied_without_level_check.json create mode 100644 tests/decoration/beacons/beacon_full_pyramid_level_four.json create mode 100644 tests/decoration/beacons/beacon_glass_above_keeps_beam.json create mode 100644 tests/decoration/beacons/beacon_level_four_primary_and_secondary_effects.json create mode 100644 tests/decoration/beacons/beacon_level_four_same_effect_amplifier_one.json create mode 100644 tests/decoration/beacons/beacon_level_one_speed_effect.json create mode 100644 tests/decoration/beacons/beacon_mixed_material_pyramid.json create mode 100644 tests/decoration/beacons/beacon_no_pyramid_level_zero.json create mode 100644 tests/decoration/beacons/beacon_one_layer_level_one.json create mode 100644 tests/decoration/beacons/beacon_opaque_block_above_blocks_beam.json create mode 100644 tests/decoration/beacons/beacon_primary_effect_nbt_round_trip.json create mode 100644 tests/decoration/beacons/beacon_survival_placement.json diff --git a/tests/decoration/beacons/beacon_bedrock_above_keeps_beam.json b/tests/decoration/beacons/beacon_bedrock_above_keeps_beam.json new file mode 100644 index 0000000..2dd5251 --- /dev/null +++ b/tests/decoration/beacons/beacon_bedrock_above_keeps_beam.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_bedrock_above_keeps_beam", + "description": "Bedrock above a beacon does not block the beam, so the pyramid level is reached.", + "tags": ["decoration", "beacon", "levels", "beam"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 6, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 3, -1], [1, 3, 1] ], + "with": {"id": "minecraft:iron_block"} + }, + { "at": 0, "do": "place", "pos": [0, 5, 0], "block": {"id": "minecraft:bedrock"} }, + { "at": 0, "do": "place", "pos": [0, 4, 0], "block": {"id": "minecraft:beacon"} }, + { + "at": 170, + "do": "assert", + "checks": [ + { + "pos": [0, 4, 0], + "is": { "id": "minecraft:beacon", "nbt": {"Levels": 1} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beacons/beacon_broken_layer_caps_level.json b/tests/decoration/beacons/beacon_broken_layer_caps_level.json new file mode 100644 index 0000000..246b37e --- /dev/null +++ b/tests/decoration/beacons/beacon_broken_layer_caps_level.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_broken_layer_caps_level", + "description": "One non-base block in the 5x5 layer caps a beacon at level 1.", + "tags": ["decoration", "beacon", "levels", "pyramid"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 6, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -4], [4, 0, 4] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 1, -3], [3, 1, 3] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-2, 2, -2], [2, 2, 2] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 3, -1], [1, 3, 1] ], + "with": {"id": "minecraft:iron_block"} + }, + { "at": 0, "do": "place", "pos": [2, 2, 2], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 4, 0], "block": {"id": "minecraft:beacon"} }, + { + "at": 170, + "do": "assert", + "checks": [ + { + "pos": [0, 4, 0], + "is": { "id": "minecraft:beacon", "nbt": {"Levels": 1} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beacons/beacon_covered_keeps_stored_level.json b/tests/decoration/beacons/beacon_covered_keeps_stored_level.json new file mode 100644 index 0000000..28397ad --- /dev/null +++ b/tests/decoration/beacons/beacon_covered_keeps_stored_level.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_covered_keeps_stored_level", + "description": "Covering a working level 1 beacon with stone leaves its stored level at 1, because levels only update while a beam exists.", + "tags": ["decoration", "beacon", "levels", "beam"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 6, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 3, -1], [1, 3, 1] ], + "with": {"id": "minecraft:iron_block"} + }, + { "at": 0, "do": "place", "pos": [0, 4, 0], "block": {"id": "minecraft:beacon"} }, + { + "at": 170, + "do": "assert", + "checks": [ + { + "pos": [0, 4, 0], + "is": { "id": "minecraft:beacon", "nbt": {"Levels": 1} } + } + ] + }, + { "at": 171, "do": "place", "pos": [0, 5, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 340, + "do": "assert", + "checks": [ + { + "pos": [0, 4, 0], + "is": { "id": "minecraft:beacon", "nbt": {"Levels": 1} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beacons/beacon_effect_applied_without_level_check.json b/tests/decoration/beacons/beacon_effect_applied_without_level_check.json new file mode 100644 index 0000000..d15dff4 --- /dev/null +++ b/tests/decoration/beacons/beacon_effect_applied_without_level_check.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_effect_applied_without_level_check", + "description": "A level 1 beacon whose NBT sets the level 4 only Regeneration effect still applies it, since the level check is only in the menu.", + "tags": ["decoration", "beacon", "effects", "player"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 6, 4] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 3, -1], [1, 3, 1] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "place", + "pos": [0, 4, 0], + "block": { "id": "minecraft:beacon", "nbt": {"primary_effect": "minecraft:regeneration"} } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 5, 0.5] }, + { + "at": 170, + "do": "assert", + "checks": [ {"is": "minecraft:player", "active_effects[0].id": "minecraft:regeneration"} ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beacons/beacon_full_pyramid_level_four.json b/tests/decoration/beacons/beacon_full_pyramid_level_four.json new file mode 100644 index 0000000..190958c --- /dev/null +++ b/tests/decoration/beacons/beacon_full_pyramid_level_four.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_full_pyramid_level_four", + "description": "A beacon on a four layer iron pyramid reaches the maximum level 4.", + "tags": ["decoration", "beacon", "levels", "pyramid"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 6, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -4], [4, 0, 4] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 1, -3], [3, 1, 3] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-2, 2, -2], [2, 2, 2] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 3, -1], [1, 3, 1] ], + "with": {"id": "minecraft:iron_block"} + }, + { "at": 0, "do": "place", "pos": [0, 4, 0], "block": {"id": "minecraft:beacon"} }, + { + "at": 170, + "do": "assert", + "checks": [ + { + "pos": [0, 4, 0], + "is": { "id": "minecraft:beacon", "nbt": {"Levels": 4} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beacons/beacon_glass_above_keeps_beam.json b/tests/decoration/beacons/beacon_glass_above_keeps_beam.json new file mode 100644 index 0000000..dd2d05a --- /dev/null +++ b/tests/decoration/beacons/beacon_glass_above_keeps_beam.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_glass_above_keeps_beam", + "description": "Glass above a beacon does not block the beam, so the pyramid level is reached.", + "tags": ["decoration", "beacon", "levels", "beam"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 6, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 3, -1], [1, 3, 1] ], + "with": {"id": "minecraft:iron_block"} + }, + { "at": 0, "do": "place", "pos": [0, 5, 0], "block": {"id": "minecraft:glass"} }, + { "at": 0, "do": "place", "pos": [0, 4, 0], "block": {"id": "minecraft:beacon"} }, + { + "at": 170, + "do": "assert", + "checks": [ + { + "pos": [0, 4, 0], + "is": { "id": "minecraft:beacon", "nbt": {"Levels": 1} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beacons/beacon_level_four_primary_and_secondary_effects.json b/tests/decoration/beacons/beacon_level_four_primary_and_secondary_effects.json new file mode 100644 index 0000000..07fe328 --- /dev/null +++ b/tests/decoration/beacons/beacon_level_four_primary_and_secondary_effects.json @@ -0,0 +1,64 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_level_four_primary_and_secondary_effects", + "description": "A level 4 beacon with Speed primary and Regeneration secondary gives the player both effects.", + "tags": ["decoration", "beacon", "effects", "player"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 6, 4] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -4], [4, 0, 4] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 1, -3], [3, 1, 3] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-2, 2, -2], [2, 2, 2] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 3, -1], [1, 3, 1] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "place", + "pos": [0, 4, 0], + "block": { + "id": "minecraft:beacon", + "nbt": {"primary_effect": "minecraft:speed", "secondary_effect": "minecraft:regeneration"} + } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 5, 0.5] }, + { + "at": 170, + "do": "assert", + "checks": [ + { + "is" : "minecraft:player" , + "active_effects[0].id": "minecraft:speed" , + "active_effects[1].id": "minecraft:regeneration" + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beacons/beacon_level_four_same_effect_amplifier_one.json b/tests/decoration/beacons/beacon_level_four_same_effect_amplifier_one.json new file mode 100644 index 0000000..bbe7478 --- /dev/null +++ b/tests/decoration/beacons/beacon_level_four_same_effect_amplifier_one.json @@ -0,0 +1,64 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_level_four_same_effect_amplifier_one", + "description": "A level 4 beacon with Speed as both primary and secondary gives Speed at amplifier 1.", + "tags": ["decoration", "beacon", "effects", "player"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 6, 4] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -4], [4, 0, 4] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 1, -3], [3, 1, 3] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-2, 2, -2], [2, 2, 2] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 3, -1], [1, 3, 1] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "place", + "pos": [0, 4, 0], + "block": { + "id": "minecraft:beacon", + "nbt": {"primary_effect": "minecraft:speed", "secondary_effect": "minecraft:speed"} + } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 5, 0.5] }, + { + "at": 170, + "do": "assert", + "checks": [ + { + "is" : "minecraft:player", + "active_effects[0].id" : "minecraft:speed" , + "active_effects[0].amplifier": "1b" + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beacons/beacon_level_one_speed_effect.json b/tests/decoration/beacons/beacon_level_one_speed_effect.json new file mode 100644 index 0000000..f64b699 --- /dev/null +++ b/tests/decoration/beacons/beacon_level_one_speed_effect.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_level_one_speed_effect", + "description": "A level 1 beacon with Speed as primary gives a player in range the Speed effect.", + "tags": ["decoration", "beacon", "effects", "player"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 6, 4] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 3, -1], [1, 3, 1] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "place", + "pos": [0, 4, 0], + "block": { "id": "minecraft:beacon", "nbt": {"primary_effect": "minecraft:speed"} } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 5, 0.5] }, + { + "at": 170, + "do": "assert", + "checks": [ {"is": "minecraft:player", "active_effects[0].id": "minecraft:speed"} ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beacons/beacon_mixed_material_pyramid.json b/tests/decoration/beacons/beacon_mixed_material_pyramid.json new file mode 100644 index 0000000..6435152 --- /dev/null +++ b/tests/decoration/beacons/beacon_mixed_material_pyramid.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_mixed_material_pyramid", + "description": "A pyramid mixing iron, gold, emerald and diamond layers still counts as level 4, and netherite counts in the top layer.", + "tags": ["decoration", "beacon", "levels", "pyramid"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 6, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -4], [4, 0, 4] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 1, -3], [3, 1, 3] ], + "with": {"id": "minecraft:gold_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-2, 2, -2], [2, 2, 2] ], + "with": {"id": "minecraft:emerald_block"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 3, -1], [1, 3, 1] ], + "with": {"id": "minecraft:diamond_block"} + }, + { "at": 0, "do": "place", "pos": [0, 3, 0], "block": {"id": "minecraft:netherite_block"} }, + { "at": 0, "do": "place", "pos": [0, 4, 0], "block": {"id": "minecraft:beacon"} }, + { + "at": 170, + "do": "assert", + "checks": [ + { + "pos": [0, 4, 0], + "is": { "id": "minecraft:beacon", "nbt": {"Levels": 4} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beacons/beacon_no_pyramid_level_zero.json b/tests/decoration/beacons/beacon_no_pyramid_level_zero.json new file mode 100644 index 0000000..b3196e2 --- /dev/null +++ b/tests/decoration/beacons/beacon_no_pyramid_level_zero.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_no_pyramid_level_zero", + "description": "A beacon with open sky but no base blocks stays at level 0.", + "tags": ["decoration", "beacon", "levels"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 6, 4] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 3, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 4, 0], "block": {"id": "minecraft:beacon"} }, + { + "at": 170, + "do": "assert", + "checks": [ + { + "pos": [0, 4, 0], + "is": { "id": "minecraft:beacon", "nbt": {"Levels": 0} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beacons/beacon_one_layer_level_one.json b/tests/decoration/beacons/beacon_one_layer_level_one.json new file mode 100644 index 0000000..b06bf4c --- /dev/null +++ b/tests/decoration/beacons/beacon_one_layer_level_one.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_one_layer_level_one", + "description": "A beacon on a full 3x3 iron block layer reaches level 1.", + "tags": ["decoration", "beacon", "levels", "pyramid"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 6, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 3, -1], [1, 3, 1] ], + "with": {"id": "minecraft:iron_block"} + }, + { "at": 0, "do": "place", "pos": [0, 4, 0], "block": {"id": "minecraft:beacon"} }, + { + "at": 170, + "do": "assert", + "checks": [ + { + "pos": [0, 4, 0], + "is": { "id": "minecraft:beacon", "nbt": {"Levels": 1} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beacons/beacon_opaque_block_above_blocks_beam.json b/tests/decoration/beacons/beacon_opaque_block_above_blocks_beam.json new file mode 100644 index 0000000..2d485d7 --- /dev/null +++ b/tests/decoration/beacons/beacon_opaque_block_above_blocks_beam.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_opaque_block_above_blocks_beam", + "description": "A stone block directly above a beacon on a valid pyramid keeps it at level 0.", + "tags": ["decoration", "beacon", "levels", "beam"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 6, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 3, -1], [1, 3, 1] ], + "with": {"id": "minecraft:iron_block"} + }, + { "at": 0, "do": "place", "pos": [0, 5, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 4, 0], "block": {"id": "minecraft:beacon"} }, + { + "at": 170, + "do": "assert", + "checks": [ + { + "pos": [0, 4, 0], + "is": { "id": "minecraft:beacon", "nbt": {"Levels": 0} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beacons/beacon_primary_effect_nbt_round_trip.json b/tests/decoration/beacons/beacon_primary_effect_nbt_round_trip.json new file mode 100644 index 0000000..f06c01b --- /dev/null +++ b/tests/decoration/beacons/beacon_primary_effect_nbt_round_trip.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_primary_effect_nbt_round_trip", + "description": "A placed beacon keeps a valid primary effect in its block entity data.", + "tags": ["decoration", "beacon", "nbt"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 6, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 3, -1], [1, 3, 1] ], + "with": {"id": "minecraft:iron_block"} + }, + { + "at": 0, + "do": "place", + "pos": [0, 4, 0], + "block": { "id": "minecraft:beacon", "nbt": {"primary_effect": "minecraft:speed"} } + }, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 4, 0], + "is": { "id": "minecraft:beacon", "nbt": {"primary_effect": "minecraft:speed"} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beacons/beacon_survival_placement.json b/tests/decoration/beacons/beacon_survival_placement.json new file mode 100644 index 0000000..d9aa03f --- /dev/null +++ b/tests/decoration/beacons/beacon_survival_placement.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "beacon_survival_placement", + "description": "A survival player placing a beacon on stone creates a beacon block and uses up the item.", + "tags": ["decoration", "beacon", "placement", "player"], + "minecraftIds": ["minecraft:beacon"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:beacon", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:beacon"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + From b3beaf6ec0891475cc823073d44bd9aab46fb592 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sat, 17 Oct 2026 06:43:55 +0200 Subject: [PATCH 09/85] Add Flint tests for big_dripleaf (1 blocks) --- .../big_dripleaf_bonemeal_blocked.json | 69 ++++++++++++++++ .../big_dripleaf_bonemeal_growth.json | 46 +++++++++++ .../big_dripleaf_bonemeal_into_water.json | 60 ++++++++++++++ .../big_dripleaf_bonemeal_waterlogged.json | 61 ++++++++++++++ ..._dripleaf_leaf_above_converts_to_stem.json | 60 ++++++++++++++ .../big_dripleaf_piston_destroys.json | 46 +++++++++++ .../big_dripleaf_place_in_water.json | 51 ++++++++++++ .../big_dripleaf_place_on_dirt.json | 41 ++++++++++ .../big_dripleaf_place_on_leaf.json | 51 ++++++++++++ .../big_dripleaf_place_on_stone_rejected.json | 38 +++++++++ .../big_dripleaf_place_on_supports.json | 81 +++++++++++++++++++ .../big_dripleaf_redstone_resets_tilt.json | 66 +++++++++++++++ .../big_dripleaf_support_loss.json | 37 +++++++++ ...ripleaf_unsupported_only_checks_below.json | 45 +++++++++++ 14 files changed, 752 insertions(+) create mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_blocked.json create mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_growth.json create mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_into_water.json create mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_waterlogged.json create mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_leaf_above_converts_to_stem.json create mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_piston_destroys.json create mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_place_in_water.json create mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_place_on_dirt.json create mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_place_on_leaf.json create mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_place_on_stone_rejected.json create mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_place_on_supports.json create mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_redstone_resets_tilt.json create mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_support_loss.json create mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_unsupported_only_checks_below.json diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_blocked.json b/tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_blocked.json new file mode 100644 index 0000000..9ab42f1 --- /dev/null +++ b/tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_blocked.json @@ -0,0 +1,69 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "big_dripleaf_bonemeal_blocked", + "description": "Bone meal on a big dripleaf with a solid block above does nothing and is not used up. A second leaf with air above, hit with the same aim, grows as a control.", + "tags": ["vegetation", "big-dripleaf", "bone-meal", "growth", "player"], + "minecraftIds": ["minecraft:big_dripleaf", "minecraft:bone_meal", "minecraft:dirt", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, 0], [0, 2, 2] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 0, 0, 2], "block": {"id": "minecraft:dirt" } }, + { "pos": [-2, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [-2, 0, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 2, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:big_dripleaf", "facing": "north"} }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:big_dripleaf", "facing": "north"} } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:big_dripleaf", "facing": "north"} }, + { "pos": [0, 1, 2], "is": {"id": "minecraft:big_dripleaf", "facing": "north"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone" } } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [-1.5, 1, 0.5], "rot": [-90, 28.7] }, + {"at": 3, "do": "interact", "item": "minecraft:bone_meal"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone"} } , + { "slot": "hotbar1", "is": {"id": "minecraft:bone_meal", "count": 1} } + ] + }, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [-1.5, 1, 2.5], "rot": [-90, 28.7] }, + {"at": 5, "do": "interact", "item": "minecraft:bone_meal"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 1, 2], "is": {"id": "minecraft:big_dripleaf_stem", "facing": "north" } }, + { "pos": [0, 2, 2], "is": {"id": "minecraft:big_dripleaf" , "facing": "north", "tilt": "none"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:big_dripleaf" , "facing": "north", "tilt": "none"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_growth.json b/tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_growth.json new file mode 100644 index 0000000..3981606 --- /dev/null +++ b/tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_growth.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "big_dripleaf_bonemeal_growth", + "description": "Bone meal on a big dripleaf with air above turns the leaf into a stem and adds a new leaf on top with the same facing; a survival player uses up the bone meal.", + "tags": ["vegetation", "big-dripleaf", "bone-meal", "growth", "player"], + "minecraftIds": ["minecraft:big_dripleaf", "minecraft:big_dripleaf_stem", "minecraft:bone_meal", "minecraft:dirt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:dirt"} }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:big_dripleaf", "facing": "east"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:big_dripleaf", "facing": "east", "tilt": "none"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact", "item": "minecraft:bone_meal"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:big_dripleaf_stem", "facing": "east", "waterlogged": false} + }, + { + "pos": [0, 2, 0], + "is": {"id": "minecraft:big_dripleaf", "facing": "east", "tilt": "none", "waterlogged": false} + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_into_water.json b/tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_into_water.json new file mode 100644 index 0000000..427d7eb --- /dev/null +++ b/tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_into_water.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "big_dripleaf_bonemeal_into_water", + "description": "Bone meal on a big dripleaf with a water source above grows the new top leaf into the water, making it waterlogged, while the stem left below stays dry.", + "tags": ["vegetation", "big-dripleaf", "bone-meal", "growth", "player", "waterlogging"], + "minecraftIds": [ + "minecraft:big_dripleaf" , "minecraft:big_dripleaf_stem", "minecraft:bone_meal" , + "minecraft:water" , "minecraft:dirt" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 1, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [-1, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 2, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 2, -1], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:big_dripleaf", "facing": "west"} }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:water"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:big_dripleaf", "facing": "west", "waterlogged": false} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:water", "level": 0} } + ] + }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact", "item": "minecraft:bone_meal"}, + { + "at": 4, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:big_dripleaf_stem", "facing": "west", "waterlogged": false} + }, + { + "pos": [0, 2, 0], + "is": {"id": "minecraft:big_dripleaf", "facing": "west", "tilt": "none", "waterlogged": true} + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_waterlogged.json b/tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_waterlogged.json new file mode 100644 index 0000000..3011799 --- /dev/null +++ b/tests/vegetation/big_dripleaf/big_dripleaf_bonemeal_waterlogged.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "big_dripleaf_bonemeal_waterlogged", + "description": "Bone meal on a waterlogged big dripleaf leaves a waterlogged stem behind; the new leaf grown into the air above is not waterlogged.", + "tags": ["vegetation", "big-dripleaf", "bone-meal", "growth", "player", "waterlogging"], + "minecraftIds": ["minecraft:big_dripleaf", "minecraft:big_dripleaf_stem", "minecraft:bone_meal", "minecraft:dirt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:big_dripleaf", "facing": "south", "waterlogged": true} + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:big_dripleaf", "facing": "south", "waterlogged": true} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact", "item": "minecraft:bone_meal"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:big_dripleaf_stem", "facing": "south", "waterlogged": true} + }, + { + "pos": [0, 2, 0], + "is": {"id": "minecraft:big_dripleaf", "facing": "south", "tilt": "none", "waterlogged": false} + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_leaf_above_converts_to_stem.json b/tests/vegetation/big_dripleaf/big_dripleaf_leaf_above_converts_to_stem.json new file mode 100644 index 0000000..a4ca204 --- /dev/null +++ b/tests/vegetation/big_dripleaf/big_dripleaf_leaf_above_converts_to_stem.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "big_dripleaf_leaf_above_converts_to_stem", + "description": "When a big dripleaf is set directly above another leaf, the lower leaf turns into a big dripleaf stem that keeps its facing and waterlogged state.", + "tags": ["vegetation", "big-dripleaf", "block-state", "neighbor-update", "waterlogging"], + "minecraftIds": ["minecraft:big_dripleaf", "minecraft:big_dripleaf_stem", "minecraft:dirt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:big_dripleaf", "facing": "south", "waterlogged": true} + }, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:big_dripleaf", "facing": "south", "waterlogged": true, "tilt": "none"} + } + ] + }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:big_dripleaf", "facing": "north"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:big_dripleaf_stem", "facing": "south", "waterlogged": true} + }, + { + "pos": [0, 2, 0], + "is": {"id": "minecraft:big_dripleaf", "facing": "north", "waterlogged": false, "tilt": "none"} + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_piston_destroys.json b/tests/vegetation/big_dripleaf/big_dripleaf_piston_destroys.json new file mode 100644 index 0000000..9c0d212 --- /dev/null +++ b/tests/vegetation/big_dripleaf/big_dripleaf_piston_destroys.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "big_dripleaf_piston_destroys", + "description": "A piston extending into a big dripleaf destroys the leaf instead of pushing it, because the leaf's push reaction is DESTROY. The piston head takes its place and nothing is pushed into the next block.", + "tags": ["vegetation", "big-dripleaf", "piston", "push-reaction", "redstone"], + "minecraftIds": ["minecraft:big_dripleaf", "minecraft:piston", "minecraft:redstone_block", "minecraft:dirt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, 0], [1, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:piston", "facing": "east"} } + ] + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:big_dripleaf", "facing": "north"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0] , "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none"} }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": false} } + ] + }, + { "at": 2, "do": "place", "pos": [-2, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [-1, 1, 0], "is": {"id": "minecraft:piston" , "facing": "east", "extended": true} }, + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east" } }, + { "pos": [ 1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [ 0, 0, 0], "is": {"id": "minecraft:dirt" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_place_in_water.json b/tests/vegetation/big_dripleaf/big_dripleaf_place_in_water.json new file mode 100644 index 0000000..ffba86e --- /dev/null +++ b/tests/vegetation/big_dripleaf/big_dripleaf_place_in_water.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "big_dripleaf_place_in_water", + "description": "Placing a big dripleaf into a water source on top of dirt produces a waterlogged leaf.", + "tags": ["vegetation", "big-dripleaf", "placement", "player", "waterlogging"], + "minecraftIds": ["minecraft:big_dripleaf", "minecraft:dirt", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 1, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:water"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:big_dripleaf"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none", "waterlogged": true} + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_place_on_dirt.json b/tests/vegetation/big_dripleaf/big_dripleaf_place_on_dirt.json new file mode 100644 index 0000000..7c0c4d7 --- /dev/null +++ b/tests/vegetation/big_dripleaf/big_dripleaf_place_on_dirt.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "big_dripleaf_place_on_dirt", + "description": "A survival player placing a big dripleaf on dirt creates an untilted, non-waterlogged leaf facing opposite the player's horizontal look direction and consumes the item.", + "tags": ["vegetation", "big-dripleaf", "placement", "player", "block-state"], + "minecraftIds": ["minecraft:big_dripleaf", "minecraft:dirt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:dirt"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [90, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:big_dripleaf"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt"} }, + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:big_dripleaf", "facing": "east", "tilt": "none", "waterlogged": false} + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_place_on_leaf.json b/tests/vegetation/big_dripleaf/big_dripleaf_place_on_leaf.json new file mode 100644 index 0000000..46ef920 --- /dev/null +++ b/tests/vegetation/big_dripleaf/big_dripleaf_place_on_leaf.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "big_dripleaf_place_on_leaf", + "description": "Placing a big dripleaf on top of another leaf turns the lower leaf into a stem with the same facing, and the new leaf copies that facing instead of the player's look direction.", + "tags": ["vegetation", "big-dripleaf", "placement", "player", "block-state", "neighbor-update"], + "minecraftIds": ["minecraft:big_dripleaf", "minecraft:big_dripleaf_stem", "minecraft:dirt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:big_dripleaf", "facing": "east"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:big_dripleaf", "facing": "east", "tilt": "none"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:big_dripleaf"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:big_dripleaf_stem", "facing": "east", "waterlogged": false} + }, + { + "pos": [0, 2, 0], + "is": {"id": "minecraft:big_dripleaf", "facing": "east", "tilt": "none", "waterlogged": false} + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_place_on_stone_rejected.json b/tests/vegetation/big_dripleaf/big_dripleaf_place_on_stone_rejected.json new file mode 100644 index 0000000..078fc0d --- /dev/null +++ b/tests/vegetation/big_dripleaf/big_dripleaf_place_on_stone_rejected.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "big_dripleaf_place_on_stone_rejected", + "description": "A big dripleaf cannot be placed on stone, which is not in supports_big_dripleaf; nothing is placed and the item is kept.", + "tags": ["vegetation", "big-dripleaf", "placement", "player", "support"], + "minecraftIds": ["minecraft:big_dripleaf", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:big_dripleaf"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:big_dripleaf", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_place_on_supports.json b/tests/vegetation/big_dripleaf/big_dripleaf_place_on_supports.json new file mode 100644 index 0000000..6d27bb2 --- /dev/null +++ b/tests/vegetation/big_dripleaf/big_dripleaf_place_on_supports.json @@ -0,0 +1,81 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "big_dripleaf_place_on_supports", + "description": "A big dripleaf item can be placed on blocks from the supports_big_dripleaf tag: grass block, moss block, clay, mud and farmland.", + "tags": ["vegetation", "big-dripleaf", "placement", "player", "support"], + "minecraftIds": [ + "minecraft:big_dripleaf", "minecraft:grass_block" , "minecraft:moss_block" , "minecraft:clay" , + "minecraft:mud" , "minecraft:farmland" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [8, 1, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:moss_block" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:clay" } }, + { "pos": [6, 0, 0], "block": {"id": "minecraft:mud" } }, + { "pos": [8, 0, 0], "block": {"id": "minecraft:farmland" } } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block"} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:moss_block" } }, + { "pos": [4, 0, 0], "is": {"id": "minecraft:clay" } }, + { "pos": [6, 0, 0], "is": {"id": "minecraft:mud" } }, + { "pos": [8, 0, 0], "is": {"id": "minecraft:farmland" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:big_dripleaf"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [2.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact", "item": "minecraft:big_dripleaf"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact", "item": "minecraft:big_dripleaf"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [6.5, 3, 0.5], "rot": [0, 90] }, + {"at": 4, "do": "interact", "item": "minecraft:big_dripleaf"}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [8.5, 3, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact", "item": "minecraft:big_dripleaf"}, + { + "at": 6, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none", "waterlogged": false} + }, + { + "pos": [2, 1, 0], + "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none", "waterlogged": false} + }, + { + "pos": [4, 1, 0], + "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none", "waterlogged": false} + }, + { + "pos": [6, 1, 0], + "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none", "waterlogged": false} + }, + { + "pos": [8, 1, 0], + "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none", "waterlogged": false} + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_redstone_resets_tilt.json b/tests/vegetation/big_dripleaf/big_dripleaf_redstone_resets_tilt.json new file mode 100644 index 0000000..0f70374 --- /dev/null +++ b/tests/vegetation/big_dripleaf/big_dripleaf_redstone_resets_tilt.json @@ -0,0 +1,66 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "big_dripleaf_redstone_resets_tilt", + "description": "Big dripleaves set to tilt full, partial or unstable, with no tick scheduled, keep their tilt until a redstone block is placed next to them. Each one then resets to tilt none, and unpowered leaves are unaffected.", + "tags": ["vegetation", "big-dripleaf", "redstone", "tilt", "block-state", "neighbor-update"], + "minecraftIds": ["minecraft:big_dripleaf", "minecraft:redstone_block", "minecraft:dirt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:dirt"} }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:dirt"} }, + { "pos": [0, 0, 4], "block": {"id": "minecraft:dirt"} } + ] + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "full" } }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "partial" } }, + { "pos": [0, 1, 4], "block": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "unstable"} } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "full" } }, + { "pos": [0, 1, 2], "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "partial" } }, + { "pos": [0, 1, 4], "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "unstable"} } + ] + }, + { "at": 5, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none" } }, + { "pos": [0, 1, 2], "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "partial" } }, + { "pos": [0, 1, 4], "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "unstable"} } + ] + }, + { "at": 6, "do": "place", "pos": [1, 1, 2], "block": {"id": "minecraft:redstone_block"} }, + { "at": 6, "do": "place", "pos": [1, 1, 4], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none"} }, + { "pos": [0, 1, 2], "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none"} }, + { "pos": [0, 1, 4], "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_support_loss.json b/tests/vegetation/big_dripleaf/big_dripleaf_support_loss.json new file mode 100644 index 0000000..c7a634f --- /dev/null +++ b/tests/vegetation/big_dripleaf/big_dripleaf_support_loss.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "big_dripleaf_support_loss", + "description": "A big dripleaf breaks as soon as the dirt supporting it is removed.", + "tags": ["vegetation", "big-dripleaf", "support", "neighbor-update"], + "minecraftIds": ["minecraft:big_dripleaf", "minecraft:dirt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:dirt"} }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:big_dripleaf", "facing": "north"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none"} } + ] + }, + { "at": 2, "do": "remove", "pos": [0, 0, 0] }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_unsupported_only_checks_below.json b/tests/vegetation/big_dripleaf/big_dripleaf_unsupported_only_checks_below.json new file mode 100644 index 0000000..d0fbdfb --- /dev/null +++ b/tests/vegetation/big_dripleaf/big_dripleaf_unsupported_only_checks_below.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "big_dripleaf_unsupported_only_checks_below", + "description": "A big dripleaf force-placed on stone survives an update from a side neighbour, because survival is only re-checked when the block below changes. Replacing the stone with cobblestone, also unsupported, then breaks it.", + "tags": ["vegetation", "big-dripleaf", "support", "neighbor-update"], + "minecraftIds": ["minecraft:big_dripleaf", "minecraft:stone", "minecraft:cobblestone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:big_dripleaf", "facing": "north"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none"} } + ] + }, + { "at": 2, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none"} } + ] + }, + { "at": 3, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:cobblestone"} }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:cobblestone"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + From 8da3cbf7eea94dd83d6d78bc97dacdd5fc4bacc2 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sun, 18 Oct 2026 06:16:29 +0200 Subject: [PATCH 10/85] Add Flint tests for beds (16 blocks) --- .../beds/bed_destroyed_by_piston.json | 51 +++++++++++ .../beds/bed_half_breaks_without_partner.json | 50 +++++++++++ .../decoration/beds/bed_placement_facing.json | 86 +++++++++++++++++++ .../beds/bed_placement_head_space.json | 56 ++++++++++++ .../beds/bed_placement_unsupported.json | 44 ++++++++++ .../beds/bed_remove_foot_drops_item.json | 48 +++++++++++ .../beds/bed_remove_head_no_drop.json | 40 +++++++++ .../beds/bed_sleep_skips_night.json | 76 ++++++++++++++++ tests/decoration/beds/bed_use_daytime.json | 42 +++++++++ tests/decoration/beds/bed_use_night.json | 42 +++++++++ .../beds/bed_use_night_obstructed.json | 43 ++++++++++ .../beds/bed_use_thunderstorm_daytime.json | 42 +++++++++ 12 files changed, 620 insertions(+) create mode 100644 tests/decoration/beds/bed_destroyed_by_piston.json create mode 100644 tests/decoration/beds/bed_half_breaks_without_partner.json create mode 100644 tests/decoration/beds/bed_placement_facing.json create mode 100644 tests/decoration/beds/bed_placement_head_space.json create mode 100644 tests/decoration/beds/bed_placement_unsupported.json create mode 100644 tests/decoration/beds/bed_remove_foot_drops_item.json create mode 100644 tests/decoration/beds/bed_remove_head_no_drop.json create mode 100644 tests/decoration/beds/bed_sleep_skips_night.json create mode 100644 tests/decoration/beds/bed_use_daytime.json create mode 100644 tests/decoration/beds/bed_use_night.json create mode 100644 tests/decoration/beds/bed_use_night_obstructed.json create mode 100644 tests/decoration/beds/bed_use_thunderstorm_daytime.json diff --git a/tests/decoration/beds/bed_destroyed_by_piston.json b/tests/decoration/beds/bed_destroyed_by_piston.json new file mode 100644 index 0000000..78d9054 --- /dev/null +++ b/tests/decoration/beds/bed_destroyed_by_piston.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "bed_destroyed_by_piston", + "description": "A piston pushing into a bed destroys it instead of moving it, so neither half survives and the bed is not pushed along.", + "tags": ["decoration", "bed", "piston", "push-reaction", "redstone"], + "minecraftIds": ["minecraft:red_bed", "minecraft:piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 4] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:piston", "facing": "south"} }, + { + "at": 0, + "do": "place", + "pos": [1, 0, 1], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} + }, + { + "at": 0, + "do": "place", + "pos": [1, 0, 2], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:piston" , "extended": false } }, + { "pos": [1, 0, 1], "is": {"id": "minecraft:red_bed", "part": "foot"} }, + { "pos": [1, 0, 2], "is": {"id": "minecraft:red_bed", "part": "head"} } + ] + }, + { "at": 1, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:piston" , "extended": true } }, + { "pos": [1, 0, 1], "is": {"id": "minecraft:piston_head", "facing": "south"} }, + { "pos": [1, 0, 2], "is": {"id": "minecraft:air" } }, + { "pos": [1, 0, 3], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beds/bed_half_breaks_without_partner.json b/tests/decoration/beds/bed_half_breaks_without_partner.json new file mode 100644 index 0000000..a2bf6f7 --- /dev/null +++ b/tests/decoration/beds/bed_half_breaks_without_partner.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "bed_half_breaks_without_partner", + "description": "A lone bed half stays until a neighbor update arrives from its partner's position holding a non-bed block, then it turns to air.", + "tags": ["decoration", "bed", "neighbor-update", "block-state"], + "minecraftIds": ["minecraft:red_bed", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [6, 2, 3] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 1], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} + }, + { + "at": 0, + "do": "place", + "pos": [5, 0, 1], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 1], "is": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} }, + { "pos": [5, 0, 1], "is": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} } + ] + }, + { "at": 2, "do": "place", "pos": [0, 0, 2], "block": {"id": "minecraft:stone"} }, + { "at": 2, "do": "place", "pos": [5, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 1], "is": {"id": "minecraft:air" } }, + { "pos": [0, 0, 2], "is": {"id": "minecraft:stone"} }, + { "pos": [5, 0, 1], "is": {"id": "minecraft:air" } }, + { "pos": [5, 0, 0], "is": {"id": "minecraft:stone"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beds/bed_placement_facing.json b/tests/decoration/beds/bed_placement_facing.json new file mode 100644 index 0000000..c005108 --- /dev/null +++ b/tests/decoration/beds/bed_placement_facing.json @@ -0,0 +1,86 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "bed_placement_facing", + "description": "A survival player placing a bed creates a foot at the clicked spot and a head one block ahead in the player's facing direction, consuming the item.", + "tags": ["decoration", "bed", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:red_bed"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [8, 3, 8] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:red_bed"} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 0, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [5, 0, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 0, 6], "block": {"id": "minecraft:stone"} }, + { "pos": [5, 0, 6], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [1.5, 3, 1.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [1, 1, 1], + "is": {"id": "minecraft:red_bed", "facing": "south", "part": "foot", "occupied": false} + }, + { + "pos": [1, 1, 2], + "is": {"id": "minecraft:red_bed", "facing": "south", "part": "head", "occupied": false} + }, + {"is": "empty", "slot": "hotbar1"} + ] + }, + {"at": 2, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:red_bed"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [5.5, 3, 1.5], "rot": [90, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [5, 1, 1], "is": {"id": "minecraft:red_bed", "facing": "west", "part": "foot"} }, + { "pos": [4, 1, 1], "is": {"id": "minecraft:red_bed", "facing": "west", "part": "head"} }, + {"is": "empty", "slot": "hotbar1"} + ] + }, + {"at": 4, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:red_bed"}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [1.5, 3, 6.5], "rot": [180, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [1, 1, 6], "is": {"id": "minecraft:red_bed", "facing": "north", "part": "foot"} }, + { "pos": [1, 1, 5], "is": {"id": "minecraft:red_bed", "facing": "north", "part": "head"} }, + {"is": "empty", "slot": "hotbar1"} + ] + }, + {"at": 6, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:red_bed"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [5.5, 3, 6.5], "rot": [-90, 90] }, + {"at": 7, "do": "interact"}, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [5, 1, 6], "is": {"id": "minecraft:red_bed", "facing": "east", "part": "foot"} }, + { "pos": [6, 1, 6], "is": {"id": "minecraft:red_bed", "facing": "east", "part": "head"} }, + {"is": "empty", "slot": "hotbar1"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beds/bed_placement_head_space.json b/tests/decoration/beds/bed_placement_head_space.json new file mode 100644 index 0000000..c656bd8 --- /dev/null +++ b/tests/decoration/beds/bed_placement_head_space.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "bed_placement_head_space", + "description": "A bed cannot be placed when the block where its head would go is not replaceable, but it replaces a replaceable block such as short grass.", + "tags": ["decoration", "bed", "placement", "replaceable", "player"], + "minecraftIds": ["minecraft:red_bed", "minecraft:short_grass"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [6, 3, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:red_bed"} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [5, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [5, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [5, 1, 2], "block": {"id": "minecraft:short_grass"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [1.5, 3, 1.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:stone" } }, + { "is": {"id": "minecraft:red_bed"}, "slot": "hotbar1" } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [5.5, 3, 1.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [5, 1, 1], "is": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} }, + { "pos": [5, 1, 2], "is": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} }, + {"is": "empty", "slot": "hotbar1"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beds/bed_placement_unsupported.json b/tests/decoration/beds/bed_placement_unsupported.json new file mode 100644 index 0000000..a62fa43 --- /dev/null +++ b/tests/decoration/beds/bed_placement_unsupported.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "bed_placement_unsupported", + "description": "A bed placed on a block floating in mid-air stays in place, since beds need no support below either half.", + "tags": ["decoration", "bed", "placement", "support", "player"], + "minecraftIds": ["minecraft:red_bed"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 5, 3] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:red_bed"} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [1, 3, 1], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [1.5, 6, 1.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 4, 1], "is": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} }, + { "pos": [1, 4, 2], "is": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} }, + { "pos": [1, 3, 2], "is": {"id": "minecraft:air"} } , + {"is": "empty", "slot": "hotbar1"} + ] + }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [1, 4, 1], "is": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} }, + { "pos": [1, 4, 2], "is": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beds/bed_remove_foot_drops_item.json b/tests/decoration/beds/bed_remove_foot_drops_item.json new file mode 100644 index 0000000..4b6f6d1 --- /dev/null +++ b/tests/decoration/beds/bed_remove_foot_drops_item.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "bed_remove_foot_drops_item", + "description": "Removing the foot of a bed also destroys the head, and the head's loot drops exactly one bed item.", + "tags": ["decoration", "bed", "drops", "neighbor-update"], + "minecraftIds": ["minecraft:red_bed"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 3, 3] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} + }, + { + "at": 0, + "do": "place", + "pos": [0, 0, 1], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} }, + { "pos": [0, 0, 1], "is": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} } + ] + }, + { "at": 1, "do": "remove", "pos": [0, 0, 0] }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air"} } , + { "pos": [0, 0, 1], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:red_bed"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beds/bed_remove_head_no_drop.json b/tests/decoration/beds/bed_remove_head_no_drop.json new file mode 100644 index 0000000..f4b8d0b --- /dev/null +++ b/tests/decoration/beds/bed_remove_head_no_drop.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "bed_remove_head_no_drop", + "description": "Removing the head of a bed also destroys the foot, but no bed item drops because only the head half has a loot entry.", + "tags": ["decoration", "bed", "drops", "neighbor-update"], + "minecraftIds": ["minecraft:red_bed"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 3, 3] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} + }, + { + "at": 0, + "do": "place", + "pos": [0, 0, 1], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} + }, + { "at": 1, "do": "remove", "pos": [0, 0, 1] }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [0, 0, 1], "is": {"id": "minecraft:air"} }, + { "is": "minecraft:item" , "exists": false } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beds/bed_sleep_skips_night.json b/tests/decoration/beds/bed_sleep_skips_night.json new file mode 100644 index 0000000..3b9bfe4 --- /dev/null +++ b/tests/decoration/beds/bed_sleep_skips_night.json @@ -0,0 +1,76 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "bed_sleep_skips_night", + "description": "A player sleeping in a bed through the night skips the night to morning, wakes up, and both bed halves become unoccupied again; a daylight detector reads night power before and morning power after the skip.", + "tags": ["decoration", "bed", "sleeping", "time", "world-config", "player"], + "minecraftIds": ["minecraft:red_bed"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 3] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "time": "minecraft:midnight", + "gamerules": { + "minecraft:spawn_mobs" : false, + "minecraft:advance_time" : true , + "minecraft:advance_weather": false + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} + }, + { + "at": 0, + "do": "place", + "pos": [0, 0, 1], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} + }, + { "at": 0, "do": "place", "pos": [2, 0, 0], "block": {"id": "minecraft:daylight_detector"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:red_bed", "part": "foot", "occupied": true} }, + { "pos": [0, 0, 1], "is": {"id": "minecraft:red_bed", "part": "head", "occupied": true} }, + {"time": 18005} + ] + }, + { + "at": 90, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:red_bed", "part": "foot", "occupied": true} }, + {"time": 18090} , + { "pos": [2, 0, 0], "is": {"id": "minecraft:daylight_detector", "power": 0} } + ] + }, + { + "at": 130, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:red_bed", "part": "foot", "occupied": false} }, + { "pos": [0, 0, 1], "is": {"id": "minecraft:red_bed", "part": "head", "occupied": false} }, + { + "pos": [2, 0, 0], + "is": [ + {"id": "minecraft:daylight_detector", "power": 6}, + {"id": "minecraft:daylight_detector", "power": 7}, + {"id": "minecraft:daylight_detector", "power": 8} + ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beds/bed_use_daytime.json b/tests/decoration/beds/bed_use_daytime.json new file mode 100644 index 0000000..787527b --- /dev/null +++ b/tests/decoration/beds/bed_use_daytime.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "bed_use_daytime", + "description": "Using a bed in clear daytime does not start sleeping, so both halves stay unoccupied.", + "tags": ["decoration", "bed", "sleeping", "player"], + "minecraftIds": ["minecraft:red_bed"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 3] ] + }, + "player": {"game_mode": "Survival"}, + "world": {"time": "minecraft:noon"} + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} + }, + { + "at": 0, + "do": "place", + "pos": [0, 0, 1], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:red_bed", "part": "foot", "occupied": false} }, + { "pos": [0, 0, 1], "is": {"id": "minecraft:red_bed", "part": "head", "occupied": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beds/bed_use_night.json b/tests/decoration/beds/bed_use_night.json new file mode 100644 index 0000000..6f88b56 --- /dev/null +++ b/tests/decoration/beds/bed_use_night.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "bed_use_night", + "description": "Using a bed at night puts the player to sleep and marks both halves as occupied.", + "tags": ["decoration", "bed", "sleeping", "player"], + "minecraftIds": ["minecraft:red_bed"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 3] ] + }, + "player": {"game_mode": "Survival"}, + "world": {"time": "minecraft:midnight"} + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} + }, + { + "at": 0, + "do": "place", + "pos": [0, 0, 1], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:red_bed", "part": "foot", "occupied": true} }, + { "pos": [0, 0, 1], "is": {"id": "minecraft:red_bed", "part": "head", "occupied": true} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beds/bed_use_night_obstructed.json b/tests/decoration/beds/bed_use_night_obstructed.json new file mode 100644 index 0000000..0354725 --- /dev/null +++ b/tests/decoration/beds/bed_use_night_obstructed.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "bed_use_night_obstructed", + "description": "A bed with a solid block directly above the foot cannot be slept in, so both halves stay unoccupied.", + "tags": ["decoration", "bed", "sleeping", "player"], + "minecraftIds": ["minecraft:red_bed"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 3] ] + }, + "player": {"game_mode": "Survival"}, + "world": {"time": "minecraft:midnight"} + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} + }, + { + "at": 0, + "do": "place", + "pos": [0, 0, 1], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:red_bed", "part": "foot", "occupied": false} }, + { "pos": [0, 0, 1], "is": {"id": "minecraft:red_bed", "part": "head", "occupied": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/beds/bed_use_thunderstorm_daytime.json b/tests/decoration/beds/bed_use_thunderstorm_daytime.json new file mode 100644 index 0000000..098f635 --- /dev/null +++ b/tests/decoration/beds/bed_use_thunderstorm_daytime.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "bed_use_thunderstorm_daytime", + "description": "Using a bed during a daytime thunderstorm lets the player sleep, so both halves become occupied.", + "tags": ["decoration", "bed", "sleeping", "player"], + "minecraftIds": ["minecraft:red_bed"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 3] ] + }, + "player": {"game_mode": "Survival"}, + "world": {"time": "minecraft:noon", "weather": "thunder"} + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} + }, + { + "at": 0, + "do": "place", + "pos": [0, 0, 1], + "block": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} + }, + { "at": 150, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 150, "do": "interact"}, + { + "at": 152, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:red_bed", "part": "foot", "occupied": true} }, + { "pos": [0, 0, 1], "is": {"id": "minecraft:red_bed", "part": "head", "occupied": true} } + ] + } + ], + "breakpoints": [] +} + From f0df074aed2cdb117044139e2786c867f5abc859 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 19 Oct 2026 05:41:00 +0200 Subject: [PATCH 11/85] Add Flint tests for wolf_collar_dyes (16 blocks) --- .../wolf/wolf_collar_dye_baby_wolf.json | 36 +++++++++++++++++ .../wolf/wolf_collar_dye_changes_color.json | 40 +++++++++++++++++++ .../wolf_collar_dye_creative_keeps_item.json | 38 ++++++++++++++++++ .../wolf_collar_dye_other_owner_ignored.json | 38 ++++++++++++++++++ .../wolf/wolf_collar_dye_same_color_noop.json | 39 ++++++++++++++++++ .../wolf_collar_dye_stack_consumes_one.json | 40 +++++++++++++++++++ .../wolf_collar_dye_untamed_wolf_ignored.json | 37 +++++++++++++++++ 7 files changed, 268 insertions(+) create mode 100644 tests/entities/wolf/wolf_collar_dye_baby_wolf.json create mode 100644 tests/entities/wolf/wolf_collar_dye_changes_color.json create mode 100644 tests/entities/wolf/wolf_collar_dye_creative_keeps_item.json create mode 100644 tests/entities/wolf/wolf_collar_dye_other_owner_ignored.json create mode 100644 tests/entities/wolf/wolf_collar_dye_same_color_noop.json create mode 100644 tests/entities/wolf/wolf_collar_dye_stack_consumes_one.json create mode 100644 tests/entities/wolf/wolf_collar_dye_untamed_wolf_ignored.json diff --git a/tests/entities/wolf/wolf_collar_dye_baby_wolf.json b/tests/entities/wolf/wolf_collar_dye_baby_wolf.json new file mode 100644 index 0000000..a9aa700 --- /dev/null +++ b/tests/entities/wolf/wolf_collar_dye_baby_wolf.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:blue_dye", "minecraft:wolf"], + "name": "Wolf Collar Dye Baby Wolf", + "description": "Dyeing an own tamed baby wolf still changes the collar, since the dye branch has no baby check.", + "tags": ["entity", "wolf", "dye", "collar", "player", "baby"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 3, 5] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, -1, 2], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 35] }, + { + "at": 0, + "do": "summon", + "entity_alias": "wolf", + "entity_type": "minecraft:wolf", + "pos": [0.5, 0, 2.5], + "NoAI": "1b", + "Owner": "[I; 1090192112, 104018212, -2046533210, 1798617213]", + "Age": "-24000" + }, + {"at": 1, "do": "interact", "item": "minecraft:blue_dye"}, + { + "at": 2, + "do": "assert", + "checks": [ {"entity_alias": "wolf", "CollarColor": "11b"}, {"slot": "hotbar1", "is": "empty"} ] + } + ] +} + diff --git a/tests/entities/wolf/wolf_collar_dye_changes_color.json b/tests/entities/wolf/wolf_collar_dye_changes_color.json new file mode 100644 index 0000000..ab8ee12 --- /dev/null +++ b/tests/entities/wolf/wolf_collar_dye_changes_color.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:blue_dye", "minecraft:wolf"], + "name": "Wolf Collar Dye Changes Color", + "description": "A survival player using blue dye on their own tamed wolf changes the collar from the default red to blue and consumes the dye.", + "tags": ["entity", "wolf", "dye", "collar", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 3, 5] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, -1, 2], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 30] }, + { + "at": 0, + "do": "summon", + "entity_alias": "wolf", + "entity_type": "minecraft:wolf", + "pos": [0.5, 0, 2.5], + "NoAI": "1b", + "Owner": "[I; 1090192112, 104018212, -2046533210, 1798617213]" + }, + { + "at": 1, + "do": "assert", + "checks": [ {"entity_alias": "wolf", "CollarColor": "14b"} ] + }, + {"at": 1, "do": "interact", "item": "minecraft:blue_dye"}, + { + "at": 2, + "do": "assert", + "checks": [ {"entity_alias": "wolf", "CollarColor": "11b"}, {"slot": "hotbar1", "is": "empty"} ] + } + ] +} + diff --git a/tests/entities/wolf/wolf_collar_dye_creative_keeps_item.json b/tests/entities/wolf/wolf_collar_dye_creative_keeps_item.json new file mode 100644 index 0000000..1edd44d --- /dev/null +++ b/tests/entities/wolf/wolf_collar_dye_creative_keeps_item.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:blue_dye", "minecraft:wolf"], + "name": "Wolf Collar Dye Creative Keeps Item", + "description": "A creative player dyeing their own tamed wolf changes the collar but keeps the dye.", + "tags": ["entity", "wolf", "dye", "collar", "player", "creative"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 3, 5] ] + }, + "player": {"game_mode": "Creative"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, -1, 2], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 30] }, + { + "at": 0, + "do": "summon", + "entity_alias": "wolf", + "entity_type": "minecraft:wolf", + "pos": [0.5, 0, 2.5], + "NoAI": "1b", + "Owner": "[I; 1090192112, 104018212, -2046533210, 1798617213]" + }, + {"at": 1, "do": "interact", "item": "minecraft:blue_dye"}, + { + "at": 2, + "do": "assert", + "checks": [ + {"entity_alias": "wolf", "CollarColor": "11b"} , + { "slot": "hotbar1", "is": {"id": "minecraft:blue_dye", "count": 1} } + ] + } + ] +} + diff --git a/tests/entities/wolf/wolf_collar_dye_other_owner_ignored.json b/tests/entities/wolf/wolf_collar_dye_other_owner_ignored.json new file mode 100644 index 0000000..d686002 --- /dev/null +++ b/tests/entities/wolf/wolf_collar_dye_other_owner_ignored.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:blue_dye", "minecraft:wolf"], + "name": "Wolf Collar Dye Other Owner Ignored", + "description": "Using blue dye on a wolf tamed by someone else leaves the collar red, keeps the dye and does not make the wolf sit.", + "tags": ["entity", "wolf", "dye", "collar", "player", "owner"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 3, 5] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, -1, 2], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 30] }, + { + "at": 0, + "do": "summon", + "entity_alias": "wolf", + "entity_type": "minecraft:wolf", + "pos": [0.5, 0, 2.5], + "NoAI": "1b", + "Owner": "[I; 1, 2, 3, 4]" + }, + {"at": 1, "do": "interact", "item": "minecraft:blue_dye"}, + { + "at": 2, + "do": "assert", + "checks": [ + {"entity_alias": "wolf", "CollarColor": "14b", "Sitting": "0b"} , + { "slot": "hotbar1", "is": {"id": "minecraft:blue_dye", "count": 1} } + ] + } + ] +} + diff --git a/tests/entities/wolf/wolf_collar_dye_same_color_noop.json b/tests/entities/wolf/wolf_collar_dye_same_color_noop.json new file mode 100644 index 0000000..c68e368 --- /dev/null +++ b/tests/entities/wolf/wolf_collar_dye_same_color_noop.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:blue_dye", "minecraft:wolf"], + "name": "Wolf Collar Dye Same Color Noop", + "description": "Using blue dye on an own tamed wolf that already has a blue collar changes nothing and keeps the dye.", + "tags": ["entity", "wolf", "dye", "collar", "player", "same-color"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 3, 5] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, -1, 2], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 30] }, + { + "at": 0, + "do": "summon", + "entity_alias": "wolf", + "entity_type": "minecraft:wolf", + "pos": [0.5, 0, 2.5], + "NoAI": "1b", + "Owner": "[I; 1090192112, 104018212, -2046533210, 1798617213]", + "CollarColor": "11b" + }, + {"at": 1, "do": "interact", "item": "minecraft:blue_dye"}, + { + "at": 2, + "do": "assert", + "checks": [ + {"entity_alias": "wolf", "CollarColor": "11b"} , + { "slot": "hotbar1", "is": {"id": "minecraft:blue_dye", "count": 1} } + ] + } + ] +} + diff --git a/tests/entities/wolf/wolf_collar_dye_stack_consumes_one.json b/tests/entities/wolf/wolf_collar_dye_stack_consumes_one.json new file mode 100644 index 0000000..286e2f3 --- /dev/null +++ b/tests/entities/wolf/wolf_collar_dye_stack_consumes_one.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:blue_dye", "minecraft:wolf"], + "name": "Wolf Collar Dye Stack Consumes One", + "description": "Dyeing an own tamed wolf with a stack of two blue dyes consumes exactly one dye.", + "tags": ["entity", "wolf", "dye", "collar", "player", "stack"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 3, 5] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, -1, 2], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 30] }, + { + "at": 0, + "do": "summon", + "entity_alias": "wolf", + "entity_type": "minecraft:wolf", + "pos": [0.5, 0, 2.5], + "NoAI": "1b", + "Owner": "[I; 1090192112, 104018212, -2046533210, 1798617213]" + }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:blue_dye", "count": 2}, + {"at": 1, "do": "select_hotbar", "slot": 1}, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + {"entity_alias": "wolf", "CollarColor": "11b"} , + { "slot": "hotbar1", "is": {"id": "minecraft:blue_dye", "count": 1} } + ] + } + ] +} + diff --git a/tests/entities/wolf/wolf_collar_dye_untamed_wolf_ignored.json b/tests/entities/wolf/wolf_collar_dye_untamed_wolf_ignored.json new file mode 100644 index 0000000..9741808 --- /dev/null +++ b/tests/entities/wolf/wolf_collar_dye_untamed_wolf_ignored.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:blue_dye", "minecraft:wolf"], + "name": "Wolf Collar Dye Untamed Wolf Ignored", + "description": "Using blue dye on an untamed wolf leaves the collar red and keeps the dye.", + "tags": ["entity", "wolf", "dye", "collar", "player", "untamed"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 3, 5] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, -1, 2], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 30] }, + { + "at": 0, + "do": "summon", + "entity_alias": "wolf", + "entity_type": "minecraft:wolf", + "pos": [0.5, 0, 2.5], + "NoAI": "1b" + }, + {"at": 1, "do": "interact", "item": "minecraft:blue_dye"}, + { + "at": 2, + "do": "assert", + "checks": [ + {"entity_alias": "wolf", "CollarColor": "14b"} , + { "slot": "hotbar1", "is": {"id": "minecraft:blue_dye", "count": 1} } + ] + } + ] +} + From b8280df878ab07591330fcb2f8d389f5b952a5b4 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Wed, 21 Oct 2026 05:47:51 +0200 Subject: [PATCH 12/85] Add Flint tests for brush (1 blocks) --- ...ush_completion_drops_item_on_hit_face.json | 58 ++++++++++++++++ ...ush_completion_drops_item_on_top_face.json | 56 +++++++++++++++ .../brush_creative_completes_brushing.json | 47 +++++++++++++ .../brush_dispenser_without_armadillo.json | 53 +++++++++++++++ .../brush_dusting_resets_after_release.json | 55 +++++++++++++++ .../brush_looking_at_air_does_nothing.json | 56 +++++++++++++++ .../brush_on_ordinary_block_does_nothing.json | 59 ++++++++++++++++ .../brush/brush_progressive_dusting.json | 68 +++++++++++++++++++ 8 files changed, 452 insertions(+) create mode 100644 tests/items/brush/brush_completion_drops_item_on_hit_face.json create mode 100644 tests/items/brush/brush_completion_drops_item_on_top_face.json create mode 100644 tests/items/brush/brush_creative_completes_brushing.json create mode 100644 tests/items/brush/brush_dispenser_without_armadillo.json create mode 100644 tests/items/brush/brush_dusting_resets_after_release.json create mode 100644 tests/items/brush/brush_looking_at_air_does_nothing.json create mode 100644 tests/items/brush/brush_on_ordinary_block_does_nothing.json create mode 100644 tests/items/brush/brush_progressive_dusting.json diff --git a/tests/items/brush/brush_completion_drops_item_on_hit_face.json b/tests/items/brush/brush_completion_drops_item_on_hit_face.json new file mode 100644 index 0000000..eca81be --- /dev/null +++ b/tests/items/brush/brush_completion_drops_item_on_hit_face.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "brush_completion_drops_item_on_hit_face", + "description": "Finishing a brushing from the east side spawns the hidden diamond as a dropped item in the block east of the brushed block, not above it.", + "tags": ["item", "brush", "suspicious-sand", "drop", "player"], + "minecraftIds": ["minecraft:brush", "minecraft:suspicious_sand", "minecraft:sand", "minecraft:diamond"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:brush"} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [5, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:suspicious_sand", + "nbt": {"item": "{id: \"minecraft:diamond\", count: 1}"} + } + } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 1, 0.5], "rot": [90, 24] }, + {"at": 3, "do": "interact"}, + { + "at": 125, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:sand"} }, + { + "is": "minecraft:item", + "exists": true, + "count": 1, + "pos": [1.5, 1.2, 0.5], + "position_tolerance": 0.5 + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/brush/brush_completion_drops_item_on_top_face.json b/tests/items/brush/brush_completion_drops_item_on_top_face.json new file mode 100644 index 0000000..3bc1617 --- /dev/null +++ b/tests/items/brush/brush_completion_drops_item_on_top_face.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "brush_completion_drops_item_on_top_face", + "description": "Finishing a brushing from above spawns the hidden diamond as a dropped item above the brushed block.", + "tags": ["item", "brush", "suspicious-sand", "drop", "player"], + "minecraftIds": ["minecraft:brush", "minecraft:suspicious_sand", "minecraft:sand", "minecraft:diamond"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:brush"} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:suspicious_sand", + "nbt": {"item": "{id: \"minecraft:diamond\", count: 1}"} + } + }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 2, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 3, 0.5], "rot": [90, 41] }, + {"at": 3, "do": "interact"}, + { + "at": 125, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:sand"} }, + { + "is": "minecraft:item", + "exists": true, + "count": 1, + "pos": [0.5, 2.1, 0.5], + "position_tolerance": 0.5 + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/brush/brush_creative_completes_brushing.json b/tests/items/brush/brush_creative_completes_brushing.json new file mode 100644 index 0000000..274bd45 --- /dev/null +++ b/tests/items/brush/brush_creative_completes_brushing.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "brush_creative_completes_brushing", + "description": "A creative player can brush suspicious sand through every dusted stage until it turns into sand.", + "tags": ["item", "brush", "suspicious-sand", "creative", "player"], + "minecraftIds": ["minecraft:brush", "minecraft:suspicious_sand", "minecraft:sand"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "selected_hotbar": 1, + "game_mode": "Creative", + "inventory": { "hotbar1": {"id": "minecraft:brush"} } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:suspicious_sand"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 75, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 3} } + ] + }, + { + "at": 125, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:sand"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/brush/brush_dispenser_without_armadillo.json b/tests/items/brush/brush_dispenser_without_armadillo.json new file mode 100644 index 0000000..db0fdd0 --- /dev/null +++ b/tests/items/brush/brush_dispenser_without_armadillo.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "brush_dispenser_without_armadillo", + "description": "A powered dispenser holding a brush with no armadillo in front fires (triggered stays true), keeps the brush and does not brush the suspicious sand in front of it.", + "tags": ["item", "brush", "dispenser", "suspicious-sand"], + "minecraftIds": [ + "minecraft:brush" , "minecraft:dispenser" , "minecraft:suspicious_sand", + "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:suspicious_sand"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, id: \"minecraft:brush\", count: 1}]"} + } + } + ] + }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 12, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:dispenser", + "nbt": {"Items[0].id": "minecraft:brush", "Items[0].count": 1}, + "triggered": true + } + }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 0} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/brush/brush_dusting_resets_after_release.json b/tests/items/brush/brush_dusting_resets_after_release.json new file mode 100644 index 0000000..3124789 --- /dev/null +++ b/tests/items/brush/brush_dusting_resets_after_release.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "brush_dusting_resets_after_release", + "description": "A partially brushed suspicious sand block keeps its dusted level while the brush count is retained, then decays back to dusted 0 once brushing stops.", + "tags": ["item", "brush", "suspicious-sand", "player"], + "minecraftIds": ["minecraft:brush", "minecraft:suspicious_sand"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "selected_hotbar": 1, + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:brush"} } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:suspicious_sand"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 2} } + ] + }, + { "at": 31, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, 0.5], "rot": [0, -90] }, + { + "at": 35, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 2} } + ] + }, + { + "at": 160, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 0} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/brush/brush_looking_at_air_does_nothing.json b/tests/items/brush/brush_looking_at_air_does_nothing.json new file mode 100644 index 0000000..616650f --- /dev/null +++ b/tests/items/brush/brush_looking_at_air_does_nothing.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "brush_looking_at_air_does_nothing", + "description": "Using a brush while looking at the sky does not dust the suspicious sand under the player, while using it after looking down does, so the no-op is meaningful.", + "tags": ["item", "brush", "suspicious-sand", "player"], + "minecraftIds": ["minecraft:brush", "minecraft:suspicious_sand"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:brush"} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:suspicious_sand"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, 0.5], "rot": [0, -90] }, + {"at": 3, "do": "interact"}, + { + "at": 60, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 0} } + ] + }, + { "at": 61, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, 0.5], "rot": [0, 90] }, + {"at": 62, "do": "interact"}, + { + "at": 110, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": [ + {"id": "minecraft:suspicious_sand", "dusted": 1}, + {"id": "minecraft:suspicious_sand", "dusted": 2}, + {"id": "minecraft:suspicious_sand", "dusted": 3} + ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/brush/brush_on_ordinary_block_does_nothing.json b/tests/items/brush/brush_on_ordinary_block_does_nothing.json new file mode 100644 index 0000000..fab3239 --- /dev/null +++ b/tests/items/brush/brush_on_ordinary_block_does_nothing.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "brush_on_ordinary_block_does_nothing", + "description": "Brushing plain sand for 60 ticks changes nothing, while the same held brush then dusts a suspicious sand block next to it, so the no-op is meaningful.", + "tags": ["item", "brush", "suspicious-sand", "player"], + "minecraftIds": ["minecraft:brush", "minecraft:sand", "minecraft:suspicious_sand"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:brush"} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:sand" } }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:suspicious_sand"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 60, + "do": "assert", + "checks": [ + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:sand" } }, + { "pos": [ 0, 0, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 0} } + ] + }, + { "at": 61, "do": "tp", "entity_alias": "player", "pos": [-0.5, 2.5, 0.5], "rot": [0, 90] }, + { + "at": 100, + "do": "assert", + "checks": [ + { + "pos": [-1, 1, 0], + "is": [ + {"id": "minecraft:suspicious_sand", "dusted": 1}, + {"id": "minecraft:suspicious_sand", "dusted": 2}, + {"id": "minecraft:suspicious_sand", "dusted": 3} + ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/brush/brush_progressive_dusting.json b/tests/items/brush/brush_progressive_dusting.json new file mode 100644 index 0000000..1fe26c2 --- /dev/null +++ b/tests/items/brush/brush_progressive_dusting.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "brush_progressive_dusting", + "description": "Holding use with a brush on suspicious sand advances its dusted state 0, 1, 2, 3 and finally turns it into sand after ten strokes.", + "tags": ["item", "brush", "suspicious-sand", "player"], + "minecraftIds": ["minecraft:brush", "minecraft:suspicious_sand", "minecraft:sand"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:brush"} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:suspicious_sand"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, 0.5], "rot": [0, 90] }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 0} } + ] + }, + {"at": 3, "do": "interact"}, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 1} } + ] + }, + { + "at": 45, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 2} } + ] + }, + { + "at": 75, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 3} } + ] + }, + { + "at": 125, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:sand"} } + ] + } + ], + "breakpoints": [] +} + From 6d475b97ed85915f25de5fce34021798f33cc626 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Thu, 22 Oct 2026 05:55:39 +0200 Subject: [PATCH 13/85] Add Flint tests for bucket (1 blocks) --- .../bucket_cannot_fill_in_adventure.json | 46 +++++++++++++++ .../bucket_dispenser_drops_bucket_at_air.json | 51 +++++++++++++++++ .../bucket_dispenser_picks_up_water.json | 56 +++++++++++++++++++ ..._fills_from_full_powder_snow_cauldron.json | 56 +++++++++++++++++++ ...bucket_fills_from_full_water_cauldron.json | 53 ++++++++++++++++++ .../bucket_fills_from_lava_cauldron.json | 53 ++++++++++++++++++ .../bucket/bucket_ignores_flowing_water.json | 53 ++++++++++++++++++ ...bucket_ignores_partial_water_cauldron.json | 53 ++++++++++++++++++ .../items/bucket/bucket_ignores_seagrass.json | 53 ++++++++++++++++++ .../bucket/bucket_picks_up_bubble_column.json | 54 ++++++++++++++++++ .../bucket/bucket_picks_up_lava_source.json | 53 ++++++++++++++++++ .../bucket/bucket_picks_up_water_source.json | 53 ++++++++++++++++++ .../bucket_picks_up_waterlogged_slab.json | 53 ++++++++++++++++++ 13 files changed, 687 insertions(+) create mode 100644 tests/items/bucket/bucket_cannot_fill_in_adventure.json create mode 100644 tests/items/bucket/bucket_dispenser_drops_bucket_at_air.json create mode 100644 tests/items/bucket/bucket_dispenser_picks_up_water.json create mode 100644 tests/items/bucket/bucket_fills_from_full_powder_snow_cauldron.json create mode 100644 tests/items/bucket/bucket_fills_from_full_water_cauldron.json create mode 100644 tests/items/bucket/bucket_fills_from_lava_cauldron.json create mode 100644 tests/items/bucket/bucket_ignores_flowing_water.json create mode 100644 tests/items/bucket/bucket_ignores_partial_water_cauldron.json create mode 100644 tests/items/bucket/bucket_ignores_seagrass.json create mode 100644 tests/items/bucket/bucket_picks_up_bubble_column.json create mode 100644 tests/items/bucket/bucket_picks_up_lava_source.json create mode 100644 tests/items/bucket/bucket_picks_up_water_source.json create mode 100644 tests/items/bucket/bucket_picks_up_waterlogged_slab.json diff --git a/tests/items/bucket/bucket_cannot_fill_in_adventure.json b/tests/items/bucket/bucket_cannot_fill_in_adventure.json new file mode 100644 index 0000000..5326c11 --- /dev/null +++ b/tests/items/bucket/bucket_cannot_fill_in_adventure.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "bucket_cannot_fill_in_adventure", + "description": "An adventure-mode player cannot pick up water with an empty bucket: the source stays and the bucket stays empty.", + "tags": ["item", "bucket", "water", "adventure", "player"], + "minecraftIds": ["minecraft:bucket", "minecraft:water"], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 3] ] + }, + "player": { + "game_mode": "Adventure", + "inventory": { "hotbar1": {"id": "minecraft:bucket", "count": 1} } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 2], "block": {"id": "minecraft:water", "level": 0} } + ] + }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:water" , "level": 0 } }, + { "is": {"id": "minecraft:bucket", "count": 1}, "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/bucket/bucket_dispenser_drops_bucket_at_air.json b/tests/items/bucket/bucket_dispenser_drops_bucket_at_air.json new file mode 100644 index 0000000..d695f77 --- /dev/null +++ b/tests/items/bucket/bucket_dispenser_drops_bucket_at_air.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "bucket_dispenser_drops_bucket_at_air", + "description": "A powered dispenser holding an empty bucket and facing air dispenses the bucket and is left empty.", + "tags": ["item", "bucket", "dispenser"], + "minecraftIds": ["minecraft:dispenser", "minecraft:bucket", "minecraft:redstone_block"], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 3] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 2, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 2, 3], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 2, 1], + "block": { + "id": "minecraft:dispenser", + "facing": "south", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:bucket\"}]"} + } + }, + { "pos": [0, 3, 1], "block": {"id": "minecraft:redstone_block"} } + ] + }, + { + "at": 10, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 1], + "is": { "id": "minecraft:dispenser", "nbt": {"Items": []} } + } + ] + } + ] +} + diff --git a/tests/items/bucket/bucket_dispenser_picks_up_water.json b/tests/items/bucket/bucket_dispenser_picks_up_water.json new file mode 100644 index 0000000..e062b30 --- /dev/null +++ b/tests/items/bucket/bucket_dispenser_picks_up_water.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "bucket_dispenser_picks_up_water", + "description": "A powered dispenser holding an empty bucket and facing a water source removes the water and now holds a water bucket.", + "tags": ["item", "bucket", "dispenser", "water"], + "minecraftIds": [ + "minecraft:dispenser" , "minecraft:bucket" , "minecraft:water_bucket" , "minecraft:water" , + "minecraft:redstone_block" + ], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 3] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 2, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 2, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 2, 2], "block": {"id": "minecraft:water", "level": 0} }, + { + "pos": [0, 2, 1], + "block": { + "id": "minecraft:dispenser", + "facing": "south", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:bucket\"}]"} + } + }, + { "pos": [0, 3, 1], "block": {"id": "minecraft:redstone_block"} } + ] + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:air"} }, + { + "pos": [0, 2, 1], + "is": { "id": "minecraft:dispenser", "nbt": {"Items[0].id": "minecraft:water_bucket"} } + } + ] + } + ] +} + diff --git a/tests/items/bucket/bucket_fills_from_full_powder_snow_cauldron.json b/tests/items/bucket/bucket_fills_from_full_powder_snow_cauldron.json new file mode 100644 index 0000000..03123b1 --- /dev/null +++ b/tests/items/bucket/bucket_fills_from_full_powder_snow_cauldron.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "bucket_fills_from_full_powder_snow_cauldron", + "description": "An empty bucket used on a full powder snow cauldron empties the cauldron and gives a powder snow bucket.", + "tags": ["item", "bucket", "cauldron", "powder-snow", "player"], + "minecraftIds": [ + "minecraft:bucket" , "minecraft:powder_snow_bucket" , "minecraft:powder_snow_cauldron", + "minecraft:cauldron" + ], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 3] ] + }, + "player": { + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:bucket", "count": 1} } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 2], "block": {"id": "minecraft:powder_snow_cauldron", "level": 3} } + ] + }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:powder_snow_cauldron", "level": 3} } + ] + }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:cauldron" } }, + { "is": {"id": "minecraft:powder_snow_bucket", "count": 1}, "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/bucket/bucket_fills_from_full_water_cauldron.json b/tests/items/bucket/bucket_fills_from_full_water_cauldron.json new file mode 100644 index 0000000..3332e70 --- /dev/null +++ b/tests/items/bucket/bucket_fills_from_full_water_cauldron.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "bucket_fills_from_full_water_cauldron", + "description": "An empty bucket used on a full water cauldron empties the cauldron and gives a water bucket.", + "tags": ["item", "bucket", "cauldron", "water", "player"], + "minecraftIds": ["minecraft:bucket", "minecraft:water_bucket", "minecraft:water_cauldron", "minecraft:cauldron"], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 3] ] + }, + "player": { + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:bucket", "count": 1} } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 2], "block": {"id": "minecraft:water_cauldron", "level": 3} } + ] + }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:water_cauldron", "level": 3} } + ] + }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:cauldron" } }, + { "is": {"id": "minecraft:water_bucket", "count": 1}, "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/bucket/bucket_fills_from_lava_cauldron.json b/tests/items/bucket/bucket_fills_from_lava_cauldron.json new file mode 100644 index 0000000..6056fbf --- /dev/null +++ b/tests/items/bucket/bucket_fills_from_lava_cauldron.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "bucket_fills_from_lava_cauldron", + "description": "An empty bucket used on a lava cauldron empties the cauldron and gives a lava bucket.", + "tags": ["item", "bucket", "cauldron", "lava", "player"], + "minecraftIds": ["minecraft:bucket", "minecraft:lava_bucket", "minecraft:lava_cauldron", "minecraft:cauldron"], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 3] ] + }, + "player": { + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:bucket", "count": 1} } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 2], "block": {"id": "minecraft:lava_cauldron"} } + ] + }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:lava_cauldron"} } + ] + }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:cauldron" } }, + { "is": {"id": "minecraft:lava_bucket", "count": 1}, "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/bucket/bucket_ignores_flowing_water.json b/tests/items/bucket/bucket_ignores_flowing_water.json new file mode 100644 index 0000000..6c6eff7 --- /dev/null +++ b/tests/items/bucket/bucket_ignores_flowing_water.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "bucket_ignores_flowing_water", + "description": "An empty bucket cannot pick up flowing water: the water stays and the bucket stays empty.", + "tags": ["item", "bucket", "water", "flowing", "player"], + "minecraftIds": ["minecraft:bucket", "minecraft:water"], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 3] ] + }, + "player": { + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:bucket", "count": 1} } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 2], "block": {"id": "minecraft:water", "level": 1} } + ] + }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:water", "level": 1} } + ] + }, + {"at": 1, "do": "interact", "item": "minecraft:bucket"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:water" , "level": 1 } }, + { "is": {"id": "minecraft:bucket", "count": 1}, "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/bucket/bucket_ignores_partial_water_cauldron.json b/tests/items/bucket/bucket_ignores_partial_water_cauldron.json new file mode 100644 index 0000000..6813157 --- /dev/null +++ b/tests/items/bucket/bucket_ignores_partial_water_cauldron.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "bucket_ignores_partial_water_cauldron", + "description": "An empty bucket used on a water cauldron that is not full does nothing: the level stays and the bucket stays empty.", + "tags": ["item", "bucket", "cauldron", "water", "player"], + "minecraftIds": ["minecraft:bucket", "minecraft:water_cauldron"], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 3] ] + }, + "player": { + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:bucket", "count": 1} } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 2], "block": {"id": "minecraft:water_cauldron", "level": 1} } + ] + }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:water_cauldron", "level": 1} } + ] + }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:water_cauldron", "level": 1} }, + { "is": {"id": "minecraft:bucket", "count": 1} , "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/bucket/bucket_ignores_seagrass.json b/tests/items/bucket/bucket_ignores_seagrass.json new file mode 100644 index 0000000..e405903 --- /dev/null +++ b/tests/items/bucket/bucket_ignores_seagrass.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "bucket_ignores_seagrass", + "description": "An empty bucket used on seagrass does nothing: the seagrass stays and the bucket stays empty, because seagrass is not a bucket pickup block.", + "tags": ["item", "bucket", "seagrass", "water", "player"], + "minecraftIds": ["minecraft:bucket", "minecraft:seagrass"], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 3] ] + }, + "player": { + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:bucket", "count": 1} } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 2], "block": {"id": "minecraft:seagrass"} } + ] + }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, -8] }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:seagrass"} } + ] + }, + {"at": 1, "do": "interact", "item": "minecraft:bucket"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:seagrass" } }, + { "is": {"id": "minecraft:bucket" , "count": 1}, "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/bucket/bucket_picks_up_bubble_column.json b/tests/items/bucket/bucket_picks_up_bubble_column.json new file mode 100644 index 0000000..cd6fb1a --- /dev/null +++ b/tests/items/bucket/bucket_picks_up_bubble_column.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "bucket_picks_up_bubble_column", + "description": "A survival player using an empty bucket on a bubble column removes the column and receives a water bucket.", + "tags": ["item", "bucket", "water", "bubble-column", "player"], + "minecraftIds": ["minecraft:bucket", "minecraft:water_bucket", "minecraft:bubble_column", "minecraft:soul_sand"], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 3] ] + }, + "player": { + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:bucket", "count": 1} } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, 2], "block": {"id": "minecraft:soul_sand" } }, + { "pos": [ 0, 2, 2], "block": {"id": "minecraft:bubble_column", "drag": false} } + ] + }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:bubble_column"} } + ] + }, + {"at": 1, "do": "interact", "item": "minecraft:bucket"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:water_bucket", "count": 1}, "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/bucket/bucket_picks_up_lava_source.json b/tests/items/bucket/bucket_picks_up_lava_source.json new file mode 100644 index 0000000..0d979f4 --- /dev/null +++ b/tests/items/bucket/bucket_picks_up_lava_source.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "bucket_picks_up_lava_source", + "description": "A survival player using an empty bucket on a lava source turns the source into air and receives a lava bucket.", + "tags": ["item", "bucket", "lava", "player", "fluid-pickup"], + "minecraftIds": ["minecraft:bucket", "minecraft:lava_bucket", "minecraft:lava"], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 3] ] + }, + "player": { + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:bucket", "count": 1} } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 2], "block": {"id": "minecraft:lava" , "level": 0} } + ] + }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:lava", "level": 0} } + ] + }, + {"at": 1, "do": "interact", "item": "minecraft:bucket"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:lava_bucket", "count": 1}, "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/bucket/bucket_picks_up_water_source.json b/tests/items/bucket/bucket_picks_up_water_source.json new file mode 100644 index 0000000..a57614d --- /dev/null +++ b/tests/items/bucket/bucket_picks_up_water_source.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "bucket_picks_up_water_source", + "description": "A survival player using an empty bucket on a water source turns the source into air and receives a water bucket.", + "tags": ["item", "bucket", "water", "player", "fluid-pickup"], + "minecraftIds": ["minecraft:bucket", "minecraft:water_bucket", "minecraft:water"], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 3] ] + }, + "player": { + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:bucket", "count": 1} } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 2], "block": {"id": "minecraft:water", "level": 0} } + ] + }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:water", "level": 0} } + ] + }, + {"at": 1, "do": "interact", "item": "minecraft:bucket"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:water_bucket", "count": 1}, "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/bucket/bucket_picks_up_waterlogged_slab.json b/tests/items/bucket/bucket_picks_up_waterlogged_slab.json new file mode 100644 index 0000000..d7c45dc --- /dev/null +++ b/tests/items/bucket/bucket_picks_up_waterlogged_slab.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "bucket_picks_up_waterlogged_slab", + "description": "A survival player using an empty bucket on a waterlogged slab receives a water bucket and the slab stays in place without water.", + "tags": ["item", "bucket", "water", "waterlogged", "slab", "player"], + "minecraftIds": ["minecraft:bucket", "minecraft:water_bucket", "minecraft:stone_slab"], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 3] ] + }, + "player": { + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:bucket", "count": 1} } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 2], "block": {"id": "minecraft:stone_slab", "type": "bottom", "waterlogged": true} } + ] + }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:stone_slab", "type": "bottom", "waterlogged": true} } + ] + }, + {"at": 1, "do": "interact", "item": "minecraft:bucket"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 2], "is": {"id": "minecraft:stone_slab", "type": "bottom", "waterlogged": false} }, + { "slot": "hotbar1", "is": {"id": "minecraft:water_bucket", "count": 1} } + ] + } + ] +} + From 1ee353776ddf18755c3d4fbc1599c78a507b40db Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Fri, 23 Oct 2026 06:21:02 +0200 Subject: [PATCH 14/85] Add Flint tests for cauldrons (4 blocks) --- .../cauldrons/cauldron_bucket_fill.json | 80 ++++++++++++++++ .../cauldron_bucket_under_water.json | 76 ++++++++++++++++ .../cauldrons/cauldron_comparator_output.json | 65 +++++++++++++ .../cauldrons/cauldron_dripstone_fill.json | 79 ++++++++++++++++ .../cauldron_ignores_empty_containers.json | 65 +++++++++++++ .../cauldrons/lava_cauldron_interactions.json | 91 +++++++++++++++++++ .../powder_snow_cauldron_dripstone.json | 88 ++++++++++++++++++ .../powder_snow_cauldron_interactions.json | 91 +++++++++++++++++++ .../cauldrons/water_cauldron_buckets.json | 91 +++++++++++++++++++ .../cauldrons/water_cauldron_dripstone.json | 86 ++++++++++++++++++ .../water_cauldron_glass_bottle.json | 76 ++++++++++++++++ .../water_cauldron_wash_shulker_box.json | 67 ++++++++++++++ 12 files changed, 955 insertions(+) create mode 100644 tests/decoration/cauldrons/cauldron_bucket_fill.json create mode 100644 tests/decoration/cauldrons/cauldron_bucket_under_water.json create mode 100644 tests/decoration/cauldrons/cauldron_comparator_output.json create mode 100644 tests/decoration/cauldrons/cauldron_dripstone_fill.json create mode 100644 tests/decoration/cauldrons/cauldron_ignores_empty_containers.json create mode 100644 tests/decoration/cauldrons/lava_cauldron_interactions.json create mode 100644 tests/decoration/cauldrons/powder_snow_cauldron_dripstone.json create mode 100644 tests/decoration/cauldrons/powder_snow_cauldron_interactions.json create mode 100644 tests/decoration/cauldrons/water_cauldron_buckets.json create mode 100644 tests/decoration/cauldrons/water_cauldron_dripstone.json create mode 100644 tests/decoration/cauldrons/water_cauldron_glass_bottle.json create mode 100644 tests/decoration/cauldrons/water_cauldron_wash_shulker_box.json diff --git a/tests/decoration/cauldrons/cauldron_bucket_fill.json b/tests/decoration/cauldrons/cauldron_bucket_fill.json new file mode 100644 index 0000000..aa82895 --- /dev/null +++ b/tests/decoration/cauldrons/cauldron_bucket_fill.json @@ -0,0 +1,80 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "cauldron_bucket_fill", + "description": "Water, lava and powder snow buckets fill an empty cauldron (water and powder snow at level 3) and leave an empty bucket.", + "tags": ["decoration", "cauldron", "bucket", "interaction", "player"], + "minecraftIds": [ + "minecraft:cauldron" , "minecraft:water_cauldron" , "minecraft:lava_cauldron" , + "minecraft:powder_snow_cauldron", "minecraft:water_bucket" , "minecraft:lava_bucket" , + "minecraft:powder_snow_bucket" , "minecraft:bucket" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 4, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 1, 0], [5, 4, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 2, -1], [5, 4, -1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:cauldron"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:cauldron"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:cauldron"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, -0.5], "rot": [0, 65] }, + {"at": 2, "do": "interact", "item": "minecraft:water_bucket"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 3} }, + { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } + ] + }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, -0.5], "rot": [0, 65] }, + {"at": 3, "do": "interact", "item": "minecraft:lava_bucket"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:lava_cauldron"} }, + { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } + ] + }, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, -0.5], "rot": [0, 65] }, + {"at": 4, "do": "interact", "item": "minecraft:powder_snow_bucket"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [4, 1, 0], "is": {"id": "minecraft:powder_snow_cauldron", "level": 3} }, + { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/cauldrons/cauldron_bucket_under_water.json b/tests/decoration/cauldrons/cauldron_bucket_under_water.json new file mode 100644 index 0000000..e8e42ee --- /dev/null +++ b/tests/decoration/cauldrons/cauldron_bucket_under_water.json @@ -0,0 +1,76 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "cauldron_bucket_under_water", + "description": "With water directly above an empty cauldron, lava and powder snow buckets are refused, while a water bucket still fills it to level 3.", + "tags": ["decoration", "cauldron", "bucket", "water", "interaction", "player"], + "minecraftIds": [ + "minecraft:cauldron" , "minecraft:water_cauldron" , "minecraft:water" , + "minecraft:lava_bucket" , "minecraft:powder_snow_bucket", "minecraft:water_bucket" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 4, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 2, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 3, -1], [5, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:cauldron"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:cauldron"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:cauldron"} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:water" } }, + { "pos": [2, 2, 0], "block": {"id": "minecraft:water" } }, + { "pos": [4, 2, 0], "block": {"id": "minecraft:water" } } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, -0.5], "rot": [0, 72] }, + {"at": 2, "do": "interact", "item": "minecraft:lava_bucket"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:cauldron" } }, + { "is": {"id": "minecraft:lava_bucket"}, "slot": "hotbar1" } + ] + }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 3, -0.5], "rot": [0, 72] }, + {"at": 3, "do": "interact", "item": "minecraft:powder_snow_bucket"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:cauldron" } }, + { "is": {"id": "minecraft:powder_snow_bucket"}, "slot": "hotbar1" } + ] + }, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, -0.5], "rot": [0, 72] }, + {"at": 4, "do": "interact", "item": "minecraft:water_bucket"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [4, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 3} }, + { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/cauldrons/cauldron_comparator_output.json b/tests/decoration/cauldrons/cauldron_comparator_output.json new file mode 100644 index 0000000..95ce719 --- /dev/null +++ b/tests/decoration/cauldrons/cauldron_comparator_output.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "cauldron_comparator_output", + "description": "A comparator reads 0 from an empty cauldron, the fill level from water and powder snow cauldrons, and 3 from a lava cauldron.", + "tags": ["decoration", "cauldron", "comparator", "redstone", "analog-output"], + "minecraftIds": [ + "minecraft:cauldron" , "minecraft:water_cauldron" , "minecraft:lava_cauldron" , + "minecraft:powder_snow_cauldron", "minecraft:comparator" , "minecraft:redstone_wire" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 9] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 9] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:cauldron" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:comparator" , "facing": "west" } }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:water_cauldron" , "level": 1} }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:comparator" , "facing": "west" } }, + { "pos": [0, 1, 4], "block": {"id": "minecraft:water_cauldron" , "level": 3} }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:comparator" , "facing": "west" } }, + { "pos": [0, 1, 6], "block": {"id": "minecraft:lava_cauldron" } }, + { "pos": [1, 1, 6], "block": {"id": "minecraft:comparator" , "facing": "west" } }, + { "pos": [0, 1, 8], "block": {"id": "minecraft:powder_snow_cauldron", "level": 2} }, + { "pos": [1, 1, 8], "block": {"id": "minecraft:comparator" , "facing": "west" } } + ] + }, + { + "at": 3, + "do": "place_each", + "blocks": [ + { "pos": [2, 1, 0], "block": {"id": "minecraft:redstone_wire"} }, + { "pos": [2, 1, 2], "block": {"id": "minecraft:redstone_wire"} }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:redstone_wire"} }, + { "pos": [2, 1, 6], "block": {"id": "minecraft:redstone_wire"} }, + { "pos": [2, 1, 8], "block": {"id": "minecraft:redstone_wire"} } + ] + }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:redstone_wire", "power": 0} }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:redstone_wire", "power": 1} }, + { "pos": [2, 1, 4], "is": {"id": "minecraft:redstone_wire", "power": 3} }, + { "pos": [2, 1, 6], "is": {"id": "minecraft:redstone_wire", "power": 3} }, + { "pos": [2, 1, 8], "is": {"id": "minecraft:redstone_wire", "power": 2} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/cauldrons/cauldron_dripstone_fill.json b/tests/decoration/cauldrons/cauldron_dripstone_fill.json new file mode 100644 index 0000000..df9a169 --- /dev/null +++ b/tests/decoration/cauldrons/cauldron_dripstone_fill.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "cauldron_dripstone_fill", + "description": "Pointed dripstone under a water source fills an empty cauldron with water, and one under a lava source fills it with lava.", + "tags": ["decoration", "cauldron", "dripstone", "random-tick", "empty-cauldron"], + "minecraftIds": [ + "minecraft:cauldron" , "minecraft:water_cauldron" , "minecraft:lava_cauldron" , + "minecraft:pointed_dripstone", "minecraft:dripstone_block" , "minecraft:water" , + "minecraft:lava" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 6, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 2000 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 5, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 6, -1], [3, 6, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:cauldron"} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:air"} }, + { "pos": [0, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, + { + "pos": [0, 3, 0], + "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} + }, + { "pos": [0, 5, 0], "block": {"id": "minecraft:water"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:cauldron"} }, + { "pos": [2, 2, 0], "block": {"id": "minecraft:air"} }, + { "pos": [2, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, + { + "pos": [2, 3, 0], + "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} + }, + { "pos": [2, 5, 0], "block": {"id": "minecraft:lava"} } + ] + }, + { + "at": 250, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": [ + {"id": "minecraft:water_cauldron", "level": 1}, + {"id": "minecraft:water_cauldron", "level": 2}, + {"id": "minecraft:water_cauldron", "level": 3} + ] + }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:lava_cauldron"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/cauldrons/cauldron_ignores_empty_containers.json b/tests/decoration/cauldrons/cauldron_ignores_empty_containers.json new file mode 100644 index 0000000..d214349 --- /dev/null +++ b/tests/decoration/cauldrons/cauldron_ignores_empty_containers.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "cauldron_ignores_empty_containers", + "description": "An empty bucket or a glass bottle used on an empty cauldron changes nothing and stays in the hand.", + "tags": ["decoration", "cauldron", "bucket", "bottle", "interaction", "player"], + "minecraftIds": ["minecraft:cauldron", "minecraft:bucket", "minecraft:glass_bottle"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 1, 0], [3, 4, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 2, -1], [3, 4, -1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:cauldron"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:cauldron"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, -0.5], "rot": [0, 65] }, + {"at": 2, "do": "interact", "item": "minecraft:bucket"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:cauldron"} }, + { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } + ] + }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, -0.5], "rot": [0, 65] }, + {"at": 3, "do": "interact", "item": "minecraft:glass_bottle"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:cauldron" } }, + { "is": {"id": "minecraft:glass_bottle"}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/cauldrons/lava_cauldron_interactions.json b/tests/decoration/cauldrons/lava_cauldron_interactions.json new file mode 100644 index 0000000..d851433 --- /dev/null +++ b/tests/decoration/cauldrons/lava_cauldron_interactions.json @@ -0,0 +1,91 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "lava_cauldron_interactions", + "description": "An empty bucket takes the lava, water and powder snow buckets replace it with a level 3 cauldron, and bottles do nothing.", + "tags": ["decoration", "cauldron", "lava-cauldron", "bucket", "bottle", "interaction", "player"], + "minecraftIds": [ + "minecraft:lava_cauldron" , "minecraft:cauldron" , "minecraft:water_cauldron" , + "minecraft:powder_snow_cauldron", "minecraft:bucket" , "minecraft:lava_bucket" , + "minecraft:water_bucket" , "minecraft:powder_snow_bucket" , "minecraft:glass_bottle" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [7, 4, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [7, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 1, 0], [7, 4, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 2, -1], [7, 4, -1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:lava_cauldron"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:lava_cauldron"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:lava_cauldron"} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:lava_cauldron"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, -0.5], "rot": [0, 65] }, + {"at": 2, "do": "interact", "item": "minecraft:bucket"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:cauldron" } }, + { "is": {"id": "minecraft:lava_bucket"}, "slot": "hotbar1" } + ] + }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, -0.5], "rot": [0, 65] }, + {"at": 3, "do": "interact", "item": "minecraft:water_bucket"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 3} }, + { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } + ] + }, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, -0.5], "rot": [0, 65] }, + {"at": 4, "do": "interact", "item": "minecraft:powder_snow_bucket"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [4, 1, 0], "is": {"id": "minecraft:powder_snow_cauldron", "level": 3} }, + { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, -0.5], "rot": [0, 65] }, + {"at": 5, "do": "interact", "item": "minecraft:glass_bottle"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [6, 1, 0], "is": {"id": "minecraft:lava_cauldron"} }, + { "is": {"id": "minecraft:glass_bottle" }, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/cauldrons/powder_snow_cauldron_dripstone.json b/tests/decoration/cauldrons/powder_snow_cauldron_dripstone.json new file mode 100644 index 0000000..e5579e6 --- /dev/null +++ b/tests/decoration/cauldrons/powder_snow_cauldron_dripstone.json @@ -0,0 +1,88 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "powder_snow_cauldron_dripstone", + "description": "Water and lava drips leave a powder snow cauldron unchanged, while an empty cauldron under the same water source does fill.", + "tags": ["decoration", "cauldron", "dripstone", "random-tick", "powder-snow-cauldron"], + "minecraftIds": [ + "minecraft:powder_snow_cauldron", "minecraft:cauldron" , "minecraft:water_cauldron" , + "minecraft:pointed_dripstone" , "minecraft:dripstone_block" , "minecraft:water" , + "minecraft:lava" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 6, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 2000 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 5, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 6, -1], [5, 6, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:powder_snow_cauldron", "level": 1} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:air"} }, + { "pos": [0, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, + { + "pos": [0, 3, 0], + "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} + }, + { "pos": [0, 5, 0], "block": {"id": "minecraft:water"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:powder_snow_cauldron", "level": 1} }, + { "pos": [2, 2, 0], "block": {"id": "minecraft:air"} }, + { "pos": [2, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, + { + "pos": [2, 3, 0], + "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} + }, + { "pos": [2, 5, 0], "block": {"id": "minecraft:lava"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:cauldron"} }, + { "pos": [4, 2, 0], "block": {"id": "minecraft:air"} }, + { "pos": [4, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, + { + "pos": [4, 3, 0], + "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} + }, + { "pos": [4, 5, 0], "block": {"id": "minecraft:water"} } + ] + }, + { + "at": 250, + "do": "assert", + "checks": [ + { + "pos": [4, 1, 0], + "is": [ + {"id": "minecraft:water_cauldron", "level": 1}, + {"id": "minecraft:water_cauldron", "level": 2}, + {"id": "minecraft:water_cauldron", "level": 3} + ] + }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:powder_snow_cauldron", "level": 1} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:powder_snow_cauldron", "level": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/cauldrons/powder_snow_cauldron_interactions.json b/tests/decoration/cauldrons/powder_snow_cauldron_interactions.json new file mode 100644 index 0000000..d5524c2 --- /dev/null +++ b/tests/decoration/cauldrons/powder_snow_cauldron_interactions.json @@ -0,0 +1,91 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "powder_snow_cauldron_interactions", + "description": "An empty bucket only takes powder snow from a full cauldron, a water bucket turns it into a level 3 water cauldron, and glass bottles do nothing.", + "tags": ["decoration", "cauldron", "powder-snow-cauldron", "bucket", "bottle", "interaction", "player"], + "minecraftIds": [ + "minecraft:powder_snow_cauldron", "minecraft:cauldron" , "minecraft:water_cauldron" , + "minecraft:bucket" , "minecraft:powder_snow_bucket" , "minecraft:water_bucket" , + "minecraft:glass_bottle" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [7, 4, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [7, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 1, 0], [7, 4, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 2, -1], [7, 4, -1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:powder_snow_cauldron", "level": 3} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:powder_snow_cauldron", "level": 2} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:powder_snow_cauldron", "level": 1} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:powder_snow_cauldron", "level": 3} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, -0.5], "rot": [0, 65] }, + {"at": 2, "do": "interact", "item": "minecraft:bucket"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:cauldron" } }, + { "is": {"id": "minecraft:powder_snow_bucket"}, "slot": "hotbar1" } + ] + }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, -0.5], "rot": [0, 65] }, + {"at": 3, "do": "interact", "item": "minecraft:bucket"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:powder_snow_cauldron", "level": 2} }, + { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } + ] + }, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, -0.5], "rot": [0, 65] }, + {"at": 4, "do": "interact", "item": "minecraft:glass_bottle"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [4, 1, 0], "is": {"id": "minecraft:powder_snow_cauldron", "level": 1} }, + { "is": {"id": "minecraft:glass_bottle" }, "slot": "hotbar1" } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, -0.5], "rot": [0, 65] }, + {"at": 5, "do": "interact", "item": "minecraft:water_bucket"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [6, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 3} }, + { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/cauldrons/water_cauldron_buckets.json b/tests/decoration/cauldrons/water_cauldron_buckets.json new file mode 100644 index 0000000..3ebf9fa --- /dev/null +++ b/tests/decoration/cauldrons/water_cauldron_buckets.json @@ -0,0 +1,91 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "water_cauldron_buckets", + "description": "An empty bucket only takes water from a full water cauldron, and lava or powder snow buckets replace the water cauldron's contents.", + "tags": ["decoration", "cauldron", "water-cauldron", "bucket", "interaction", "player"], + "minecraftIds": [ + "minecraft:water_cauldron" , "minecraft:cauldron" , "minecraft:lava_cauldron" , + "minecraft:powder_snow_cauldron", "minecraft:bucket" , "minecraft:water_bucket" , + "minecraft:lava_bucket" , "minecraft:powder_snow_bucket" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [7, 4, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [7, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 1, 0], [7, 4, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 2, -1], [7, 4, -1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 3} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 2} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 1} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 2} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, -0.5], "rot": [0, 65] }, + {"at": 2, "do": "interact", "item": "minecraft:bucket"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:cauldron" } }, + { "is": {"id": "minecraft:water_bucket"}, "slot": "hotbar1" } + ] + }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, -0.5], "rot": [0, 65] }, + {"at": 3, "do": "interact", "item": "minecraft:bucket"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 2} }, + { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } + ] + }, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, -0.5], "rot": [0, 65] }, + {"at": 4, "do": "interact", "item": "minecraft:lava_bucket"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [4, 1, 0], "is": {"id": "minecraft:lava_cauldron"} }, + { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, -0.5], "rot": [0, 65] }, + {"at": 5, "do": "interact", "item": "minecraft:powder_snow_bucket"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [6, 1, 0], "is": {"id": "minecraft:powder_snow_cauldron", "level": 3} }, + { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/cauldrons/water_cauldron_dripstone.json b/tests/decoration/cauldrons/water_cauldron_dripstone.json new file mode 100644 index 0000000..7bf5f0c --- /dev/null +++ b/tests/decoration/cauldrons/water_cauldron_dripstone.json @@ -0,0 +1,86 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "water_cauldron_dripstone", + "description": "A water drip raises a water cauldron's level until it is full, while a lava drip leaves a water cauldron unchanged.", + "tags": ["decoration", "cauldron", "dripstone", "random-tick", "water-cauldron"], + "minecraftIds": [ + "minecraft:water_cauldron" , "minecraft:pointed_dripstone", "minecraft:dripstone_block" , + "minecraft:water" , "minecraft:lava" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 6, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 2000 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 5, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 6, -1], [5, 6, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 1} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:air"} }, + { "pos": [0, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, + { + "pos": [0, 3, 0], + "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} + }, + { "pos": [0, 5, 0], "block": {"id": "minecraft:water"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 3} }, + { "pos": [2, 2, 0], "block": {"id": "minecraft:air"} }, + { "pos": [2, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, + { + "pos": [2, 3, 0], + "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} + }, + { "pos": [2, 5, 0], "block": {"id": "minecraft:water"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 1} }, + { "pos": [4, 2, 0], "block": {"id": "minecraft:air"} }, + { "pos": [4, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, + { + "pos": [4, 3, 0], + "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} + }, + { "pos": [4, 5, 0], "block": {"id": "minecraft:lava"} } + ] + }, + { + "at": 250, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": [ + {"id": "minecraft:water_cauldron", "level": 2}, + {"id": "minecraft:water_cauldron", "level": 3} + ] + }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 3} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/cauldrons/water_cauldron_glass_bottle.json b/tests/decoration/cauldrons/water_cauldron_glass_bottle.json new file mode 100644 index 0000000..201fbd0 --- /dev/null +++ b/tests/decoration/cauldrons/water_cauldron_glass_bottle.json @@ -0,0 +1,76 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "water_cauldron_glass_bottle", + "description": "A glass bottle lowers a water cauldron by one level and becomes a potion, and the last level turns the cauldron back into an empty one.", + "tags": ["decoration", "cauldron", "water-cauldron", "bottle", "interaction", "player"], + "minecraftIds": ["minecraft:water_cauldron", "minecraft:cauldron", "minecraft:glass_bottle", "minecraft:potion"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 4, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 1, 0], [5, 4, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 2, -1], [5, 4, -1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 3} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 2} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 1} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, -0.5], "rot": [0, 65] }, + {"at": 2, "do": "interact", "item": "minecraft:glass_bottle"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 2} }, + { "is": {"id": "minecraft:potion" }, "slot": "hotbar1" } + ] + }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, -0.5], "rot": [0, 65] }, + {"at": 3, "do": "interact", "item": "minecraft:glass_bottle"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 1} }, + { "is": {"id": "minecraft:potion" }, "slot": "hotbar1" } + ] + }, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, -0.5], "rot": [0, 65] }, + {"at": 4, "do": "interact", "item": "minecraft:glass_bottle"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [4, 1, 0], "is": {"id": "minecraft:cauldron"} }, + { "is": {"id": "minecraft:potion" }, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/cauldrons/water_cauldron_wash_shulker_box.json b/tests/decoration/cauldrons/water_cauldron_wash_shulker_box.json new file mode 100644 index 0000000..d320eb5 --- /dev/null +++ b/tests/decoration/cauldrons/water_cauldron_wash_shulker_box.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "water_cauldron_wash_shulker_box", + "description": "A water cauldron turns a dyed shulker box into a plain one and loses a level, while a plain shulker box leaves the level unchanged.", + "tags": ["decoration", "cauldron", "water-cauldron", "washing", "interaction", "player"], + "minecraftIds": ["minecraft:water_cauldron", "minecraft:red_shulker_box", "minecraft:shulker_box"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:red_shulker_box"} }, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 1, 0], [3, 4, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 2, -1], [3, 4, -1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 3} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 3} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, -0.5], "rot": [0, 65] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 2} }, + { "is": {"id": "minecraft:shulker_box" }, "slot": "hotbar1" } + ] + }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, -0.5], "rot": [0, 65] }, + {"at": 3, "do": "interact", "item": "minecraft:shulker_box"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 3} } + ] + } + ], + "breakpoints": [] +} + From dc83300dd34c259a40b74097c95013358346ad51 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 26 Oct 2026 04:14:21 +0100 Subject: [PATCH 15/85] Add Flint tests for composter (1 blocks) --- .../composter_adventure_composts.json | 41 ++++++++++ .../composter_cake_always_composts.json | 41 ++++++++++ .../composter_comparator_signal.json | 52 +++++++++++++ .../composter_creative_keeps_item.json | 41 ++++++++++ .../composter_empty_hand_below_ready.json | 38 +++++++++ ...mposter_empty_hand_harvests_bone_meal.json | 38 +++++++++ .../composter_first_item_always_composts.json | 41 ++++++++++ ...mposter_hopper_extract_requires_ready.json | 44 +++++++++++ .../composter_hopper_extracts_bone_meal.json | 47 +++++++++++ .../composter_hopper_fills_to_ready.json | 78 +++++++++++++++++++ .../composter_hopper_inserts_first_item.json | 45 +++++++++++ ...poster_hopper_rejects_non_compostable.json | 45 +++++++++++ .../composter_hopper_side_cannot_insert.json | 45 +++++++++++ ...oster_item_in_hand_harvests_bone_meal.json | 45 +++++++++++ ...composter_item_places_empty_composter.json | 34 ++++++++ .../composter_level_7_rejects_items.json | 41 ++++++++++ ...omposter_non_compostable_item_ignored.json | 41 ++++++++++ .../composter_ready_after_20_ticks.json | 40 ++++++++++ .../composter_spectator_cannot_compost.json | 41 ++++++++++ 19 files changed, 838 insertions(+) create mode 100644 tests/decoration/composter/composter_adventure_composts.json create mode 100644 tests/decoration/composter/composter_cake_always_composts.json create mode 100644 tests/decoration/composter/composter_comparator_signal.json create mode 100644 tests/decoration/composter/composter_creative_keeps_item.json create mode 100644 tests/decoration/composter/composter_empty_hand_below_ready.json create mode 100644 tests/decoration/composter/composter_empty_hand_harvests_bone_meal.json create mode 100644 tests/decoration/composter/composter_first_item_always_composts.json create mode 100644 tests/decoration/composter/composter_hopper_extract_requires_ready.json create mode 100644 tests/decoration/composter/composter_hopper_extracts_bone_meal.json create mode 100644 tests/decoration/composter/composter_hopper_fills_to_ready.json create mode 100644 tests/decoration/composter/composter_hopper_inserts_first_item.json create mode 100644 tests/decoration/composter/composter_hopper_rejects_non_compostable.json create mode 100644 tests/decoration/composter/composter_hopper_side_cannot_insert.json create mode 100644 tests/decoration/composter/composter_item_in_hand_harvests_bone_meal.json create mode 100644 tests/decoration/composter/composter_item_places_empty_composter.json create mode 100644 tests/decoration/composter/composter_level_7_rejects_items.json create mode 100644 tests/decoration/composter/composter_non_compostable_item_ignored.json create mode 100644 tests/decoration/composter/composter_ready_after_20_ticks.json create mode 100644 tests/decoration/composter/composter_spectator_cannot_compost.json diff --git a/tests/decoration/composter/composter_adventure_composts.json b/tests/decoration/composter/composter_adventure_composts.json new file mode 100644 index 0000000..4492f74 --- /dev/null +++ b/tests/decoration/composter/composter_adventure_composts.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_adventure_composts", + "description": "An adventure-mode player can still compost: using a pumpkin pie raises a level 3 composter to level 4 and consumes the item.", + "tags": ["composter", "interaction", "player", "composting", "adventure"], + "minecraftIds": ["minecraft:composter", "minecraft:pumpkin_pie", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "selected_hotbar": 1, + "inventory": { "hotbar1": {"id": "minecraft:pumpkin_pie", "count": 2} }, + "game_mode": "Adventure" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 3} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter" , "level": 4 } }, + { "is": {"id": "minecraft:pumpkin_pie", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_cake_always_composts.json b/tests/decoration/composter/composter_cake_always_composts.json new file mode 100644 index 0000000..5867345 --- /dev/null +++ b/tests/decoration/composter/composter_cake_always_composts.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_cake_always_composts", + "description": "A survival player using a cake (chance 1.0) on a level 3 composter always raises it to level 4 and consumes the cake.", + "tags": ["composter", "interaction", "player", "composting"], + "minecraftIds": ["minecraft:composter", "minecraft:cake", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "selected_hotbar": 1, + "inventory": { "hotbar1": {"id": "minecraft:cake", "count": 1} }, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 3} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 4} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_comparator_signal.json b/tests/decoration/composter/composter_comparator_signal.json new file mode 100644 index 0000000..cfa1a88 --- /dev/null +++ b/tests/decoration/composter/composter_comparator_signal.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_comparator_signal", + "description": "A comparator reading a composter outputs the fill level as its signal strength (0, 1, 5 and 8 for levels 0, 1, 5 and 8).", + "tags": ["composter", "comparator", "redstone", "analog-output"], + "minecraftIds": ["minecraft:composter", "minecraft:comparator", "minecraft:redstone_wire", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 1, 6] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [2, 0, 6] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter" , "level": 0 } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:comparator" , "facing": "west"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:redstone_wire" } }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:composter" , "level": 1 } }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:comparator" , "facing": "west"} }, + { "pos": [2, 1, 2], "block": {"id": "minecraft:redstone_wire" } }, + { "pos": [0, 1, 4], "block": {"id": "minecraft:composter" , "level": 5 } }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:comparator" , "facing": "west"} }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:redstone_wire" } }, + { "pos": [0, 1, 6], "block": {"id": "minecraft:composter" , "level": 8 } }, + { "pos": [1, 1, 6], "block": {"id": "minecraft:comparator" , "facing": "west"} }, + { "pos": [2, 1, 6], "block": {"id": "minecraft:redstone_wire" } } + ] + }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:redstone_wire", "power": 0} }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:redstone_wire", "power": 1} }, + { "pos": [2, 1, 4], "is": {"id": "minecraft:redstone_wire", "power": 5} }, + { "pos": [2, 1, 6], "is": {"id": "minecraft:redstone_wire", "power": 8} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_creative_keeps_item.json b/tests/decoration/composter/composter_creative_keeps_item.json new file mode 100644 index 0000000..5286765 --- /dev/null +++ b/tests/decoration/composter/composter_creative_keeps_item.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_creative_keeps_item", + "description": "A creative player composting a pumpkin pie (chance 1.0) raises the composter, but ItemStack.consume does not shrink the stack in creative mode.", + "tags": ["composter", "interaction", "player", "composting", "creative"], + "minecraftIds": ["minecraft:composter", "minecraft:pumpkin_pie", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "selected_hotbar": 1, + "inventory": { "hotbar1": {"id": "minecraft:pumpkin_pie", "count": 3} }, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 3} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter" , "level": 4 } }, + { "is": {"id": "minecraft:pumpkin_pie", "count": 3}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_empty_hand_below_ready.json b/tests/decoration/composter/composter_empty_hand_below_ready.json new file mode 100644 index 0000000..ceeaba0 --- /dev/null +++ b/tests/decoration/composter/composter_empty_hand_below_ready.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_empty_hand_below_ready", + "description": "Using an empty hand on a level 3 composter does nothing and spawns no item.", + "tags": ["composter", "interaction", "player"], + "minecraftIds": ["minecraft:composter", "minecraft:stone", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": {"selected_hotbar": 1, "game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 3} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 3} }, + {"slot": "hotbar1", "is": "empty"} , + {"is": "minecraft:item", "exists": false} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_empty_hand_harvests_bone_meal.json b/tests/decoration/composter/composter_empty_hand_harvests_bone_meal.json new file mode 100644 index 0000000..7743325 --- /dev/null +++ b/tests/decoration/composter/composter_empty_hand_harvests_bone_meal.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_empty_hand_harvests_bone_meal", + "description": "Using an empty hand on a level 8 composter resets it to level 0 and drops exactly one bone meal item.", + "tags": ["composter", "interaction", "player", "bone-meal", "drops"], + "minecraftIds": ["minecraft:composter", "minecraft:bone_meal", "minecraft:item", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": {"selected_hotbar": 1, "game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 8} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 0} } , + {"slot": "hotbar1", "is": "empty"} , + { "is": "minecraft:item", "count": 1, "pos": [0.5, 2, 0.5], "position_tolerance": 1.5 } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_first_item_always_composts.json b/tests/decoration/composter/composter_first_item_always_composts.json new file mode 100644 index 0000000..4ed14d2 --- /dev/null +++ b/tests/decoration/composter/composter_first_item_always_composts.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_first_item_always_composts", + "description": "A survival player using wheat seeds (30% chance) on an empty composter always raises it to level 1, because ComposterBlock.addItem skips the random roll at level 0, and the held stack shrinks by one.", + "tags": ["composter", "composting", "interaction", "player"], + "minecraftIds": ["minecraft:composter", "minecraft:wheat_seeds", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:wheat_seeds", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 0} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter" , "level": 1 } }, + { "is": {"id": "minecraft:wheat_seeds", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_hopper_extract_requires_ready.json b/tests/decoration/composter/composter_hopper_extract_requires_ready.json new file mode 100644 index 0000000..1f16969 --- /dev/null +++ b/tests/decoration/composter/composter_hopper_extract_requires_ready.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_hopper_extract_requires_ready", + "description": "A hopper below a composter that is not ready (level 3) pulls nothing and the level is unchanged.", + "tags": ["composter", "hopper", "block-entity", "extraction"], + "minecraftIds": ["minecraft:composter", "minecraft:hopper"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [0, 0, 0], + "block": { + "id": "minecraft:hopper", + "facing": "east", + "nbt": {"Items": "[]", "TransferCooldown": 0} + } + }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 3} } + ] + }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 3} }, + { + "pos": [0, 0, 0], + "is": { "id": "minecraft:hopper", "nbt": {"Items": []} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_hopper_extracts_bone_meal.json b/tests/decoration/composter/composter_hopper_extracts_bone_meal.json new file mode 100644 index 0000000..a9eeaf3 --- /dev/null +++ b/tests/decoration/composter/composter_hopper_extracts_bone_meal.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_hopper_extracts_bone_meal", + "description": "A hopper below a ready (level 8) composter pulls out one bone meal through the bottom face and the composter resets to level 0.", + "tags": ["composter", "hopper", "block-entity", "extraction", "bone-meal"], + "minecraftIds": ["minecraft:composter", "minecraft:hopper", "minecraft:bone_meal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [0, 0, 0], + "block": { + "id": "minecraft:hopper", + "facing": "east", + "nbt": {"Items": "[]", "TransferCooldown": 0} + } + }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 8} } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 0} }, + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:hopper", + "nbt": {"Items[0].id": "minecraft:bone_meal", "Items[0].count": 1} + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_hopper_fills_to_ready.json b/tests/decoration/composter/composter_hopper_fills_to_ready.json new file mode 100644 index 0000000..bfa80c4 --- /dev/null +++ b/tests/decoration/composter/composter_hopper_fills_to_ready.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_hopper_fills_to_ready", + "description": "A hopper above a composter feeds pumpkin pies (chance 1.0) one per 8 ticks up to level 7, stops there keeping the last pie, and the composter then turns ready (level 8) 20 ticks later.", + "tags": ["composter", "hopper", "block-entity", "insertion", "timing"], + "minecraftIds": ["minecraft:composter", "minecraft:hopper", "minecraft:pumpkin_pie", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 0} }, + { + "pos": [0, 2, 0], + "block": { + "id": "minecraft:hopper", + "facing": "down", + "nbt": {"Items": "[{Slot: 0b, count: 8, id: \"minecraft:pumpkin_pie\"}]", "TransferCooldown": 0} + } + } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 1} }, + { + "pos": [0, 2, 0], + "is": { "id": "minecraft:hopper", "nbt": {"Items[0].count": 7} } + } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 5} }, + { + "pos": [0, 2, 0], + "is": { "id": "minecraft:hopper", "nbt": {"Items[0].count": 3} } + } + ] + }, + { + "at": 60, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 7} }, + { + "pos": [0, 2, 0], + "is": { "id": "minecraft:hopper", "nbt": {"Items[0].count": 1} } + } + ] + }, + { + "at": 80, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 8} }, + { + "pos": [0, 2, 0], + "is": { "id": "minecraft:hopper", "nbt": {"Items[0].count": 1} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_hopper_inserts_first_item.json b/tests/decoration/composter/composter_hopper_inserts_first_item.json new file mode 100644 index 0000000..a272033 --- /dev/null +++ b/tests/decoration/composter/composter_hopper_inserts_first_item.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_hopper_inserts_first_item", + "description": "A hopper above an empty composter feeds it through the top face: the first seed always composts, raising it to level 1 and removing one seed from the hopper.", + "tags": ["composter", "hopper", "block-entity", "insertion"], + "minecraftIds": ["minecraft:composter", "minecraft:hopper", "minecraft:wheat_seeds", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 0} }, + { + "pos": [0, 2, 0], + "block": { + "id": "minecraft:hopper", + "facing": "down", + "nbt": {"Items": "[{Slot: 0b, count: 2, id: \"minecraft:wheat_seeds\"}]", "TransferCooldown": 0} + } + } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 1} }, + { + "pos": [0, 2, 0], + "is": { "id": "minecraft:hopper", "nbt": {"Items[0].count": 1} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_hopper_rejects_non_compostable.json b/tests/decoration/composter/composter_hopper_rejects_non_compostable.json new file mode 100644 index 0000000..eaefda6 --- /dev/null +++ b/tests/decoration/composter/composter_hopper_rejects_non_compostable.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_hopper_rejects_non_compostable", + "description": "A hopper above a composter holding a non-compostable item (stone) inserts nothing.", + "tags": ["composter", "hopper", "block-entity", "insertion"], + "minecraftIds": ["minecraft:composter", "minecraft:hopper", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 0} }, + { + "pos": [0, 2, 0], + "block": { + "id": "minecraft:hopper", + "facing": "down", + "nbt": {"Items": "[{Slot: 0b, count: 4, id: \"minecraft:stone\"}]", "TransferCooldown": 0} + } + } + ] + }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 0} }, + { + "pos": [0, 2, 0], + "is": { "id": "minecraft:hopper", "nbt": {"Items[0].count": 4} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_hopper_side_cannot_insert.json b/tests/decoration/composter/composter_hopper_side_cannot_insert.json new file mode 100644 index 0000000..a39ae01 --- /dev/null +++ b/tests/decoration/composter/composter_hopper_side_cannot_insert.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_hopper_side_cannot_insert", + "description": "A hopper feeding the composter from the side inserts nothing, because the input container only accepts items through its top face.", + "tags": ["composter", "hopper", "block-entity", "insertion", "side-face"], + "minecraftIds": ["minecraft:composter", "minecraft:hopper", "minecraft:pumpkin_pie", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 0} }, + { + "pos": [1, 1, 0], + "block": { + "id": "minecraft:hopper", + "facing": "west", + "nbt": {"Items": "[{Slot: 0b, count: 4, id: \"minecraft:pumpkin_pie\"}]", "TransferCooldown": 0} + } + } + ] + }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 0} }, + { + "pos": [1, 1, 0], + "is": { "id": "minecraft:hopper", "nbt": {"Items[0].count": 4} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_item_in_hand_harvests_bone_meal.json b/tests/decoration/composter/composter_item_in_hand_harvests_bone_meal.json new file mode 100644 index 0000000..b29d89e --- /dev/null +++ b/tests/decoration/composter/composter_item_in_hand_harvests_bone_meal.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_item_in_hand_harvests_bone_meal", + "description": "Using a compostable item on a level 8 composter falls through to the empty-hand path: it drops one bone meal, resets to level 0 and leaves the held item untouched.", + "tags": ["composter", "interaction", "player", "bone-meal", "drops"], + "minecraftIds": [ + "minecraft:composter" , "minecraft:pumpkin_pie", "minecraft:bone_meal" , "minecraft:item" , + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "selected_hotbar": 1, + "inventory": { "hotbar1": {"id": "minecraft:pumpkin_pie", "count": 2} }, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 8} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 0} } , + { "slot": "hotbar1", "is": {"id": "minecraft:pumpkin_pie", "count": 2} } , + { "is": "minecraft:item", "count": 1, "pos": [0.5, 2, 0.5], "position_tolerance": 1.5 } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_item_places_empty_composter.json b/tests/decoration/composter/composter_item_places_empty_composter.json new file mode 100644 index 0000000..e5820b0 --- /dev/null +++ b/tests/decoration/composter/composter_item_places_empty_composter.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_item_places_empty_composter", + "description": "Using a composter item on top of stone places a composter in its default state, level 0, and consumes the item.", + "tags": ["composter", "placement", "player"], + "minecraftIds": ["minecraft:composter", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:composter", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 0} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_level_7_rejects_items.json b/tests/decoration/composter/composter_level_7_rejects_items.json new file mode 100644 index 0000000..071feef --- /dev/null +++ b/tests/decoration/composter/composter_level_7_rejects_items.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_level_7_rejects_items", + "description": "At level 7 a compostable item is not accepted: the level stays 7 and the held stack is unchanged.", + "tags": ["composter", "interaction", "player", "composting"], + "minecraftIds": ["minecraft:composter", "minecraft:pumpkin_pie", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "selected_hotbar": 1, + "inventory": { "hotbar1": {"id": "minecraft:pumpkin_pie", "count": 2} }, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 7} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter" , "level": 7 } }, + { "is": {"id": "minecraft:pumpkin_pie", "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_non_compostable_item_ignored.json b/tests/decoration/composter/composter_non_compostable_item_ignored.json new file mode 100644 index 0000000..b9dbb63 --- /dev/null +++ b/tests/decoration/composter/composter_non_compostable_item_ignored.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_non_compostable_item_ignored", + "description": "A non-compostable item (stick) used on a level 3 composter leaves both the level and the stack unchanged.", + "tags": ["composter", "interaction", "player"], + "minecraftIds": ["minecraft:composter", "minecraft:stick", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "selected_hotbar": 1, + "inventory": { "hotbar1": {"id": "minecraft:stick", "count": 2} }, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 3} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 3 } }, + { "is": {"id": "minecraft:stick" , "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_ready_after_20_ticks.json b/tests/decoration/composter/composter_ready_after_20_ticks.json new file mode 100644 index 0000000..8ac591b --- /dev/null +++ b/tests/decoration/composter/composter_ready_after_20_ticks.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_ready_after_20_ticks", + "description": "A composter placed at level 7 schedules a 20-tick block tick in onPlace and then cycles to level 8; it is still level 7 just before that.", + "tags": ["composter", "scheduled-tick", "timing"], + "minecraftIds": ["minecraft:composter", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 7} } + ] + }, + { + "at": 18, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 7} } + ] + }, + { + "at": 21, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter", "level": 8} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/composter/composter_spectator_cannot_compost.json b/tests/decoration/composter/composter_spectator_cannot_compost.json new file mode 100644 index 0000000..5e60e52 --- /dev/null +++ b/tests/decoration/composter/composter_spectator_cannot_compost.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "composter_spectator_cannot_compost", + "description": "A spectator using a compostable item on a composter changes nothing, because ServerPlayerGameMode.useItemOn returns early for spectators.", + "tags": ["composter", "interaction", "player", "spectator"], + "minecraftIds": ["minecraft:composter", "minecraft:pumpkin_pie", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "selected_hotbar": 1, + "inventory": { "hotbar1": {"id": "minecraft:pumpkin_pie", "count": 2} }, + "game_mode": "Spectator" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:composter", "level": 3} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:composter" , "level": 3 } }, + { "is": {"id": "minecraft:pumpkin_pie", "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + From e83bd9d309cd27fa482cf69d9cecd7f5ccff4883 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 26 Oct 2026 04:18:49 +0100 Subject: [PATCH 16/85] Add Flint tests for conduit (1 blocks) --- .../conduit/conduit_not_pushed_by_piston.json | 42 ++++++++++++++++ .../conduit/conduit_placed_in_air_is_dry.json | 30 ++++++++++++ ...onduit_placed_in_flowing_water_is_dry.json | 48 +++++++++++++++++++ ...onduit_placed_in_water_is_waterlogged.json | 41 ++++++++++++++++ .../conduit_waterlogged_spreads_water.json | 43 +++++++++++++++++ 5 files changed, 204 insertions(+) create mode 100644 tests/decoration/conduit/conduit_not_pushed_by_piston.json create mode 100644 tests/decoration/conduit/conduit_placed_in_air_is_dry.json create mode 100644 tests/decoration/conduit/conduit_placed_in_flowing_water_is_dry.json create mode 100644 tests/decoration/conduit/conduit_placed_in_water_is_waterlogged.json create mode 100644 tests/decoration/conduit/conduit_waterlogged_spreads_water.json diff --git a/tests/decoration/conduit/conduit_not_pushed_by_piston.json b/tests/decoration/conduit/conduit_not_pushed_by_piston.json new file mode 100644 index 0000000..c2a980a --- /dev/null +++ b/tests/decoration/conduit/conduit_not_pushed_by_piston.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Conduit Not Pushed By Piston", + "description": "A conduit has a block entity, so PistonBaseBlock.isPushable rejects it: a powered piston facing it neither moves it nor extends.", + "tags": ["conduit", "piston", "block-entity", "push-reaction", "redstone"], + "minecraftIds": ["minecraft:conduit", "minecraft:piston"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston", "facing": "east", "extended": "false"} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:conduit", "waterlogged": false} } + ] + }, + { "at": 2, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": "false"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:conduit", "waterlogged": false} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/conduit/conduit_placed_in_air_is_dry.json b/tests/decoration/conduit/conduit_placed_in_air_is_dry.json new file mode 100644 index 0000000..1662853 --- /dev/null +++ b/tests/decoration/conduit/conduit_placed_in_air_is_dry.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Conduit Placed In Air Is Dry", + "description": "A conduit placed by a player in air is not waterlogged: getStateForPlacement only sets waterlogged for a full water fluid state, overriding the registered default of true.", + "tags": ["conduit", "placement", "waterlogging", "block-state", "player"], + "minecraftIds": ["minecraft:conduit"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:conduit"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:conduit", "waterlogged": false} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/conduit/conduit_placed_in_flowing_water_is_dry.json b/tests/decoration/conduit/conduit_placed_in_flowing_water_is_dry.json new file mode 100644 index 0000000..5333015 --- /dev/null +++ b/tests/decoration/conduit/conduit_placed_in_flowing_water_is_dry.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Conduit Placed In Flowing Water Is Dry", + "description": "A conduit placed into non-source (flowing) water is not waterlogged because getStateForPlacement requires the fluid state to be full.", + "tags": ["conduit", "placement", "waterlogging", "water", "edge-case", "block-state", "player"], + "minecraftIds": ["minecraft:conduit", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 1, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:water", "level": 3} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 3} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:conduit"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:conduit", "waterlogged": false} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/conduit/conduit_placed_in_water_is_waterlogged.json b/tests/decoration/conduit/conduit_placed_in_water_is_waterlogged.json new file mode 100644 index 0000000..7c2d8e1 --- /dev/null +++ b/tests/decoration/conduit/conduit_placed_in_water_is_waterlogged.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Conduit Placed In Water Is Waterlogged", + "description": "A conduit placed by a player into a water source block is waterlogged (getStateForPlacement requires a full water fluid state) and the item is consumed.", + "tags": ["conduit", "placement", "waterlogging", "water", "block-state", "player"], + "minecraftIds": ["minecraft:conduit", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 1, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:water"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:conduit"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:conduit", "waterlogged": true} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/conduit/conduit_waterlogged_spreads_water.json b/tests/decoration/conduit/conduit_waterlogged_spreads_water.json new file mode 100644 index 0000000..8561aef --- /dev/null +++ b/tests/decoration/conduit/conduit_waterlogged_spreads_water.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Conduit Waterlogged Spreads Water", + "description": "A waterlogged conduit acts as a water source (getFluidState returns source water) and, once a neighbour update schedules its water tick (updateShape), spreads flowing water to adjacent open floor.", + "tags": ["conduit", "waterlogging", "water", "fluids", "block-state"], + "minecraftIds": ["minecraft:conduit", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -2], [2, 2, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -2], [2, 1, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [1, 1, 1] ], + "with": {"id": "minecraft:air"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:conduit", "waterlogged": true} }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:conduit", "waterlogged": true } }, + { "pos": [ 1, 1, 0], "is": {"id": "minecraft:water" , "level": 1} }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:water" , "level": 1} }, + { "pos": [ 0, 1, 1], "is": {"id": "minecraft:water" , "level": 1} }, + { "pos": [ 0, 1, -1], "is": {"id": "minecraft:water" , "level": 1} } + ] + } + ], + "breakpoints": [] +} + From 5ab42405ec6569a4bb87f4687f5b65cc8b4d7c35 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 26 Oct 2026 04:35:09 +0100 Subject: [PATCH 17/85] Add Flint tests for axes (7 blocks) --- .../axes/axe_blocked_by_offhand_shield.json | 46 ++++++++ .../axe_breaks_after_durability_uses.json | 104 ++++++++++++++++++ .../axes/axe_creative_takes_no_damage.json | 98 +++++++++++++++++ .../axe_frees_copper_golem_from_statue.json | 45 ++++++++ .../items/axes/axe_ignores_unaged_copper.json | 46 ++++++++ .../axe_no_effect_on_stripped_or_stone.json | 47 ++++++++ .../axes/axe_scrape_copper_one_step.json | 60 ++++++++++ tests/items/axes/axe_scrape_golem_statue.json | 55 +++++++++ .../axe_scrape_keeps_stair_properties.json | 53 +++++++++ tests/items/axes/axe_strip_log_axes.json | 48 ++++++++ .../items/axes/axe_strip_log_from_below.json | 40 +++++++ .../items/axes/axe_strip_wood_and_stems.json | 54 +++++++++ .../items/axes/axe_wax_off_before_scrape.json | 44 ++++++++ .../items/axes/axe_wax_off_golem_statue.json | 47 ++++++++ .../axes/axe_wax_off_keeps_bulb_state.json | 38 +++++++ tests/items/axes/wooden_axe_furnace_fuel.json | 43 ++++++++ 16 files changed, 868 insertions(+) create mode 100644 tests/items/axes/axe_blocked_by_offhand_shield.json create mode 100644 tests/items/axes/axe_breaks_after_durability_uses.json create mode 100644 tests/items/axes/axe_creative_takes_no_damage.json create mode 100644 tests/items/axes/axe_frees_copper_golem_from_statue.json create mode 100644 tests/items/axes/axe_ignores_unaged_copper.json create mode 100644 tests/items/axes/axe_no_effect_on_stripped_or_stone.json create mode 100644 tests/items/axes/axe_scrape_copper_one_step.json create mode 100644 tests/items/axes/axe_scrape_golem_statue.json create mode 100644 tests/items/axes/axe_scrape_keeps_stair_properties.json create mode 100644 tests/items/axes/axe_strip_log_axes.json create mode 100644 tests/items/axes/axe_strip_log_from_below.json create mode 100644 tests/items/axes/axe_strip_wood_and_stems.json create mode 100644 tests/items/axes/axe_wax_off_before_scrape.json create mode 100644 tests/items/axes/axe_wax_off_golem_statue.json create mode 100644 tests/items/axes/axe_wax_off_keeps_bulb_state.json create mode 100644 tests/items/axes/wooden_axe_furnace_fuel.json diff --git a/tests/items/axes/axe_blocked_by_offhand_shield.json b/tests/items/axes/axe_blocked_by_offhand_shield.json new file mode 100644 index 0000000..c1e9438 --- /dev/null +++ b/tests/items/axes/axe_blocked_by_offhand_shield.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_blocked_by_offhand_shield", + "description": "While a shield is in the off hand, an axe in the main hand does not strip a log (AxeItem.playerHasBlockingItemUseIntent returns PASS); after the shield is removed the same use strips it.", + "tags": ["item", "axe", "interaction", "player", "strip", "shield", "edge-case"], + "minecraftIds": ["minecraft:golden_axe", "minecraft:shield", "minecraft:oak_log", "minecraft:stripped_oak_log"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + }, + "player": { + "inventory": { + "hotbar1" : {"id": "minecraft:golden_axe", "count": 1}, + "off_hand": {"id": "minecraft:shield" , "count": 1} + }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:oak_log" , "axis": "y"} }, + { "is": {"id": "minecraft:golden_axe" }, "slot": "hotbar1" } + ] + }, + {"at": 2, "do": "set_slot", "slot": "off_hand"}, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stripped_oak_log", "axis": "y"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/axe_breaks_after_durability_uses.json b/tests/items/axes/axe_breaks_after_durability_uses.json new file mode 100644 index 0000000..dae690a --- /dev/null +++ b/tests/items/axes/axe_breaks_after_durability_uses.json @@ -0,0 +1,104 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_breaks_after_durability_uses", + "description": "In survival, a golden axe (durability 32) survives 31 strips and breaks on the 32nd, leaving the slot empty (each successful use calls hurtAndBreak(1)). The player stands on a stone block so the server does not kick the bot for floating.", + "tags": ["item", "axe", "interaction", "player", "durability", "strip", "survival"], + "minecraftIds": ["minecraft:golden_axe", "minecraft:oak_log", "minecraft:stripped_oak_log", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [2, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [2.5, 1, 0.5], "rot": [-90, 0] }, + { "at": 0, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 9, "do": "interact"}, + { "at": 10, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 11, "do": "interact"}, + { "at": 12, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 13, "do": "interact"}, + { "at": 14, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 15, "do": "interact"}, + { "at": 16, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 17, "do": "interact"}, + { "at": 18, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 19, "do": "interact"}, + { "at": 20, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 21, "do": "interact"}, + { "at": 22, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 23, "do": "interact"}, + { "at": 24, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 25, "do": "interact"}, + { "at": 26, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 27, "do": "interact"}, + { "at": 28, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 29, "do": "interact"}, + { "at": 30, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 31, "do": "interact"}, + { "at": 32, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 33, "do": "interact"}, + { "at": 34, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 35, "do": "interact"}, + { "at": 36, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 37, "do": "interact"}, + { "at": 38, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 39, "do": "interact"}, + { "at": 40, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 41, "do": "interact"}, + { "at": 42, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 43, "do": "interact"}, + { "at": 44, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 45, "do": "interact"}, + { "at": 46, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 47, "do": "interact"}, + { "at": 48, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 49, "do": "interact"}, + { "at": 50, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 51, "do": "interact"}, + { "at": 52, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 53, "do": "interact"}, + { "at": 54, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 55, "do": "interact"}, + { "at": 56, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 57, "do": "interact"}, + { "at": 58, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 59, "do": "interact"}, + { "at": 60, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 61, "do": "interact"}, + { + "at": 62, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:golden_axe"} } + ] + }, + { "at": 62, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 63, "do": "interact"}, + { + "at": 64, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": "empty" }, + { "is": {"id": "minecraft:stripped_oak_log", "axis": "y"}, "pos": [3, 2, 0] } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/axe_creative_takes_no_damage.json b/tests/items/axes/axe_creative_takes_no_damage.json new file mode 100644 index 0000000..fcff2b2 --- /dev/null +++ b/tests/items/axes/axe_creative_takes_no_damage.json @@ -0,0 +1,98 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_creative_takes_no_damage", + "description": "In creative mode an axe takes no durability damage: a golden axe is still in the slot after 33 strips, one more than it survives in survival (ItemStack.hurtAndBreak is skipped for infinite materials).", + "tags": ["item", "axe", "interaction", "player", "durability", "strip", "creative"], + "minecraftIds": ["minecraft:golden_axe", "minecraft:oak_log", "minecraft:stripped_oak_log"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 9, "do": "interact"}, + { "at": 10, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 11, "do": "interact"}, + { "at": 12, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 13, "do": "interact"}, + { "at": 14, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 15, "do": "interact"}, + { "at": 16, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 17, "do": "interact"}, + { "at": 18, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 19, "do": "interact"}, + { "at": 20, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 21, "do": "interact"}, + { "at": 22, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 23, "do": "interact"}, + { "at": 24, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 25, "do": "interact"}, + { "at": 26, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 27, "do": "interact"}, + { "at": 28, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 29, "do": "interact"}, + { "at": 30, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 31, "do": "interact"}, + { "at": 32, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 33, "do": "interact"}, + { "at": 34, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 35, "do": "interact"}, + { "at": 36, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 37, "do": "interact"}, + { "at": 38, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 39, "do": "interact"}, + { "at": 40, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 41, "do": "interact"}, + { "at": 42, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 43, "do": "interact"}, + { "at": 44, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 45, "do": "interact"}, + { "at": 46, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 47, "do": "interact"}, + { "at": 48, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 49, "do": "interact"}, + { "at": 50, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 51, "do": "interact"}, + { "at": 52, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 53, "do": "interact"}, + { "at": 54, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 55, "do": "interact"}, + { "at": 56, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 57, "do": "interact"}, + { "at": 58, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 59, "do": "interact"}, + { "at": 60, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 61, "do": "interact"}, + { "at": 62, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 63, "do": "interact"}, + { "at": 64, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + {"at": 65, "do": "interact"}, + { + "at": 66, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:golden_axe" } }, + { "is": {"id": "minecraft:stripped_oak_log", "axis": "y"}, "pos": [0, 0, 0] } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/axe_frees_copper_golem_from_statue.json b/tests/items/axes/axe_frees_copper_golem_from_statue.json new file mode 100644 index 0000000..827ee73 --- /dev/null +++ b/tests/items/axes/axe_frees_copper_golem_from_statue.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_frees_copper_golem_from_statue", + "description": "Using an axe on an unaffected copper golem statue removes the block and spawns a copper golem (CopperGolemStatueBlock / WeatheringCopperGolemStatueBlock.useItemOn).", + "tags": ["item", "axe", "interaction", "player", "copper", "statue"], + "minecraftIds": ["minecraft:golden_axe", "minecraft:copper_golem_statue"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:copper_golem_statue", + "facing": "north", + "copper_golem_pose": "standing", + "waterlogged": false + } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:copper_golem", "exists": true, "count": 1}, + { "slot": "hotbar1", "is": {"id": "minecraft:golden_axe"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/axe_ignores_unaged_copper.json b/tests/items/axes/axe_ignores_unaged_copper.json new file mode 100644 index 0000000..0b2b51f --- /dev/null +++ b/tests/items/axes/axe_ignores_unaged_copper.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_ignores_unaged_copper", + "description": "An axe used on an unaffected, unwaxed copper block does nothing (no previous weathering state and not in the wax-off map), while an oxidized block next to it is scraped (reachability control).", + "tags": ["item", "axe", "interaction", "player", "scrape", "copper", "edge-case"], + "minecraftIds": [ + "minecraft:golden_axe" , "minecraft:copper_block" , "minecraft:oxidized_copper" , + "minecraft:weathered_copper" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 0, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:copper_block" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:oxidized_copper"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:copper_block" } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:weathered_copper"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/axe_no_effect_on_stripped_or_stone.json b/tests/items/axes/axe_no_effect_on_stripped_or_stone.json new file mode 100644 index 0000000..b0a1d36 --- /dev/null +++ b/tests/items/axes/axe_no_effect_on_stripped_or_stone.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_no_effect_on_stripped_or_stone", + "description": "An axe used on an already stripped log or on stone changes nothing, while the same axe strips an ordinary log next to them (reachability control).", + "tags": ["item", "axe", "interaction", "player", "strip", "edge-case"], + "minecraftIds": ["minecraft:golden_axe", "minecraft:stripped_oak_log", "minecraft:stone", "minecraft:oak_log"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 0, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stripped_oak_log", "axis": "y"} }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:oak_log" , "axis": "y"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stripped_oak_log", "axis": "y"} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 0], "is": {"id": "minecraft:stripped_oak_log", "axis": "y"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/axe_scrape_copper_one_step.json b/tests/items/axes/axe_scrape_copper_one_step.json new file mode 100644 index 0000000..a623b77 --- /dev/null +++ b/tests/items/axes/axe_scrape_copper_one_step.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_scrape_copper_one_step", + "description": "Each use of an axe on a copper block removes exactly one oxidation level (WeatheringCopper.getPrevious): oxidized, weathered, exposed, then unaffected, and a further use changes nothing.", + "tags": ["item", "axe", "interaction", "player", "scrape", "copper"], + "minecraftIds": [ + "minecraft:golden_axe" , "minecraft:oxidized_copper" , "minecraft:weathered_copper", + "minecraft:exposed_copper" , "minecraft:copper_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oxidized_copper"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:weathered_copper"} } + ] + }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:exposed_copper"} } + ] + }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:copper_block"} } + ] + }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:copper_block"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/axe_scrape_golem_statue.json b/tests/items/axes/axe_scrape_golem_statue.json new file mode 100644 index 0000000..a8a82e6 --- /dev/null +++ b/tests/items/axes/axe_scrape_golem_statue.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_scrape_golem_statue", + "description": "Using an axe on an oxidized copper golem statue does not free the golem (only unaffected statues do) and instead scrapes it to a weathered statue, keeping facing and pose.", + "tags": ["item", "axe", "interaction", "player", "copper", "statue", "scrape"], + "minecraftIds": [ + "minecraft:golden_axe" , + "minecraft:oxidized_copper_golem_statue" , + "minecraft:weathered_copper_golem_statue" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:oxidized_copper_golem_statue", + "facing": "north", + "copper_golem_pose": "sitting", + "waterlogged": false + } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:weathered_copper_golem_statue", + "facing" : "north" , + "copper_golem_pose": "sitting" + } + }, + {"is": "minecraft:copper_golem", "exists": false} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/axe_scrape_keeps_stair_properties.json b/tests/items/axes/axe_scrape_keeps_stair_properties.json new file mode 100644 index 0000000..4fc247a --- /dev/null +++ b/tests/items/axes/axe_scrape_keeps_stair_properties.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_scrape_keeps_stair_properties", + "description": "Scraping an exposed cut copper stair gives a cut copper stair that keeps facing, half, shape and waterlogged (BlockState.withPropertiesOf).", + "tags": ["item", "axe", "interaction", "player", "scrape", "copper", "block-state"], + "minecraftIds": ["minecraft:golden_axe", "minecraft:exposed_cut_copper_stairs", "minecraft:cut_copper_stairs"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:exposed_cut_copper_stairs", + "facing": "east", + "half": "top", + "shape": "straight", + "waterlogged": true + } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:cut_copper_stairs", + "facing": "east", + "half": "top", + "shape": "straight", + "waterlogged": true + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/axe_strip_log_axes.json b/tests/items/axes/axe_strip_log_axes.json new file mode 100644 index 0000000..4b67d2d --- /dev/null +++ b/tests/items/axes/axe_strip_log_axes.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_strip_log_axes", + "description": "Using an axe on oak logs with axis x, y and z turns each into the stripped oak log with the same axis (AxeItem.getStripped copies RotatedPillarBlock.AXIS).", + "tags": ["item", "axe", "interaction", "player", "strip", "block-state"], + "minecraftIds": ["minecraft:golden_axe", "minecraft:oak_log", "minecraft:stripped_oak_log"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 0, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "x"} }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:oak_log", "axis": "z"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stripped_oak_log", "axis": "x"} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:stripped_oak_log", "axis": "y"} }, + { "pos": [4, 0, 0], "is": {"id": "minecraft:stripped_oak_log", "axis": "z"} }, + { "is": {"id": "minecraft:golden_axe" }, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/axe_strip_log_from_below.json b/tests/items/axes/axe_strip_log_from_below.json new file mode 100644 index 0000000..f236974 --- /dev/null +++ b/tests/items/axes/axe_strip_log_from_below.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_strip_log_from_below", + "description": "An axe used on the bottom face of a floating oak log still strips it, because AxeItem.useOn does not look at the clicked face (unlike ShovelItem).", + "tags": ["item", "axe", "interaction", "player", "strip", "edge-case"], + "minecraftIds": ["minecraft:golden_axe", "minecraft:oak_log", "minecraft:stripped_oak_log"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, -1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:stripped_oak_log", "axis": "y"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/axe_strip_wood_and_stems.json b/tests/items/axes/axe_strip_wood_and_stems.json new file mode 100644 index 0000000..4c4509f --- /dev/null +++ b/tests/items/axes/axe_strip_wood_and_stems.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_strip_wood_and_stems", + "description": "Using an axe strips oak wood, crimson stems, warped hyphae and bamboo blocks into their stripped variants (the STRIPPABLES map in AxeItem).", + "tags": ["item", "axe", "interaction", "player", "strip"], + "minecraftIds": [ + "minecraft:golden_axe" , "minecraft:oak_wood" , "minecraft:crimson_stem" , "minecraft:warped_hyphae", + "minecraft:bamboo_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [6, 0, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:oak_wood" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:crimson_stem" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:warped_hyphae"} }, + { "pos": [6, 0, 0], "block": {"id": "minecraft:bamboo_block" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, 0.5], "rot": [0, 90] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stripped_oak_wood" , "axis": "y"} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:stripped_crimson_stem" , "axis": "y"} }, + { "pos": [4, 0, 0], "is": {"id": "minecraft:stripped_warped_hyphae", "axis": "y"} }, + { "pos": [6, 0, 0], "is": {"id": "minecraft:stripped_bamboo_block" , "axis": "y"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/axe_wax_off_before_scrape.json b/tests/items/axes/axe_wax_off_before_scrape.json new file mode 100644 index 0000000..4356e07 --- /dev/null +++ b/tests/items/axes/axe_wax_off_before_scrape.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_wax_off_before_scrape", + "description": "Using an axe on waxed weathered copper only removes the wax: the first use gives weathered copper, and only a second use scrapes it to exposed copper (waxed blocks have no previous weathering state, so the wax-off branch runs).", + "tags": ["item", "axe", "interaction", "player", "wax-off", "copper"], + "minecraftIds": [ + "minecraft:golden_axe" , "minecraft:waxed_weathered_copper", "minecraft:weathered_copper" , + "minecraft:exposed_copper" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:waxed_weathered_copper"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:weathered_copper"} } + ] + }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:exposed_copper"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/axe_wax_off_golem_statue.json b/tests/items/axes/axe_wax_off_golem_statue.json new file mode 100644 index 0000000..0110b74 --- /dev/null +++ b/tests/items/axes/axe_wax_off_golem_statue.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_wax_off_golem_statue", + "description": "Using an axe on a waxed copper golem statue removes the wax (the waxed statue passes axes through to AxeItem) instead of freeing the golem, keeping facing and pose.", + "tags": ["item", "axe", "interaction", "player", "copper", "statue", "wax-off"], + "minecraftIds": ["minecraft:golden_axe", "minecraft:waxed_copper_golem_statue", "minecraft:copper_golem_statue"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:waxed_copper_golem_statue", + "facing": "north", + "copper_golem_pose": "star", + "waterlogged": false + } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": {"id": "minecraft:copper_golem_statue", "facing": "north", "copper_golem_pose": "star"} + }, + {"is": "minecraft:copper_golem", "exists": false} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/axe_wax_off_keeps_bulb_state.json b/tests/items/axes/axe_wax_off_keeps_bulb_state.json new file mode 100644 index 0000000..e85f973 --- /dev/null +++ b/tests/items/axes/axe_wax_off_keeps_bulb_state.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "axe_wax_off_keeps_bulb_state", + "description": "Removing wax from a lit waxed copper bulb keeps its lit and powered values (Block.withPropertiesOf).", + "tags": ["item", "axe", "interaction", "player", "wax-off", "copper", "block-state"], + "minecraftIds": ["minecraft:golden_axe", "minecraft:waxed_copper_bulb", "minecraft:copper_bulb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": false} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:copper_bulb", "lit": true, "powered": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/axes/wooden_axe_furnace_fuel.json b/tests/items/axes/wooden_axe_furnace_fuel.json new file mode 100644 index 0000000..3180b7c --- /dev/null +++ b/tests/items/axes/wooden_axe_furnace_fuel.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "wooden_axe_furnace_fuel", + "description": "A wooden axe in a furnace fuel slot is consumed and lights the furnace for 200 ticks (FuelValues lists WOODEN_AXE at the base unit).", + "tags": ["axe", "fuel", "furnace", "block-entity"], + "minecraftIds": ["minecraft:wooden_axe", "minecraft:furnace", "minecraft:raw_iron"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:wooden_axe\"}]" + } + } + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "true", + "nbt": {"lit_total_time": "200s", "Items[0].id": "\"minecraft:raw_iron\""} + } + } + ] + } + ], + "breakpoints": [] +} + From cfe09a04c7ee9d904bf68ec0458d485632161770 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 26 Oct 2026 04:55:44 +0100 Subject: [PATCH 18/85] Add Flint tests for bars (9 blocks) --- ...sed_copper_bars_axe_blocked_by_shield.json | 85 ++++++++++++++ .../bars/exposed_copper_bars_axe_scrapes.json | 78 +++++++++++++ ...osed_copper_bars_connect_to_iron_bars.json | 56 ++++++++++ .../exposed_copper_bars_honeycomb_waxes.json | 78 +++++++++++++ .../exposed_copper_bars_oxidize_randomly.json | 74 ++++++++++++ .../iron_bars_attach_to_sturdy_faces.json | 73 ++++++++++++ .../bars/iron_bars_connection_exceptions.json | 48 ++++++++ .../iron_bars_ignore_axe_and_honeycomb.json | 73 ++++++++++++ .../iron_bars_ignore_vertical_neighbors.json | 64 +++++++++++ .../bars/iron_bars_pushed_by_piston.json | 71 ++++++++++++ ...rs_side_reverts_when_neighbor_removed.json | 62 +++++++++++ .../bars/iron_bars_survival_placement.json | 52 +++++++++ .../bars/iron_bars_waterlogged_flow.json | 36 ++++++ .../iron_bars_waterlogged_on_placement.json | 51 +++++++++ ...sed_copper_bars_axe_blocked_by_shield.json | 79 +++++++++++++ ...d_exposed_copper_bars_axe_removes_wax.json | 70 ++++++++++++ ..._exposed_copper_bars_ignore_honeycomb.json | 53 +++++++++ ...xed_exposed_copper_bars_never_oxidize.json | 105 ++++++++++++++++++ 18 files changed, 1208 insertions(+) create mode 100644 tests/connectible/bars/exposed_copper_bars_axe_blocked_by_shield.json create mode 100644 tests/connectible/bars/exposed_copper_bars_axe_scrapes.json create mode 100644 tests/connectible/bars/exposed_copper_bars_connect_to_iron_bars.json create mode 100644 tests/connectible/bars/exposed_copper_bars_honeycomb_waxes.json create mode 100644 tests/connectible/bars/exposed_copper_bars_oxidize_randomly.json create mode 100644 tests/connectible/bars/iron_bars_attach_to_sturdy_faces.json create mode 100644 tests/connectible/bars/iron_bars_connection_exceptions.json create mode 100644 tests/connectible/bars/iron_bars_ignore_axe_and_honeycomb.json create mode 100644 tests/connectible/bars/iron_bars_ignore_vertical_neighbors.json create mode 100644 tests/connectible/bars/iron_bars_pushed_by_piston.json create mode 100644 tests/connectible/bars/iron_bars_side_reverts_when_neighbor_removed.json create mode 100644 tests/connectible/bars/iron_bars_survival_placement.json create mode 100644 tests/connectible/bars/iron_bars_waterlogged_flow.json create mode 100644 tests/connectible/bars/iron_bars_waterlogged_on_placement.json create mode 100644 tests/connectible/bars/waxed_exposed_copper_bars_axe_blocked_by_shield.json create mode 100644 tests/connectible/bars/waxed_exposed_copper_bars_axe_removes_wax.json create mode 100644 tests/connectible/bars/waxed_exposed_copper_bars_ignore_honeycomb.json create mode 100644 tests/connectible/bars/waxed_exposed_copper_bars_never_oxidize.json diff --git a/tests/connectible/bars/exposed_copper_bars_axe_blocked_by_shield.json b/tests/connectible/bars/exposed_copper_bars_axe_blocked_by_shield.json new file mode 100644 index 0000000..83d32c6 --- /dev/null +++ b/tests/connectible/bars/exposed_copper_bars_axe_blocked_by_shield.json @@ -0,0 +1,85 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "exposed_copper_bars_axe_blocked_by_shield", + "description": "With a shield in the off hand an axe use is passed and exposed copper bars are not scraped; once the shield is removed the same axe use scrapes them. Random ticks are disabled so the unwaxed bars cannot oxidize mid-test.", + "tags": ["connectible", "bars", "copper-bars", "axe", "scrape", "shield", "player"], + "minecraftIds": [ + "minecraft:exposed_copper_bars", "minecraft:copper_bars" , "minecraft:iron_axe" , + "minecraft:shield" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [2, 4, 2] ] + }, + "player": { + "inventory": { + "hotbar1" : {"id": "minecraft:iron_axe", "count": 1}, + "off_hand": {"id": "minecraft:shield" , "count": 1} + }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:exposed_copper_bars"} }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [-1, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 2, 1], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:exposed_copper_bars", + "north" : "false" , + "south" : "true" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + } + ] + }, + {"at": 5, "do": "set_slot", "slot": "off_hand"}, + {"at": 6, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:copper_bars", + "north" : "false" , + "south" : "true" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/exposed_copper_bars_axe_scrapes.json b/tests/connectible/bars/exposed_copper_bars_axe_scrapes.json new file mode 100644 index 0000000..a5c3253 --- /dev/null +++ b/tests/connectible/bars/exposed_copper_bars_axe_scrapes.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "exposed_copper_bars_axe_scrapes", + "description": "Using an axe on exposed copper bars scrapes them back to copper bars, keeping their connection and waterlogged properties. Random ticks are disabled so the unwaxed bars cannot oxidize mid-test.", + "tags": ["connectible", "bars", "copper-bars", "axe", "scrape", "player"], + "minecraftIds": ["minecraft:exposed_copper_bars", "minecraft:copper_bars", "minecraft:iron_axe"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:exposed_copper_bars"} }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [-1, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 2, 1], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:exposed_copper_bars", + "north" : "false" , + "south" : "true" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + } + ] + }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:copper_bars", + "north" : "false" , + "south" : "true" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:iron_axe", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/exposed_copper_bars_connect_to_iron_bars.json b/tests/connectible/bars/exposed_copper_bars_connect_to_iron_bars.json new file mode 100644 index 0000000..32753b9 --- /dev/null +++ b/tests/connectible/bars/exposed_copper_bars_connect_to_iron_bars.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "exposed_copper_bars_connect_to_iron_bars", + "description": "Exposed copper bars connect to an adjacent iron bars block and vice versa (any bars block counts as an attachment target), and not to the empty sides. Random ticks are disabled so the unwaxed bars cannot oxidize mid-test.", + "tags": ["connectible", "bars", "copper-bars", "iron-bars", "block-state", "neighbor-update"], + "minecraftIds": ["minecraft:exposed_copper_bars", "minecraft:iron_bars"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [2, 2, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:exposed_copper_bars"} }, + { "at": 1, "do": "place", "pos": [-1, 0, 0], "block": {"id": "minecraft:iron_bars"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:exposed_copper_bars", + "north" : "false" , + "south" : "false" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + }, + { + "pos": [-1, 0, 0], + "is": { + "id" : "minecraft:iron_bars", + "north" : "false" , + "south" : "false" , + "east" : "true" , + "west" : "false" , + "waterlogged": "false" + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/exposed_copper_bars_honeycomb_waxes.json b/tests/connectible/bars/exposed_copper_bars_honeycomb_waxes.json new file mode 100644 index 0000000..b02d998 --- /dev/null +++ b/tests/connectible/bars/exposed_copper_bars_honeycomb_waxes.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "exposed_copper_bars_honeycomb_waxes", + "description": "Using honeycomb on exposed copper bars turns them into waxed exposed copper bars with the same properties and consumes one honeycomb. Random ticks are disabled so the unwaxed bars cannot oxidize mid-test.", + "tags": ["connectible", "bars", "copper-bars", "honeycomb", "waxed", "player"], + "minecraftIds": ["minecraft:exposed_copper_bars", "minecraft:waxed_exposed_copper_bars", "minecraft:honeycomb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:exposed_copper_bars"} }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [-1, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 2, 1], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:exposed_copper_bars", + "north" : "false" , + "south" : "true" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + } + ] + }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:waxed_exposed_copper_bars", + "north" : "false" , + "south" : "true" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:air", "count": 0} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/exposed_copper_bars_oxidize_randomly.json b/tests/connectible/bars/exposed_copper_bars_oxidize_randomly.json new file mode 100644 index 0000000..01ad2a9 --- /dev/null +++ b/tests/connectible/bars/exposed_copper_bars_oxidize_randomly.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "exposed_copper_bars_oxidize_randomly", + "description": "With a high random tick speed, a lone exposed copper bars block oxidizes to weathered or oxidized copper bars and keeps its connection properties.", + "tags": ["connectible", "bars", "copper-bars", "oxidation", "random-tick"], + "minecraftIds": [ + "minecraft:exposed_copper_bars" , "minecraft:weathered_copper_bars", "minecraft:oxidized_copper_bars" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [2, 2, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:exposed_copper_bars"} }, + { "at": 1, "do": "place", "pos": [-1, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:exposed_copper_bars", + "north" : "false" , + "south" : "false" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + } + ] + }, + { + "at": 150, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": [ + { + "id" : "minecraft:weathered_copper_bars", + "north" : "false" , + "south" : "false" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + }, + { + "id" : "minecraft:oxidized_copper_bars", + "north" : "false" , + "south" : "false" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/iron_bars_attach_to_sturdy_faces.json b/tests/connectible/bars/iron_bars_attach_to_sturdy_faces.json new file mode 100644 index 0000000..f983230 --- /dev/null +++ b/tests/connectible/bars/iron_bars_attach_to_sturdy_faces.json @@ -0,0 +1,73 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "iron_bars_attach_to_sturdy_faces", + "description": "Iron bars connect to a neighbour only when its face toward the bars is fully sturdy: a stair's back connects, its stepped front and a bottom slab's side do not.", + "tags": ["connectible", "bars", "iron-bars", "block-state", "neighbor-update"], + "minecraftIds": ["minecraft:iron_bars", "minecraft:oak_stairs", "minecraft:oak_slab"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -2], [2, 1, 2] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:iron_bars"} }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { + "pos": [-1, 0, 0], + "block": { + "id" : "minecraft:oak_stairs", + "facing" : "east" , + "half" : "bottom" , + "shape" : "straight" , + "waterlogged": "false" + } + }, + { + "pos": [0, 0, -1], + "block": { + "id" : "minecraft:oak_stairs", + "facing" : "south" , + "half" : "bottom" , + "shape" : "straight" , + "waterlogged": "false" + } + }, + { + "pos": [0, 0, 1], + "block": { + "id" : "minecraft:oak_stairs", + "facing" : "south" , + "half" : "bottom" , + "shape" : "straight" , + "waterlogged": "false" + } + }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:oak_slab", "type": "bottom", "waterlogged": "false"} } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:iron_bars", + "north" : "true" , + "south" : "false" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/iron_bars_connection_exceptions.json b/tests/connectible/bars/iron_bars_connection_exceptions.json new file mode 100644 index 0000000..27423c1 --- /dev/null +++ b/tests/connectible/bars/iron_bars_connection_exceptions.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "iron_bars_connection_exceptions", + "description": "Pumpkin, carved pumpkin and jack o'lantern are connection exceptions (Block.isExceptionForConnection): iron bars do not connect to them, but still connect to stone.", + "tags": ["connectible", "bars", "iron-bars", "block-state", "neighbor-update"], + "minecraftIds": [ + "minecraft:iron_bars" , "minecraft:pumpkin" , "minecraft:carved_pumpkin", "minecraft:jack_o_lantern" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -2], [2, 1, 2] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:iron_bars"} }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [-1, 0, 0], "block": {"id": "minecraft:pumpkin" } }, + { "pos": [ 0, 0, -1], "block": {"id": "minecraft:carved_pumpkin", "facing": "north"} }, + { "pos": [ 1, 0, 0], "block": {"id": "minecraft:jack_o_lantern", "facing": "north"} }, + { "pos": [ 0, 0, 1], "block": {"id": "minecraft:stone" } } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:iron_bars", + "north" : "false" , + "south" : "true" , + "east" : "false" , + "west" : "false" , + "waterlogged": "false" + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/iron_bars_ignore_axe_and_honeycomb.json b/tests/connectible/bars/iron_bars_ignore_axe_and_honeycomb.json new file mode 100644 index 0000000..29730c4 --- /dev/null +++ b/tests/connectible/bars/iron_bars_ignore_axe_and_honeycomb.json @@ -0,0 +1,73 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "iron_bars_ignore_axe_and_honeycomb", + "description": "Iron bars are not in any copper map: an axe does not scrape or unwax them and honeycomb does not wax them, and the honeycomb is not consumed.", + "tags": ["connectible", "bars", "iron-bars", "axe", "honeycomb", "player"], + "minecraftIds": ["minecraft:iron_bars", "minecraft:iron_axe", "minecraft:honeycomb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { + "hotbar1": {"id": "minecraft:iron_axe" , "count": 1}, + "hotbar2": {"id": "minecraft:honeycomb", "count": 1} + }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:iron_bars"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:iron_bars", + "north" : "false" , + "south" : "false" , + "east" : "false" , + "west" : "false" , + "waterlogged": "false" + } + } + ] + }, + {"at": 3, "do": "select_hotbar", "slot": 2}, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:iron_bars", + "north" : "false" , + "south" : "false" , + "east" : "false" , + "west" : "false" , + "waterlogged": "false" + } + }, + { "slot": "hotbar2", "is": {"id": "minecraft:honeycomb", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/iron_bars_ignore_vertical_neighbors.json b/tests/connectible/bars/iron_bars_ignore_vertical_neighbors.json new file mode 100644 index 0000000..cb6a38e --- /dev/null +++ b/tests/connectible/bars/iron_bars_ignore_vertical_neighbors.json @@ -0,0 +1,64 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "iron_bars_ignore_vertical_neighbors", + "description": "Placing and removing solid blocks above and below connected iron bars never changes the bars' connection properties.", + "tags": ["connectible", "bars", "iron-bars", "block-state", "neighbor-update"], + "minecraftIds": ["minecraft:iron_bars"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -2], [2, 2, 2] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:iron_bars"} }, + { "at": 1, "do": "place", "pos": [-1, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 2, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:iron_bars", + "north" : "false" , + "south" : "false" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + } + ] + }, + { "at": 4, "do": "remove", "pos": [0, 1, 0] }, + { "at": 4, "do": "remove", "pos": [0, -1, 0] }, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:iron_bars", + "north" : "false" , + "south" : "false" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/iron_bars_pushed_by_piston.json b/tests/connectible/bars/iron_bars_pushed_by_piston.json new file mode 100644 index 0000000..7991ff0 --- /dev/null +++ b/tests/connectible/bars/iron_bars_pushed_by_piston.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "iron_bars_pushed_by_piston", + "description": "A piston pushes iron bars one block; after the move the bars recompute their connections against the new neighbours (stone ahead, piston head behind).", + "tags": ["connectible", "bars", "iron-bars", "piston", "push-reaction", "redstone"], + "minecraftIds": ["minecraft:iron_bars", "minecraft:piston"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [3, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-1, 1, 0], "block": {"id": "minecraft:piston" , "facing": "east", "extended": "false"} }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:iron_bars" } }, + { "pos": [ 2, 1, 0], "block": {"id": "minecraft:stone" } } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id" : "minecraft:iron_bars", + "north" : "false" , + "south" : "false" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } + ] + }, + { "at": 2, "do": "place", "pos": [-2, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [-1, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": "true"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east", "type": "normal"} }, + { + "pos": [1, 1, 0], + "is": { + "id" : "minecraft:iron_bars", + "north" : "false" , + "south" : "false" , + "east" : "true" , + "west" : "true" , + "waterlogged": "false" + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/iron_bars_side_reverts_when_neighbor_removed.json b/tests/connectible/bars/iron_bars_side_reverts_when_neighbor_removed.json new file mode 100644 index 0000000..fed39b8 --- /dev/null +++ b/tests/connectible/bars/iron_bars_side_reverts_when_neighbor_removed.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "iron_bars_side_reverts_when_neighbor_removed", + "description": "Removing a solid block beside connected iron bars sets only that side back to false (IronBarsBlock.updateShape); the opposite connection stays.", + "tags": ["connectible", "bars", "iron-bars", "block-state", "neighbor-update"], + "minecraftIds": ["minecraft:iron_bars"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -2], [2, 1, 2] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:iron_bars"} }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [-1, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 1, 0, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:iron_bars", + "north" : "false" , + "south" : "false" , + "east" : "true" , + "west" : "true" , + "waterlogged": "false" + } + } + ] + }, + { "at": 3, "do": "remove", "pos": [-1, 0, 0] }, + { + "at": 4, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:iron_bars", + "north" : "false" , + "south" : "false" , + "east" : "true" , + "west" : "false" , + "waterlogged": "false" + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/iron_bars_survival_placement.json b/tests/connectible/bars/iron_bars_survival_placement.json new file mode 100644 index 0000000..ab9046b --- /dev/null +++ b/tests/connectible/bars/iron_bars_survival_placement.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "iron_bars_survival_placement", + "description": "A survival player placing iron bars between a stone block (west) and a glass pane (east) gets bars connected east and west only, and the item is consumed.", + "tags": ["connectible", "bars", "iron-bars", "placement", "player"], + "minecraftIds": ["minecraft:iron_bars"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [2, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_bars", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 2, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 2, 0], "block": {"id": "minecraft:glass_pane"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:iron_bars", + "north" : "false" , + "south" : "false" , + "east" : "true" , + "west" : "true" , + "waterlogged": "false" + } + }, + { "is": {"id": "minecraft:air", "count": 0}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/iron_bars_waterlogged_flow.json b/tests/connectible/bars/iron_bars_waterlogged_flow.json new file mode 100644 index 0000000..5c3f691 --- /dev/null +++ b/tests/connectible/bars/iron_bars_waterlogged_flow.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "iron_bars_waterlogged_flow", + "description": "Waterlogged iron bars act as a water source: water spreads sideways from them onto a floor wide enough that no drop within 4 blocks biases the direction.", + "tags": ["connectible", "bars", "iron-bars", "waterlogged", "fluid"], + "minecraftIds": ["minecraft:iron_bars", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-5, 0, -5], [5, 2, 5] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-5, 0, -5], [5, 0, 5] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:iron_bars", "waterlogged": "true"} }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:iron_bars", "waterlogged": "true"} }, + { "pos": [ 1, 1, 0], "is": {"id": "minecraft:water" } }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:water" } }, + { "pos": [ 0, 1, 1], "is": {"id": "minecraft:water" } }, + { "pos": [ 0, 1, -1], "is": {"id": "minecraft:water" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/iron_bars_waterlogged_on_placement.json b/tests/connectible/bars/iron_bars_waterlogged_on_placement.json new file mode 100644 index 0000000..a139350 --- /dev/null +++ b/tests/connectible/bars/iron_bars_waterlogged_on_placement.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "iron_bars_waterlogged_on_placement", + "description": "A player placing iron bars into a water source block gets waterlogged iron bars.", + "tags": ["connectible", "bars", "iron-bars", "waterlogged", "placement", "player"], + "minecraftIds": ["minecraft:iron_bars", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_bars", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:water", "level": 0} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:iron_bars", + "north" : "false" , + "south" : "false" , + "east" : "false" , + "west" : "false" , + "waterlogged": "true" + } + }, + { "is": {"id": "minecraft:air", "count": 0}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/waxed_exposed_copper_bars_axe_blocked_by_shield.json b/tests/connectible/bars/waxed_exposed_copper_bars_axe_blocked_by_shield.json new file mode 100644 index 0000000..fef70ae --- /dev/null +++ b/tests/connectible/bars/waxed_exposed_copper_bars_axe_blocked_by_shield.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "waxed_exposed_copper_bars_axe_blocked_by_shield", + "description": "With a shield in the off hand an axe use is passed (AxeItem.playerHasBlockingItemUseIntent) and waxed exposed copper bars stay waxed; once the shield is removed the same axe use removes the wax.", + "tags": ["connectible", "bars", "copper-bars", "waxed", "axe", "shield", "player"], + "minecraftIds": [ + "minecraft:waxed_exposed_copper_bars", + "minecraft:exposed_copper_bars" , + "minecraft:iron_axe" , + "minecraft:shield" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [2, 4, 2] ] + }, + "player": { + "inventory": { + "hotbar1" : {"id": "minecraft:iron_axe", "count": 1}, + "off_hand": {"id": "minecraft:shield" , "count": 1} + }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:waxed_exposed_copper_bars"} }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [-1, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 2, 1], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:waxed_exposed_copper_bars", + "north" : "false" , + "south" : "true" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + } + ] + }, + {"at": 5, "do": "set_slot", "slot": "off_hand"}, + {"at": 6, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:exposed_copper_bars", + "north" : "false" , + "south" : "true" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/waxed_exposed_copper_bars_axe_removes_wax.json b/tests/connectible/bars/waxed_exposed_copper_bars_axe_removes_wax.json new file mode 100644 index 0000000..db0fb30 --- /dev/null +++ b/tests/connectible/bars/waxed_exposed_copper_bars_axe_removes_wax.json @@ -0,0 +1,70 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "waxed_exposed_copper_bars_axe_removes_wax", + "description": "Using an axe on waxed exposed copper bars removes the wax: they become exposed copper bars and keep their connection and waterlogged properties.", + "tags": ["connectible", "bars", "copper-bars", "waxed", "axe", "player"], + "minecraftIds": ["minecraft:waxed_exposed_copper_bars", "minecraft:exposed_copper_bars", "minecraft:iron_axe"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:waxed_exposed_copper_bars"} }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [-1, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 2, 1], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:waxed_exposed_copper_bars", + "north" : "false" , + "south" : "true" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + } + ] + }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:exposed_copper_bars", + "north" : "false" , + "south" : "true" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:iron_axe", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/waxed_exposed_copper_bars_ignore_honeycomb.json b/tests/connectible/bars/waxed_exposed_copper_bars_ignore_honeycomb.json new file mode 100644 index 0000000..94f3008 --- /dev/null +++ b/tests/connectible/bars/waxed_exposed_copper_bars_ignore_honeycomb.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "waxed_exposed_copper_bars_ignore_honeycomb", + "description": "Using honeycomb on already waxed exposed copper bars does nothing and the honeycomb is not consumed.", + "tags": ["connectible", "bars", "copper-bars", "waxed", "honeycomb", "player"], + "minecraftIds": ["minecraft:waxed_exposed_copper_bars", "minecraft:honeycomb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:waxed_exposed_copper_bars"} }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [-1, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 2, 1], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id" : "minecraft:waxed_exposed_copper_bars", + "north" : "false" , + "south" : "true" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/bars/waxed_exposed_copper_bars_never_oxidize.json b/tests/connectible/bars/waxed_exposed_copper_bars_never_oxidize.json new file mode 100644 index 0000000..b7c55b4 --- /dev/null +++ b/tests/connectible/bars/waxed_exposed_copper_bars_never_oxidize.json @@ -0,0 +1,105 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "waxed_exposed_copper_bars_never_oxidize", + "description": "With a high random tick speed, waxed exposed copper bars never change and do not hold back an adjacent unwaxed exposed copper bars, which oxidizes further.", + "tags": ["connectible", "bars", "copper-bars", "waxed", "oxidation", "random-tick"], + "minecraftIds": [ + "minecraft:waxed_exposed_copper_bars", + "minecraft:exposed_copper_bars" , + "minecraft:weathered_copper_bars" , + "minecraft:oxidized_copper_bars" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [2, 2, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:waxed_exposed_copper_bars"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:exposed_copper_bars" } } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:waxed_exposed_copper_bars", + "north" : "false" , + "south" : "false" , + "east" : "true" , + "west" : "false" , + "waterlogged": "false" + } + }, + { + "pos": [1, 0, 0], + "is": { + "id" : "minecraft:exposed_copper_bars", + "north" : "false" , + "south" : "false" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + } + ] + }, + { + "at": 150, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:waxed_exposed_copper_bars", + "north" : "false" , + "south" : "false" , + "east" : "true" , + "west" : "false" , + "waterlogged": "false" + } + }, + { + "pos": [1, 0, 0], + "is": [ + { + "id" : "minecraft:weathered_copper_bars", + "north" : "false" , + "south" : "false" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + }, + { + "id" : "minecraft:oxidized_copper_bars", + "north" : "false" , + "south" : "false" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" + } + ] + } + ] + } + ], + "breakpoints": [] +} + From 96d756addbc5d43cca5dfeeb86b8a2a90e9938bc Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 26 Oct 2026 05:28:31 +0100 Subject: [PATCH 19/85] Add Flint tests for bulb (8 blocks) --- .../copper_bulb_axe_no_effect.json | 45 ++++++++++++++ .../copper_bulb_honeycomb_waxes.json | 55 ++++++++++++++++ .../copper_bulb_oxidizes_over_time.json | 58 +++++++++++++++++ .../copper_bulb/exposed_bulb_axe_scrapes.json | 54 ++++++++++++++++ .../exposed_bulb_oxidizes_over_time.json | 56 +++++++++++++++++ .../oxidized_bulb_axe_scrapes.json | 44 +++++++++++++ .../oxidized_bulb_does_not_change.json | 51 +++++++++++++++ .../waxed_bulb_axe_removes_wax.json | 44 +++++++++++++ .../waxed_bulb_comparator_output.json | 62 +++++++++++++++++++ .../waxed_bulb_does_not_conduct_power.json | 35 +++++++++++ .../waxed_bulb_does_not_oxidize.json | 51 +++++++++++++++ .../waxed_bulb_empty_hand_interact.json | 31 ++++++++++ .../waxed_bulb_honeycomb_no_effect.json | 35 +++++++++++ .../waxed_bulb_item_placement.json | 35 +++++++++++ .../waxed_bulb_placed_state_recheck.json | 39 ++++++++++++ .../waxed_bulb_power_through_solid_block.json | 50 +++++++++++++++ .../copper_bulb/waxed_bulb_toggle.json | 50 +++++++++++++++ 17 files changed, 795 insertions(+) create mode 100644 tests/redstone/copper_bulb/copper_bulb_axe_no_effect.json create mode 100644 tests/redstone/copper_bulb/copper_bulb_honeycomb_waxes.json create mode 100644 tests/redstone/copper_bulb/copper_bulb_oxidizes_over_time.json create mode 100644 tests/redstone/copper_bulb/exposed_bulb_axe_scrapes.json create mode 100644 tests/redstone/copper_bulb/exposed_bulb_oxidizes_over_time.json create mode 100644 tests/redstone/copper_bulb/oxidized_bulb_axe_scrapes.json create mode 100644 tests/redstone/copper_bulb/oxidized_bulb_does_not_change.json create mode 100644 tests/redstone/copper_bulb/waxed_bulb_axe_removes_wax.json create mode 100644 tests/redstone/copper_bulb/waxed_bulb_comparator_output.json create mode 100644 tests/redstone/copper_bulb/waxed_bulb_does_not_conduct_power.json create mode 100644 tests/redstone/copper_bulb/waxed_bulb_does_not_oxidize.json create mode 100644 tests/redstone/copper_bulb/waxed_bulb_empty_hand_interact.json create mode 100644 tests/redstone/copper_bulb/waxed_bulb_honeycomb_no_effect.json create mode 100644 tests/redstone/copper_bulb/waxed_bulb_item_placement.json create mode 100644 tests/redstone/copper_bulb/waxed_bulb_placed_state_recheck.json create mode 100644 tests/redstone/copper_bulb/waxed_bulb_power_through_solid_block.json create mode 100644 tests/redstone/copper_bulb/waxed_bulb_toggle.json diff --git a/tests/redstone/copper_bulb/copper_bulb_axe_no_effect.json b/tests/redstone/copper_bulb/copper_bulb_axe_no_effect.json new file mode 100644 index 0000000..8f7a8e7 --- /dev/null +++ b/tests/redstone/copper_bulb/copper_bulb_axe_no_effect.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_bulb_axe_no_effect", + "description": "Using an axe on an unaffected copper bulb does nothing, since it is neither waxed nor weathered.", + "tags": ["copper-bulb", "axe", "interaction", "player"], + "minecraftIds": ["minecraft:copper_bulb", "minecraft:iron_axe"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 3, 3] ] + }, + "player": { + "selected_hotbar": 1, + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} } + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 2], "block": {"id": "minecraft:copper_bulb"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 2], "is": {"id": "minecraft:copper_bulb", "lit": false, "powered": false} }, + { "slot": "hotbar1", "is": {"id": "minecraft:iron_axe", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/copper_bulb_honeycomb_waxes.json b/tests/redstone/copper_bulb/copper_bulb_honeycomb_waxes.json new file mode 100644 index 0000000..f1b2e3a --- /dev/null +++ b/tests/redstone/copper_bulb/copper_bulb_honeycomb_waxes.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_bulb_honeycomb_waxes", + "description": "Using honeycomb on a lit, powered copper bulb turns it into a waxed copper bulb that keeps its lit and powered state and consumes one honeycomb.", + "tags": ["copper-bulb", "honeycomb", "wax-on", "interaction", "player"], + "minecraftIds": [ + "minecraft:copper_bulb" , "minecraft:waxed_copper_bulb", "minecraft:honeycomb" , + "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 3, 3] ] + }, + "player": { + "selected_hotbar": 1, + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} } + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 2], "block": {"id": "minecraft:copper_bulb" } }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:redstone_block"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 2], "is": {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": true} }, + { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/copper_bulb_oxidizes_over_time.json b/tests/redstone/copper_bulb/copper_bulb_oxidizes_over_time.json new file mode 100644 index 0000000..8524053 --- /dev/null +++ b/tests/redstone/copper_bulb/copper_bulb_oxidizes_over_time.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_bulb_oxidizes_over_time", + "description": "With a very high random tick speed an isolated unaffected copper bulb weathers to a later oxidation stage and keeps its lit state.", + "tags": ["copper-bulb", "weathering", "random-tick", "world-config"], + "minecraftIds": [ + "minecraft:copper_bulb" , "minecraft:exposed_copper_bulb" , "minecraft:weathered_copper_bulb", + "minecraft:oxidized_copper_bulb" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 1, 1] ] + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": {"id": "minecraft:copper_bulb", "lit": true, "powered": false} + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:copper_bulb", "lit": true, "powered": false} } + ] + }, + { + "at": 200, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": [ + {"id": "minecraft:exposed_copper_bulb" , "lit": true, "powered": false}, + {"id": "minecraft:weathered_copper_bulb", "lit": true, "powered": false}, + {"id": "minecraft:oxidized_copper_bulb" , "lit": true, "powered": false} + ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/exposed_bulb_axe_scrapes.json b/tests/redstone/copper_bulb/exposed_bulb_axe_scrapes.json new file mode 100644 index 0000000..715776a --- /dev/null +++ b/tests/redstone/copper_bulb/exposed_bulb_axe_scrapes.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "exposed_bulb_axe_scrapes", + "description": "Using an axe on a lit, powered exposed copper bulb scrapes it back to a copper bulb that keeps its lit and powered state.", + "tags": ["copper-bulb", "exposed-copper-bulb", "axe", "scrape", "interaction", "player"], + "minecraftIds": [ + "minecraft:exposed_copper_bulb", "minecraft:copper_bulb" , "minecraft:iron_axe" , + "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 3, 3] ] + }, + "player": { + "selected_hotbar": 1, + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} } + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 2], "block": {"id": "minecraft:exposed_copper_bulb"} }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:redstone_block" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 3, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 1, 2], "is": {"id": "minecraft:copper_bulb", "lit": true, "powered": true} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/exposed_bulb_oxidizes_over_time.json b/tests/redstone/copper_bulb/exposed_bulb_oxidizes_over_time.json new file mode 100644 index 0000000..bcc15f0 --- /dev/null +++ b/tests/redstone/copper_bulb/exposed_bulb_oxidizes_over_time.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "exposed_bulb_oxidizes_over_time", + "description": "With a very high random tick speed an isolated exposed copper bulb weathers to a later oxidation stage and keeps its lit state.", + "tags": ["copper-bulb", "exposed-copper-bulb", "weathering", "random-tick", "world-config"], + "minecraftIds": [ + "minecraft:exposed_copper_bulb" , "minecraft:weathered_copper_bulb", "minecraft:oxidized_copper_bulb" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 1, 1] ] + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": {"id": "minecraft:exposed_copper_bulb", "lit": true, "powered": false} + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:exposed_copper_bulb", "lit": true, "powered": false} } + ] + }, + { + "at": 150, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": [ + {"id": "minecraft:weathered_copper_bulb", "lit": true, "powered": false}, + {"id": "minecraft:oxidized_copper_bulb" , "lit": true, "powered": false} + ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/oxidized_bulb_axe_scrapes.json b/tests/redstone/copper_bulb/oxidized_bulb_axe_scrapes.json new file mode 100644 index 0000000..60cb23b --- /dev/null +++ b/tests/redstone/copper_bulb/oxidized_bulb_axe_scrapes.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oxidized_bulb_axe_scrapes", + "description": "Using an axe on a lit, powered oxidized copper bulb scrapes it back one stage to a weathered copper bulb that keeps its lit and powered state.", + "tags": ["copper-bulb", "oxidized-copper-bulb", "axe", "scrape", "interaction", "player"], + "minecraftIds": [ + "minecraft:oxidized_copper_bulb" , "minecraft:weathered_copper_bulb", "minecraft:iron_axe" , + "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 3, 3] ] + }, + "player": { + "selected_hotbar": 1, + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 2], "block": {"id": "minecraft:oxidized_copper_bulb"} }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:redstone_block" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 2], "is": {"id": "minecraft:weathered_copper_bulb", "lit": true, "powered": true} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/oxidized_bulb_does_not_change.json b/tests/redstone/copper_bulb/oxidized_bulb_does_not_change.json new file mode 100644 index 0000000..e6df10a --- /dev/null +++ b/tests/redstone/copper_bulb/oxidized_bulb_does_not_change.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "oxidized_bulb_does_not_change", + "description": "With a very high random tick speed a fully oxidized copper bulb stays oxidized, since it has no next stage.", + "tags": ["copper-bulb", "oxidized-copper-bulb", "weathering", "random-tick", "world-config"], + "minecraftIds": ["minecraft:oxidized_copper_bulb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 1, 1] ] + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": {"id": "minecraft:oxidized_copper_bulb", "lit": true, "powered": false} + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:oxidized_copper_bulb", "lit": true, "powered": false} } + ] + }, + { + "at": 150, + "do": "assert", + "checks": [ + { + "pos": [ 0 , 0, 0 ], + "is" : [ {"id": "minecraft:oxidized_copper_bulb", "lit": true, "powered": false} ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/waxed_bulb_axe_removes_wax.json b/tests/redstone/copper_bulb/waxed_bulb_axe_removes_wax.json new file mode 100644 index 0000000..e96d35f --- /dev/null +++ b/tests/redstone/copper_bulb/waxed_bulb_axe_removes_wax.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_bulb_axe_removes_wax", + "description": "Using an axe on a lit, powered waxed copper bulb removes the wax, turning it into a copper bulb that keeps its lit and powered state.", + "tags": ["copper-bulb", "waxed-copper-bulb", "axe", "wax-off", "interaction", "player"], + "minecraftIds": [ + "minecraft:waxed_copper_bulb", "minecraft:copper_bulb" , "minecraft:iron_axe" , + "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 3, 3] ] + }, + "player": { + "selected_hotbar": 1, + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 2], "block": {"id": "minecraft:waxed_copper_bulb"} }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:redstone_block" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 2], "is": {"id": "minecraft:copper_bulb", "lit": true, "powered": true} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/waxed_bulb_comparator_output.json b/tests/redstone/copper_bulb/waxed_bulb_comparator_output.json new file mode 100644 index 0000000..a2641f9 --- /dev/null +++ b/tests/redstone/copper_bulb/waxed_bulb_comparator_output.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_bulb_comparator_output", + "description": "A comparator reading a lit waxed copper bulb outputs signal 15 and keeps doing so after the bulb loses power, while a comparator reading an unlit bulb outputs 0.", + "tags": ["redstone", "copper-bulb", "waxed-copper-bulb", "comparator", "analog-output"], + "minecraftIds": [ + "minecraft:waxed_copper_bulb", "minecraft:comparator" , "minecraft:redstone_lamp" , + "minecraft:redstone_block" , "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [3, 1, 5] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, -1, -1], [3, -1, 5] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:waxed_copper_bulb" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:comparator" , "facing": "west"} }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:redstone_lamp" } }, + { "pos": [0, 0, 4], "block": {"id": "minecraft:waxed_copper_bulb" } }, + { "pos": [1, 0, 4], "block": {"id": "minecraft:comparator" , "facing": "west"} }, + { "pos": [2, 0, 4], "block": {"id": "minecraft:redstone_lamp" } } + ] + }, + { "at": 4, "do": "place", "pos": [0, 0, 1], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:waxed_copper_bulb", "lit": true , "powered": true } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:comparator" , "powered": true } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": true } }, + { "pos": [0, 0, 4], "is": {"id": "minecraft:waxed_copper_bulb", "lit": false } }, + { "pos": [1, 0, 4], "is": {"id": "minecraft:comparator" , "powered": false} }, + { "pos": [2, 0, 4], "is": {"id": "minecraft:redstone_lamp" , "lit": false } } + ] + }, + { "at": 11, "do": "remove", "pos": [0, 0, 1] }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": false} }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:comparator" , "powered": true } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": true } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/waxed_bulb_does_not_conduct_power.json b/tests/redstone/copper_bulb/waxed_bulb_does_not_conduct_power.json new file mode 100644 index 0000000..d79e87b --- /dev/null +++ b/tests/redstone/copper_bulb/waxed_bulb_does_not_conduct_power.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_bulb_does_not_conduct_power", + "description": "A powered waxed copper bulb is not a power source: a redstone lamp on its far side stays off.", + "tags": ["redstone", "copper-bulb", "waxed-copper-bulb", "power", "redstone-lamp"], + "minecraftIds": ["minecraft:waxed_copper_bulb", "minecraft:redstone_block", "minecraft:redstone_lamp"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 1, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-1, 0, 0], "block": {"id": "minecraft:redstone_lamp" } }, + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:waxed_copper_bulb"} }, + { "pos": [ 1, 0, 0], "block": {"id": "minecraft:redstone_block" } } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [ 0, 0, 0], "is": {"id": "minecraft:waxed_copper_bulb", "lit": true , "powered": true} }, + { "pos": [-1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": false } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/waxed_bulb_does_not_oxidize.json b/tests/redstone/copper_bulb/waxed_bulb_does_not_oxidize.json new file mode 100644 index 0000000..cfc7b48 --- /dev/null +++ b/tests/redstone/copper_bulb/waxed_bulb_does_not_oxidize.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_bulb_does_not_oxidize", + "description": "With a very high random tick speed a waxed copper bulb never changes oxidation stage.", + "tags": ["copper-bulb", "waxed-copper-bulb", "weathering", "random-tick", "world-config"], + "minecraftIds": ["minecraft:waxed_copper_bulb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 1, 1] ] + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": false} + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": false} } + ] + }, + { + "at": 150, + "do": "assert", + "checks": [ + { + "pos": [ 0 , 0, 0 ], + "is" : [ {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": false} ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/waxed_bulb_empty_hand_interact.json b/tests/redstone/copper_bulb/waxed_bulb_empty_hand_interact.json new file mode 100644 index 0000000..08d754c --- /dev/null +++ b/tests/redstone/copper_bulb/waxed_bulb_empty_hand_interact.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_bulb_empty_hand_interact", + "description": "Right-clicking a waxed copper bulb with an empty hand does not toggle it or change the world.", + "tags": ["redstone", "copper-bulb", "waxed-copper-bulb", "interaction", "player"], + "minecraftIds": ["minecraft:waxed_copper_bulb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 3, 3] ] + }, + "player": {"selected_hotbar": 1, "game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 2], "block": {"id": "minecraft:waxed_copper_bulb"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 2], "is": {"id": "minecraft:waxed_copper_bulb", "lit": false, "powered": false} }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/waxed_bulb_honeycomb_no_effect.json b/tests/redstone/copper_bulb/waxed_bulb_honeycomb_no_effect.json new file mode 100644 index 0000000..c47be9a --- /dev/null +++ b/tests/redstone/copper_bulb/waxed_bulb_honeycomb_no_effect.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_bulb_honeycomb_no_effect", + "description": "Using honeycomb on an already waxed copper bulb does nothing: the bulb is unchanged and the honeycomb is not consumed.", + "tags": ["copper-bulb", "waxed-copper-bulb", "honeycomb", "interaction", "player"], + "minecraftIds": ["minecraft:waxed_copper_bulb", "minecraft:honeycomb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 3, 3] ] + }, + "player": { + "selected_hotbar": 1, + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 2], "block": {"id": "minecraft:waxed_copper_bulb"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 2], "is": {"id": "minecraft:waxed_copper_bulb", "lit": false, "powered": false} }, + { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 2} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/waxed_bulb_item_placement.json b/tests/redstone/copper_bulb/waxed_bulb_item_placement.json new file mode 100644 index 0000000..ba4eb84 --- /dev/null +++ b/tests/redstone/copper_bulb/waxed_bulb_item_placement.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_bulb_item_placement", + "description": "A survival player placing the waxed copper bulb item against a redstone block gets a lit, powered bulb because placement runs the power check, and uses up one item.", + "tags": ["redstone", "copper-bulb", "waxed-copper-bulb", "placement", "player"], + "minecraftIds": ["minecraft:waxed_copper_bulb", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 3, 3] ] + }, + "player": { + "selected_hotbar": 1, + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:waxed_copper_bulb", "count": 2} } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 2], "block": {"id": "minecraft:redstone_block"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 1], "is": {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": true} }, + { "slot": "hotbar1", "is": {"id": "minecraft:waxed_copper_bulb", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/waxed_bulb_placed_state_recheck.json b/tests/redstone/copper_bulb/waxed_bulb_placed_state_recheck.json new file mode 100644 index 0000000..19c41e7 --- /dev/null +++ b/tests/redstone/copper_bulb/waxed_bulb_placed_state_recheck.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_bulb_placed_state_recheck", + "description": "Placing a waxed copper bulb re-runs the power check against its stored state: a lit unpowered bulb next to a power source toggles off and becomes powered, while a powered bulb with no power only clears its powered flag and keeps its lit state.", + "tags": ["redstone", "copper-bulb", "waxed-copper-bulb", "placement", "power"], + "minecraftIds": ["minecraft:waxed_copper_bulb", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 1, 4] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 1, + "do": "fill", + "region": [ [0, 0, 0], [0, 0, 0] ], + "with": {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": false} + }, + { + "at": 2, + "do": "fill", + "region": [ [0, 0, 3], [0, 0, 3] ], + "with": {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": true} + }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:waxed_copper_bulb", "lit": false, "powered": true } }, + { "pos": [0, 0, 3], "is": {"id": "minecraft:waxed_copper_bulb", "lit": true , "powered": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/waxed_bulb_power_through_solid_block.json b/tests/redstone/copper_bulb/waxed_bulb_power_through_solid_block.json new file mode 100644 index 0000000..ee3df5c --- /dev/null +++ b/tests/redstone/copper_bulb/waxed_bulb_power_through_solid_block.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_bulb_power_through_solid_block", + "description": "A waxed copper bulb placed next to a solid block that a powered lever strongly powers turns on, while a bulb next to a block with an unpowered lever stays off.", + "tags": ["redstone", "copper-bulb", "waxed-copper-bulb", "strong-power", "lever"], + "minecraftIds": ["minecraft:waxed_copper_bulb", "minecraft:stone", "minecraft:lever"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 2, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [1, 1, 0], + "block": {"id": "minecraft:lever", "face": "floor", "facing": "north", "powered": true} + }, + { "pos": [1, 0, 3], "block": {"id": "minecraft:stone"} }, + { + "pos": [1, 1, 3], + "block": {"id": "minecraft:lever", "face": "floor", "facing": "north", "powered": false} + } + ] + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:waxed_copper_bulb"} }, + { "pos": [0, 0, 3], "block": {"id": "minecraft:waxed_copper_bulb"} } + ] + }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:waxed_copper_bulb", "lit": true , "powered": true } }, + { "pos": [0, 0, 3], "is": {"id": "minecraft:waxed_copper_bulb", "lit": false, "powered": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/copper_bulb/waxed_bulb_toggle.json b/tests/redstone/copper_bulb/waxed_bulb_toggle.json new file mode 100644 index 0000000..cb81e7d --- /dev/null +++ b/tests/redstone/copper_bulb/waxed_bulb_toggle.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_bulb_toggle", + "description": "A waxed copper bulb starts unlit and unpowered, toggles lit when power turns on, keeps its lit state when power turns off, and toggles unlit on the next power-on.", + "tags": ["redstone", "copper-bulb", "waxed-copper-bulb", "toggle", "power"], + "minecraftIds": ["minecraft:waxed_copper_bulb", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 1, 1] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:waxed_copper_bulb"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:waxed_copper_bulb", "lit": false, "powered": false} } + ] + }, + { "at": 2, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": true} } + ] + }, + { "at": 4, "do": "remove", "pos": [1, 0, 0] }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": false} } + ] + }, + { "at": 6, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:waxed_copper_bulb", "lit": false, "powered": true} } + ] + } + ], + "breakpoints": [] +} + From 485d17daa7bf7f2282ded98e018d340c39dda7f7 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 26 Oct 2026 05:49:56 +0100 Subject: [PATCH 20/85] Add Flint tests for chains (9 blocks) --- .../chains/copper_chain_wax_round_trip.json | 74 +++++++++++++++++++ .../copper_chain_weathers_to_oxidized.json | 53 +++++++++++++ .../iron_chain_ignores_axe_and_honeycomb.json | 47 ++++++++++++ .../iron_chain_lantern_support_by_axis.json | 54 ++++++++++++++ .../iron_chain_not_flowed_into_by_fluids.json | 50 +++++++++++++ .../iron_chain_placement_axis_from_face.json | 48 ++++++++++++ ...hain_waterlogged_acts_as_water_source.json | 50 +++++++++++++ ...on_chain_waterlogged_only_from_source.json | 48 ++++++++++++ 8 files changed, 424 insertions(+) create mode 100644 tests/decoration/chains/copper_chain_wax_round_trip.json create mode 100644 tests/decoration/chains/copper_chain_weathers_to_oxidized.json create mode 100644 tests/decoration/chains/iron_chain_ignores_axe_and_honeycomb.json create mode 100644 tests/decoration/chains/iron_chain_lantern_support_by_axis.json create mode 100644 tests/decoration/chains/iron_chain_not_flowed_into_by_fluids.json create mode 100644 tests/decoration/chains/iron_chain_placement_axis_from_face.json create mode 100644 tests/decoration/chains/iron_chain_waterlogged_acts_as_water_source.json create mode 100644 tests/decoration/chains/iron_chain_waterlogged_only_from_source.json diff --git a/tests/decoration/chains/copper_chain_wax_round_trip.json b/tests/decoration/chains/copper_chain_wax_round_trip.json new file mode 100644 index 0000000..ab667c0 --- /dev/null +++ b/tests/decoration/chains/copper_chain_wax_round_trip.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_chain_wax_round_trip", + "description": "Honeycomb waxes a copper chain into waxed_copper_chain (HoneycombItem.WAXABLES), keeping axis and waterlogged, and uses up one honeycomb; a second honeycomb on the waxed chain passes without being consumed. An axe then removes the wax (WAX_OFF_BY_BLOCK) back to copper_chain, and another axe use leaves the unaffected chain unchanged because it has no earlier stage and no wax.", + "tags": ["chain", "copper_chain", "honeycomb", "axe", "wax", "block-state", "player"], + "minecraftIds": [ + "minecraft:copper_chain" , "minecraft:waxed_copper_chain", "minecraft:honeycomb" , + "minecraft:iron_axe" , "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { + "hotbar1": {"id": "minecraft:honeycomb", "count": 2}, + "hotbar2": {"id": "minecraft:iron_axe" } + }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_chain", "axis": "x", "waterlogged": true} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_copper_chain", "axis": "x", "waterlogged": true} }, + { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 1} } + ] + }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_copper_chain", "axis": "x", "waterlogged": true} }, + { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 1} } + ] + }, + {"at": 5, "do": "select_hotbar", "slot": 2}, + {"at": 6, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_chain", "axis": "x", "waterlogged": true} } + ] + }, + {"at": 8, "do": "interact"}, + { + "at": 9, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_chain", "axis": "x", "waterlogged": true} }, + { "slot": "hotbar2", "is": {"id": "minecraft:iron_axe"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/chains/copper_chain_weathers_to_oxidized.json b/tests/decoration/chains/copper_chain_weathers_to_oxidized.json new file mode 100644 index 0000000..3880b45 --- /dev/null +++ b/tests/decoration/chains/copper_chain_weathers_to_oxidized.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_chain_weathers_to_oxidized", + "description": "WeatheringCopperChainBlock random-ticks while a next stage exists: an isolated copper chain passes through exposed and weathered to oxidized_copper_chain keeping axis and waterlogged. A waxed copper chain (plain ChainBlock, no random ticking) placed far away under the same random tick speed stays unchanged as a control. 400 ticks are allowed (about 110 expected).", + "tags": ["chain", "copper_chain", "random-tick", "weathering", "block-state"], + "minecraftIds": [ + "minecraft:copper_chain" , "minecraft:oxidized_copper_chain", "minecraft:waxed_copper_chain" , + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [11, 3, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 3000 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_chain", "axis": "x", "waterlogged": false} }, + { "pos": [10, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [10, 1, 0], + "block": {"id": "minecraft:waxed_copper_chain", "axis": "x", "waterlogged": false} + } + ] + }, + { + "at": 400, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:oxidized_copper_chain", "axis": "x", "waterlogged": false} + }, + { "pos": [10, 1, 0], "is": {"id": "minecraft:waxed_copper_chain", "axis": "x", "waterlogged": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/chains/iron_chain_ignores_axe_and_honeycomb.json b/tests/decoration/chains/iron_chain_ignores_axe_and_honeycomb.json new file mode 100644 index 0000000..b311415 --- /dev/null +++ b/tests/decoration/chains/iron_chain_ignores_axe_and_honeycomb.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "iron_chain_ignores_axe_and_honeycomb", + "description": "Iron chain is not in the copper waxing or weathering maps (HoneycombItem.WAXABLES, WeatheringCopper.NEXT_BY_BLOCK), so an axe and a honeycomb used on it leave the block unchanged and the honeycomb is not consumed.", + "tags": ["chain", "iron_chain", "axe", "honeycomb", "interaction", "player"], + "minecraftIds": ["minecraft:iron_chain", "minecraft:iron_axe", "minecraft:honeycomb", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { + "hotbar1": {"id": "minecraft:iron_axe" }, + "hotbar2": {"id": "minecraft:honeycomb", "count": 3} + }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:iron_chain", "axis": "y", "waterlogged": false} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + {"at": 2, "do": "select_hotbar", "slot": 2}, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:iron_chain", "axis": "y", "waterlogged": false} }, + { "slot": "hotbar1", "is": {"id": "minecraft:iron_axe"} } , + { "slot": "hotbar2", "is": {"id": "minecraft:honeycomb", "count": 3} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/chains/iron_chain_lantern_support_by_axis.json b/tests/decoration/chains/iron_chain_lantern_support_by_axis.json new file mode 100644 index 0000000..99c1faf --- /dev/null +++ b/tests/decoration/chains/iron_chain_lantern_support_by_axis.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "iron_chain_lantern_support_by_axis", + "description": "LanternBlock.canSurvive needs the chain's face support shape to cover the 2x2 centre. A vertical chain spans the whole block so a lantern hangs below it and stands on top of it; a horizontal chain (axis x or z) floats mid-block and does not touch the block face, so the hanging lantern is destroyed. Removing a vertical chain also destroys the lantern below.", + "tags": ["chain", "iron_chain", "lantern", "support", "block-state"], + "minecraftIds": ["minecraft:iron_chain", "minecraft:lantern"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:lantern", "hanging": true, "waterlogged": false} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:iron_chain", "axis": "y", "waterlogged": false} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:lantern", "hanging": true, "waterlogged": false} }, + { "pos": [2, 2, 0], "block": {"id": "minecraft:iron_chain", "axis": "x", "waterlogged": false} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:lantern", "hanging": true, "waterlogged": false} }, + { "pos": [4, 2, 0], "block": {"id": "minecraft:iron_chain", "axis": "z", "waterlogged": false} }, + { "pos": [6, 2, 0], "block": {"id": "minecraft:lantern", "hanging": false, "waterlogged": false} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:iron_chain", "axis": "y", "waterlogged": false} }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:lantern", "hanging": true, "waterlogged": false} }, + { "pos": [8, 2, 0], "block": {"id": "minecraft:iron_chain", "axis": "y", "waterlogged": false} } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:lantern", "hanging": true , "waterlogged": false} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [6, 2, 0], "is": {"id": "minecraft:lantern", "hanging": false, "waterlogged": false} }, + { "pos": [8, 1, 0], "is": {"id": "minecraft:lantern", "hanging": true , "waterlogged": false} } + ] + }, + { "at": 3, "do": "remove", "pos": [8, 2, 0] }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [8, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:iron_chain", "axis": "y", "waterlogged": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/chains/iron_chain_not_flowed_into_by_fluids.json b/tests/decoration/chains/iron_chain_not_flowed_into_by_fluids.json new file mode 100644 index 0000000..b28a04f --- /dev/null +++ b/tests/decoration/chains/iron_chain_not_flowed_into_by_fluids.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "iron_chain_not_flowed_into_by_fluids", + "description": "An unwaterlogged iron chain blocks motion, so FlowingFluid.canHoldAnyFluid rejects it: water and lava sources placed beside and above a chain never replace it or waterlog it.", + "tags": ["chain", "iron_chain", "fluid", "water", "lava"], + "minecraftIds": ["minecraft:iron_chain", "minecraft:stone", "minecraft:water", "minecraft:lava"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, -3], [8, 3, 3] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-3, 0, -3], [8, 0, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [2, 1, -3], [2, 3, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0] , "block": {"id": "minecraft:iron_chain", "axis": "y", "waterlogged": false} }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { "pos": [0, 2, 0] , "block": {"id": "minecraft:water", "level": 0} }, + { "pos": [5, 1, 0] , "block": {"id": "minecraft:iron_chain", "axis": "x", "waterlogged": false} }, + { "pos": [6, 1, 0] , "block": {"id": "minecraft:lava", "level": 0} }, + { "pos": [5, 2, 0] , "block": {"id": "minecraft:lava", "level": 0} } + ] + }, + { + "at": 80, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:iron_chain", "axis": "y", "waterlogged": false} }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:iron_chain", "axis": "x", "waterlogged": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/chains/iron_chain_placement_axis_from_face.json b/tests/decoration/chains/iron_chain_placement_axis_from_face.json new file mode 100644 index 0000000..044c93b --- /dev/null +++ b/tests/decoration/chains/iron_chain_placement_axis_from_face.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "iron_chain_placement_axis_from_face", + "description": "Placing an iron chain sets its axis from the clicked face (RotatedPillarBlock.getStateForPlacement): top gives y, north/south faces give z, east/west faces give x. Each placement uses up one item and is not waterlogged.", + "tags": ["chain", "iron_chain", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:iron_chain", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -2], [8, 3, 3] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_chain", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 0, -1.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [8.5, 0, 0.5], "rot": [90, 0] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:iron_chain", "axis": "y", "waterlogged": false} } , + { "pos": [3, 1, -1], "is": {"id": "minecraft:iron_chain", "axis": "z", "waterlogged": false} }, + { "pos": [7, 1, 0], "is": {"id": "minecraft:iron_chain", "axis": "x", "waterlogged": false} } , + { "slot": "hotbar1", "is": {"id": "minecraft:iron_chain", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/chains/iron_chain_waterlogged_acts_as_water_source.json b/tests/decoration/chains/iron_chain_waterlogged_acts_as_water_source.json new file mode 100644 index 0000000..cd6a12d --- /dev/null +++ b/tests/decoration/chains/iron_chain_waterlogged_acts_as_water_source.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "iron_chain_waterlogged_acts_as_water_source", + "description": "A waterlogged iron chain reports a water source fluid state (ChainBlock.getFluidState), so the fluid tick pending at its position (from the replaced source, LiquidBlock.onPlace, and from ChainBlock.updateShape after the stone is placed) spreads water into adjacent air while the chain stays waterlogged. The tick-3 air check is a precondition: the water delay is 5 ticks (WaterFluid.getTickDelay), so no spread has happened yet and the later water must come from the chain.", + "tags": ["chain", "iron_chain", "waterlogged", "fluid", "player"], + "minecraftIds": ["minecraft:iron_chain", "minecraft:stone", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -2], [2, 3, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_chain", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -2], [2, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "place", "pos": [0, 1, -1], "block": {"id": "minecraft:stone"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:iron_chain", "axis": "y", "waterlogged": true} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:air" } } + ] + }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0] , "is": {"id": "minecraft:iron_chain", "axis": "y", "waterlogged": true} }, + { "pos": [1, 1, 0] , "is": {"id": "minecraft:water", "level": 1} }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:water", "level": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/chains/iron_chain_waterlogged_only_from_source.json b/tests/decoration/chains/iron_chain_waterlogged_only_from_source.json new file mode 100644 index 0000000..5356399 --- /dev/null +++ b/tests/decoration/chains/iron_chain_waterlogged_only_from_source.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "iron_chain_waterlogged_only_from_source", + "description": "ChainBlock.getStateForPlacement waterlogs the chain only when the replaced fluid is a water source: a chain placed into a source block has waterlogged=true, one placed into flowing water has waterlogged=false.", + "tags": ["chain", "iron_chain", "waterlogged", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:iron_chain", "minecraft:stone", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -2], [8, 3, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_chain", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [5, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { "pos": [5, 1, 0], "block": {"id": "minecraft:water", "level": 1} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [5.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:iron_chain", "axis": "y", "waterlogged": true} } , + { "pos": [5, 1, 0], "is": {"id": "minecraft:iron_chain", "axis": "y", "waterlogged": false} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + From ed7e6fdea8c41c179ab8d00e38aed6e1de315c52 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Tue, 27 Oct 2026 04:46:11 +0100 Subject: [PATCH 21/85] Add Flint tests for grate (8 blocks) --- ...r_grate_axe_blocked_by_offhand_shield.json | 60 ++++++++++++++ .../copper_grate_axe_does_nothing.json | 57 +++++++++++++ .../copper_grate_axe_removes_wax.json | 45 +++++++++++ .../copper_grate_axe_scrapes_exposed.json | 45 +++++++++++ .../copper_grate_axe_scrapes_oxidized.json | 45 +++++++++++ ...opper_grate_does_not_conduct_redstone.json | 72 +++++++++++++++++ .../copper_grate_honeycomb_ignores_waxed.json | 45 +++++++++++ .../copper_grate_honeycomb_waxes.json | 45 +++++++++++ .../copper_grate_honeycomb_waxes_exposed.json | 45 +++++++++++ .../copper_grate_oxidized_stays_oxidized.json | 77 ++++++++++++++++++ .../copper_grate_oxidizes_over_time.json | 78 ++++++++++++++++++ .../copper_grate_passes_skylight.json | 63 +++++++++++++++ ...d_in_flowing_water_is_not_waterlogged.json | 64 +++++++++++++++ ...placed_in_water_source_is_waterlogged.json | 56 +++++++++++++ ...te_pushed_by_piston_loses_waterlogged.json | 59 ++++++++++++++ .../copper_grate_survival_placement.json | 38 +++++++++ ...ate_waterlogged_water_stays_contained.json | 81 +++++++++++++++++++ 17 files changed, 975 insertions(+) create mode 100644 tests/decoration/copper_grates/copper_grate_axe_blocked_by_offhand_shield.json create mode 100644 tests/decoration/copper_grates/copper_grate_axe_does_nothing.json create mode 100644 tests/decoration/copper_grates/copper_grate_axe_removes_wax.json create mode 100644 tests/decoration/copper_grates/copper_grate_axe_scrapes_exposed.json create mode 100644 tests/decoration/copper_grates/copper_grate_axe_scrapes_oxidized.json create mode 100644 tests/decoration/copper_grates/copper_grate_does_not_conduct_redstone.json create mode 100644 tests/decoration/copper_grates/copper_grate_honeycomb_ignores_waxed.json create mode 100644 tests/decoration/copper_grates/copper_grate_honeycomb_waxes.json create mode 100644 tests/decoration/copper_grates/copper_grate_honeycomb_waxes_exposed.json create mode 100644 tests/decoration/copper_grates/copper_grate_oxidized_stays_oxidized.json create mode 100644 tests/decoration/copper_grates/copper_grate_oxidizes_over_time.json create mode 100644 tests/decoration/copper_grates/copper_grate_passes_skylight.json create mode 100644 tests/decoration/copper_grates/copper_grate_placed_in_flowing_water_is_not_waterlogged.json create mode 100644 tests/decoration/copper_grates/copper_grate_placed_in_water_source_is_waterlogged.json create mode 100644 tests/decoration/copper_grates/copper_grate_pushed_by_piston_loses_waterlogged.json create mode 100644 tests/decoration/copper_grates/copper_grate_survival_placement.json create mode 100644 tests/decoration/copper_grates/copper_grate_waterlogged_water_stays_contained.json diff --git a/tests/decoration/copper_grates/copper_grate_axe_blocked_by_offhand_shield.json b/tests/decoration/copper_grates/copper_grate_axe_blocked_by_offhand_shield.json new file mode 100644 index 0000000..70e3d1b --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_axe_blocked_by_offhand_shield.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_axe_blocked_by_offhand_shield", + "description": "An axe in the main hand does not remove wax from a waxed copper grate while a shield is held in the off hand (AxeItem.playerHasBlockingItemUseIntent), but once the shield is removed the same axe removes the wax.", + "tags": ["decoration", "copper-grate", "axe", "wax", "shield", "off-hand", "player"], + "minecraftIds": [ + "minecraft:waxed_copper_grate", "minecraft:copper_grate" , "minecraft:iron_axe" , + "minecraft:shield" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:waxed_copper_grate", "waterlogged": false} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "set_slot", "slot": "off_hand", "item": "minecraft:shield"}, + {"at": 2, "do": "interact", "item": "minecraft:iron_axe"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_copper_grate", "waterlogged": false} }, + { "slot": "off_hand", "is": {"id": "minecraft:shield"} } , + { "slot": "hotbar1", "is": {"id": "minecraft:iron_axe"} } + ] + }, + {"at": 4, "do": "set_slot", "slot": "off_hand"}, + {"at": 5, "do": "interact", "item": "minecraft:iron_axe"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": false} }, + { "is": "empty" , "slot": "off_hand" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_axe_does_nothing.json b/tests/decoration/copper_grates/copper_grate_axe_does_nothing.json new file mode 100644 index 0000000..ca1c5f9 --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_axe_does_nothing.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_axe_does_nothing", + "description": "An axe used on an unwaxed, unweathered copper grate does nothing: there is no earlier oxidation stage to scrape back to and no wax to remove (AxeItem.useOn passes). An oak log used with the same axe is stripped, which proves the axe interaction itself worked.", + "tags": ["decoration", "copper-grate", "axe", "weathering", "block-state", "player"], + "minecraftIds": [ + "minecraft:copper_grate" , "minecraft:iron_axe" , "minecraft:oak_log" , + "minecraft:stripped_oak_log" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 0] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_grate", "waterlogged": false } }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:oak_log" , "axis": "y"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:iron_axe"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact", "item": "minecraft:iron_axe"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [4, 1, 0], "is": {"id": "minecraft:stripped_oak_log", "axis": "y"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": false} }, + { "is": {"id": "minecraft:iron_axe"} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_axe_removes_wax.json b/tests/decoration/copper_grates/copper_grate_axe_removes_wax.json new file mode 100644 index 0000000..50e765f --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_axe_removes_wax.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_axe_removes_wax", + "description": "An axe used on a waxed copper grate removes the wax (HoneycombItem.WAX_OFF_BY_BLOCK) and gives the plain copper grate with the same waterlogged state.", + "tags": ["decoration", "copper-grate", "axe", "wax", "block-state", "player"], + "minecraftIds": ["minecraft:waxed_copper_grate", "minecraft:copper_grate", "minecraft:iron_axe"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:waxed_copper_grate", "waterlogged": true} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:iron_axe"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": true} }, + { "is": {"id": "minecraft:iron_axe" }, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_axe_scrapes_exposed.json b/tests/decoration/copper_grates/copper_grate_axe_scrapes_exposed.json new file mode 100644 index 0000000..160c356 --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_axe_scrapes_exposed.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_axe_scrapes_exposed", + "description": "An axe used on an exposed copper grate scrapes it back to a plain copper grate (WeatheringCopper.getPrevious) and keeps its waterlogged state; the axe is not consumed.", + "tags": ["decoration", "copper-grate", "axe", "weathering", "scrape", "block-state", "player"], + "minecraftIds": ["minecraft:exposed_copper_grate", "minecraft:copper_grate", "minecraft:iron_axe"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:exposed_copper_grate", "waterlogged": true} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:iron_axe"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": true} }, + { "is": {"id": "minecraft:iron_axe" }, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_axe_scrapes_oxidized.json b/tests/decoration/copper_grates/copper_grate_axe_scrapes_oxidized.json new file mode 100644 index 0000000..5ca4824 --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_axe_scrapes_oxidized.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_axe_scrapes_oxidized", + "description": "An axe used on an oxidized copper grate scrapes it back one stage to a weathered copper grate (WeatheringCopper.getPrevious) and keeps its waterlogged state.", + "tags": ["decoration", "copper-grate", "axe", "weathering", "scrape", "block-state", "player"], + "minecraftIds": ["minecraft:oxidized_copper_grate", "minecraft:weathered_copper_grate", "minecraft:iron_axe"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:oxidized_copper_grate", "waterlogged": true} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:iron_axe"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:weathered_copper_grate", "waterlogged": true} }, + { "slot": "hotbar1", "is": {"id": "minecraft:iron_axe"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_does_not_conduct_redstone.json b/tests/decoration/copper_grates/copper_grate_does_not_conduct_redstone.json new file mode 100644 index 0000000..cdf91ee --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_does_not_conduct_redstone.json @@ -0,0 +1,72 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_does_not_conduct_redstone", + "description": "A powered lever attached to a copper grate does not power a redstone lamp on the opposite side, because the grate is not a redstone conductor (isRedstoneConductor = never); the same setup with stone lights the lamp.", + "tags": ["decoration", "copper-grate", "redstone", "conductor", "lever", "redstone-lamp"], + "minecraftIds": ["minecraft:copper_grate", "minecraft:stone", "minecraft:lever", "minecraft:redstone_lamp"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, 0], [1, 1, 4] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, 0], [1, 0, 4] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 1, 0], "block": {"id": "minecraft:redstone_lamp", "lit": false} }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:redstone_lamp", "lit": false} }, + { + "pos": [-1, 1, 0], + "block": {"id": "minecraft:lever", "face": "wall", "facing": "west", "powered": true} + }, + { + "pos": [-1, 1, 4], + "block": {"id": "minecraft:lever", "face": "wall", "facing": "west", "powered": true} + } + ] + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_grate", "waterlogged": false} }, + { "pos": [0, 1, 4], "block": {"id": "minecraft:stone" } } + ] + }, + { + "at": 8, + "do": "assert", + "checks": [ + { + "pos": [-1, 1, 0], + "is": {"id": "minecraft:lever", "face": "wall", "facing": "west", "powered": true} + }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} }, + { + "pos": [-1, 1, 4], + "is": {"id": "minecraft:lever", "face": "wall", "facing": "west", "powered": true} + }, + { "pos": [1, 1, 4], "is": {"id": "minecraft:redstone_lamp", "lit": true} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_honeycomb_ignores_waxed.json b/tests/decoration/copper_grates/copper_grate_honeycomb_ignores_waxed.json new file mode 100644 index 0000000..04cc110 --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_honeycomb_ignores_waxed.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_honeycomb_ignores_waxed", + "description": "Using honeycomb on an already waxed copper grate does nothing (HoneycombItem.getWaxed finds no waxable entry): the block is unchanged and the honeycomb is not consumed.", + "tags": ["decoration", "copper-grate", "honeycomb", "wax", "block-state", "player"], + "minecraftIds": ["minecraft:waxed_copper_grate", "minecraft:honeycomb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:waxed_copper_grate", "waterlogged": true} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:honeycomb"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_copper_grate", "waterlogged": true} }, + { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_honeycomb_waxes.json b/tests/decoration/copper_grates/copper_grate_honeycomb_waxes.json new file mode 100644 index 0000000..0748c5d --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_honeycomb_waxes.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_honeycomb_waxes", + "description": "Using honeycomb on a copper grate turns it into a waxed copper grate (HoneycombItem.useOn), keeps its waterlogged state and consumes one honeycomb.", + "tags": ["decoration", "copper-grate", "honeycomb", "wax", "block-state", "player"], + "minecraftIds": ["minecraft:copper_grate", "minecraft:waxed_copper_grate", "minecraft:honeycomb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_grate", "waterlogged": true} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:honeycomb"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_copper_grate", "waterlogged": true} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_honeycomb_waxes_exposed.json b/tests/decoration/copper_grates/copper_grate_honeycomb_waxes_exposed.json new file mode 100644 index 0000000..1a23924 --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_honeycomb_waxes_exposed.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_honeycomb_waxes_exposed", + "description": "Using honeycomb on an exposed copper grate turns it into a waxed exposed copper grate (HoneycombItem.useOn), keeps its waterlogged state and consumes the honeycomb.", + "tags": ["decoration", "copper-grate", "honeycomb", "wax", "weathering", "block-state", "player"], + "minecraftIds": ["minecraft:exposed_copper_grate", "minecraft:waxed_exposed_copper_grate", "minecraft:honeycomb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:exposed_copper_grate", "waterlogged": true} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:honeycomb"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_exposed_copper_grate", "waterlogged": true} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_oxidized_stays_oxidized.json b/tests/decoration/copper_grates/copper_grate_oxidized_stays_oxidized.json new file mode 100644 index 0000000..bfca51a --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_oxidized_stays_oxidized.json @@ -0,0 +1,77 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_oxidized_stays_oxidized", + "description": "With a very high random tick speed an oxidized copper grate never changes (isRandomlyTicking is false because there is no next stage), while an unwaxed copper grate in the same world does age.", + "tags": ["decoration", "copper-grate", "weathering", "oxidation", "random-tick", "block-state"], + "minecraftIds": ["minecraft:oxidized_copper_grate", "minecraft:copper_grate"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [6, 1, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [6, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:oxidized_copper_grate", "waterlogged": false} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:copper_grate" , "waterlogged": false} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oxidized_copper_grate", "waterlogged": false} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:copper_grate" , "waterlogged": false} } + ] + }, + { + "at": 100, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oxidized_copper_grate", "waterlogged": false} } + ] + }, + { + "at": 200, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oxidized_copper_grate", "waterlogged": false} } + ] + }, + { + "at": 300, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oxidized_copper_grate", "waterlogged": false} }, + { + "pos": [6, 1, 0], + "is": [ + {"id": "minecraft:exposed_copper_grate" , "waterlogged": false}, + {"id": "minecraft:weathered_copper_grate", "waterlogged": false}, + {"id": "minecraft:oxidized_copper_grate" , "waterlogged": false} + ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_oxidizes_over_time.json b/tests/decoration/copper_grates/copper_grate_oxidizes_over_time.json new file mode 100644 index 0000000..aa6e9b8 --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_oxidizes_over_time.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_oxidizes_over_time", + "description": "With a very high random tick speed an exposed copper grate randomly ticks through the remaining oxidation stages (WeatheringCopperGrateBlock.randomTick) and ends up as an oxidized copper grate, keeping its waterlogged state.", + "tags": ["decoration", "copper-grate", "weathering", "oxidation", "random-tick", "block-state"], + "minecraftIds": [ + "minecraft:exposed_copper_grate" , "minecraft:weathered_copper_grate", "minecraft:oxidized_copper_grate" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:exposed_copper_grate", "waterlogged": true} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:exposed_copper_grate", "waterlogged": true} } + ] + }, + { + "at": 100, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": [ + {"id": "minecraft:exposed_copper_grate" , "waterlogged": true}, + {"id": "minecraft:weathered_copper_grate", "waterlogged": true}, + {"id": "minecraft:oxidized_copper_grate" , "waterlogged": true} + ] + } + ] + }, + { + "at": 200, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": [ + {"id": "minecraft:exposed_copper_grate" , "waterlogged": true}, + {"id": "minecraft:weathered_copper_grate", "waterlogged": true}, + {"id": "minecraft:oxidized_copper_grate" , "waterlogged": true} + ] + } + ] + }, + { + "at": 300, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:oxidized_copper_grate", "waterlogged": true} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_passes_skylight.json b/tests/decoration/copper_grates/copper_grate_passes_skylight.json new file mode 100644 index 0000000..d541537 --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_passes_skylight.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_passes_skylight", + "description": "A daylight detector in a sealed chamber roofed by a copper grate receives skylight (TransparentBlock.propagatesSkylightDown) and powers its adjacent redstone lamp at noon; an identical chamber roofed by stone stays dark.", + "tags": ["decoration", "copper-grate", "skylight", "daylight-detector", "redstone-lamp", "world-config"], + "minecraftIds": [ + "minecraft:copper_grate" , "minecraft:stone" , "minecraft:daylight_detector", + "minecraft:redstone_lamp" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 7] ] + }, + "world": { + "time": "minecraft:noon", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 7] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, -1], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 1] , "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 0] , "block": {"id": "minecraft:redstone_lamp", "lit": false} }, + { "pos": [0, 1, 0] , "block": {"id": "minecraft:daylight_detector", "inverted": false} }, + { "pos": [0, 2, 0] , "block": {"id": "minecraft:copper_grate", "waterlogged": false} }, + { "pos": [-1, 1, 6], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 5] , "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 7] , "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 6] , "block": {"id": "minecraft:redstone_lamp", "lit": false} }, + { "pos": [0, 1, 6] , "block": {"id": "minecraft:daylight_detector", "inverted": false} }, + { "pos": [0, 2, 6] , "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 50, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:copper_grate" , "waterlogged": false } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": true } }, + { "pos": [1, 1, 6], "is": {"id": "minecraft:redstone_lamp", "lit": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_placed_in_flowing_water_is_not_waterlogged.json b/tests/decoration/copper_grates/copper_grate_placed_in_flowing_water_is_not_waterlogged.json new file mode 100644 index 0000000..40cb31a --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_placed_in_flowing_water_is_not_waterlogged.json @@ -0,0 +1,64 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_placed_in_flowing_water_is_not_waterlogged", + "description": "A copper grate placed into flowing (non-source) water is not waterlogged, because getStateForPlacement only checks fluidState.is(Fluids.WATER), which is the source fluid type.", + "tags": ["decoration", "copper-grate", "placement", "waterlogging", "water", "block-state", "player"], + "minecraftIds": ["minecraft:copper_grate", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [2, 1, 1] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [2, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 1, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 1, 1, -1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:water"} } + ] + }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water", "level": 1} } + ] + }, + { "at": 13, "do": "tp", "entity_alias": "player", "pos": [1.5, 3, 0.5], "rot": [0, 90] }, + {"at": 13, "do": "interact", "item": "minecraft:copper_grate"}, + { + "at": 14, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": false} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_placed_in_water_source_is_waterlogged.json b/tests/decoration/copper_grates/copper_grate_placed_in_water_source_is_waterlogged.json new file mode 100644 index 0000000..e622ab4 --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_placed_in_water_source_is_waterlogged.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_placed_in_water_source_is_waterlogged", + "description": "A copper grate placed by a player into a water source block becomes waterlogged (getStateForPlacement sets waterlogged when the replaced fluid is water).", + "tags": ["decoration", "copper-grate", "placement", "waterlogging", "water", "block-state", "player"], + "minecraftIds": ["minecraft:copper_grate", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 1, 1] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:water"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:copper_grate"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": true} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_pushed_by_piston_loses_waterlogged.json b/tests/decoration/copper_grates/copper_grate_pushed_by_piston_loses_waterlogged.json new file mode 100644 index 0000000..81ee763 --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_pushed_by_piston_loses_waterlogged.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_pushed_by_piston_loses_waterlogged", + "description": "An extending piston pushes a waterlogged copper grate one block (normal push reaction) but PistonMovingBlockEntity clears waterlogged when the moved block is placed, so the grate arrives at its new position with waterlogged=false.", + "tags": ["decoration", "copper-grate", "piston", "push-reaction", "waterlogging", "redstone"], + "minecraftIds": ["minecraft:copper_grate", "minecraft:piston"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston", "facing": "east", "extended": "false"} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:copper_grate", "waterlogged": true} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": "false"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": true} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} } + ] + }, + { "at": 2, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": "true"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east", "type": "normal"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_survival_placement.json b/tests/decoration/copper_grates/copper_grate_survival_placement.json new file mode 100644 index 0000000..a4e2421 --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_survival_placement.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_survival_placement", + "description": "A player using a copper grate on top of stone places it with waterlogged=false (WaterloggedTransparentBlock.getStateForPlacement) and consumes the item.", + "tags": ["decoration", "copper-grate", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:copper_grate", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:copper_grate"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": false} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_grates/copper_grate_waterlogged_water_stays_contained.json b/tests/decoration/copper_grates/copper_grate_waterlogged_water_stays_contained.json new file mode 100644 index 0000000..90ee758 --- /dev/null +++ b/tests/decoration/copper_grates/copper_grate_waterlogged_water_stays_contained.json @@ -0,0 +1,81 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_grate_waterlogged_water_stays_contained", + "description": "A waterlogged copper grate does not release water into adjacent air even after a player placement next to it triggers a fluid tick, because its full-block collision shape stops FlowingFluid.canPassThroughWall; a waterlogged bottom slab in an identical walled pocket is the control and does spread.", + "tags": ["decoration", "copper-grate", "waterlogging", "water", "fluid", "block-state", "player"], + "minecraftIds": ["minecraft:copper_grate", "minecraft:oak_slab", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -2], [10, 3, 2] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -2], [2, 1, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [6, 0, -2], [10, 1, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [1, 1, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [7, 1, -1], [9, 1, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_grate", "waterlogged": true } }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:oak_slab" , "waterlogged": true, "type": "bottom"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact", "item": "minecraft:stone"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [8.5, 4, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact", "item": "minecraft:stone"}, + { + "at": 17, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0] , "is": {"id": "minecraft:stone"} }, + { "pos": [8, 2, 0] , "is": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 0] , "is": {"id": "minecraft:oak_slab", "type": "bottom", "waterlogged": true} }, + { "pos": [9, 1, 0] , "is": {"id": "minecraft:water", "level": 1} }, + { "pos": [7, 1, 0] , "is": {"id": "minecraft:water", "level": 1} }, + { "pos": [8, 1, 1] , "is": {"id": "minecraft:water", "level": 1} }, + { "pos": [8, 1, -1], "is": {"id": "minecraft:water", "level": 1} }, + { "pos": [0, 1, 0] , "is": {"id": "minecraft:copper_grate", "waterlogged": true} }, + { "pos": [1, 1, 0] , "is": {"id": "minecraft:air"} }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [0, 1, 1] , "is": {"id": "minecraft:air"} }, + { "pos": [0, 1, -1], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + From 0a5b7ebc0db5c28922285654858d578b797ed100 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Tue, 27 Oct 2026 04:51:03 +0100 Subject: [PATCH 22/85] Add Flint tests for hoes (7 blocks) --- .../hoe/hoe_blocked_by_solid_block_above.json | 82 ++++++++++++ .../items/hoe/hoe_breaks_after_32_tills.json | 124 ++++++++++++++++++ tests/items/hoe/hoe_ignores_bottom_face.json | 56 ++++++++ .../hoe/hoe_ignores_non_tillable_blocks.json | 52 ++++++++ .../hoe_rooted_dirt_drops_hanging_roots.json | 41 ++++++ ...oe_rooted_dirt_ignores_face_and_cover.json | 60 +++++++++ tests/items/hoe/hoe_tills_dirt.json | 41 ++++++ tests/items/hoe/hoe_tills_dirt_path.json | 41 ++++++ tests/items/hoe/hoe_tills_grass_block.json | 41 ++++++ .../hoe/hoe_turns_coarse_dirt_into_dirt.json | 41 ++++++ 10 files changed, 579 insertions(+) create mode 100644 tests/items/hoe/hoe_blocked_by_solid_block_above.json create mode 100644 tests/items/hoe/hoe_breaks_after_32_tills.json create mode 100644 tests/items/hoe/hoe_ignores_bottom_face.json create mode 100644 tests/items/hoe/hoe_ignores_non_tillable_blocks.json create mode 100644 tests/items/hoe/hoe_rooted_dirt_drops_hanging_roots.json create mode 100644 tests/items/hoe/hoe_rooted_dirt_ignores_face_and_cover.json create mode 100644 tests/items/hoe/hoe_tills_dirt.json create mode 100644 tests/items/hoe/hoe_tills_dirt_path.json create mode 100644 tests/items/hoe/hoe_tills_grass_block.json create mode 100644 tests/items/hoe/hoe_turns_coarse_dirt_into_dirt.json diff --git a/tests/items/hoe/hoe_blocked_by_solid_block_above.json b/tests/items/hoe/hoe_blocked_by_solid_block_above.json new file mode 100644 index 0000000..195cb86 --- /dev/null +++ b/tests/items/hoe/hoe_blocked_by_solid_block_above.json @@ -0,0 +1,82 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": [ + "minecraft:golden_hoe" , "minecraft:dirt" , "minecraft:coarse_dirt", "minecraft:stone" , + "minecraft:farmland" + ], + "name": "hoe_blocked_by_solid_block_above", + "description": "Dirt and coarse dirt with a stone block directly above are not changed when the hoe is used on a side face (onlyIfAirAbove fails); once the stone is removed the same click works.", + "tags": ["item", "hoe", "tilling", "edge-case", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [4, 4, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [2, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 3], "block": {"id": "minecraft:coarse_dirt"} }, + { "pos": [2, 1, 3], "block": {"id": "minecraft:stone" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "rot": [-90, 37], "pos": [0.5, 0, 0.5] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [2, 0, 0], "is": {"id": "minecraft:dirt" } }, + { "is": {"id": "minecraft:golden_hoe", "count": 1}, "slot": "hotbar1" } + ] + }, + { "at": 3, "do": "remove", "pos": [2, 1, 0] }, + { "at": 4, "do": "tp", "entity_alias": "player", "rot": [-90, 37], "pos": [0.5, 0, 0.5] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [2, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} } + ] + }, + { "at": 6, "do": "tp", "entity_alias": "player", "rot": [-90, 37], "pos": [0.5, 0, 3.5] }, + {"at": 6, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [2, 0, 3], "is": {"id": "minecraft:coarse_dirt" } }, + { "is": {"id": "minecraft:golden_hoe" , "count": 1}, "slot": "hotbar1" } + ] + }, + { "at": 8, "do": "remove", "pos": [2, 1, 3] }, + { "at": 9, "do": "tp", "entity_alias": "player", "rot": [-90, 37], "pos": [0.5, 0, 3.5] }, + {"at": 9, "do": "interact"}, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [2, 0, 3], "is": {"id": "minecraft:dirt"} } + ] + } + ] +} + diff --git a/tests/items/hoe/hoe_breaks_after_32_tills.json b/tests/items/hoe/hoe_breaks_after_32_tills.json new file mode 100644 index 0000000..046d8b1 --- /dev/null +++ b/tests/items/hoe/hoe_breaks_after_32_tills.json @@ -0,0 +1,124 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:golden_hoe", "minecraft:grass_block", "minecraft:farmland"], + "name": "hoe_breaks_after_32_tills", + "description": "A golden hoe (durability 32) loses 1 durability per successful till: after 31 tills it is still in hotbar1, and the 32nd till succeeds and breaks it, leaving hotbar1 empty. The spare 33rd grass block that was never clicked is still grass; this last check is only a sanity check that no extra till happened, since the hand is empty and cannot show a refused till.", + "tags": ["item", "hoe", "tilling", "durability", "player"], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [7, 4, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [7, 0, 3] ], + "with": {"id": "minecraft:grass_block"} + }, + { "at": 0, "do": "place", "pos": [0, 0, 4], "block": {"id": "minecraft:grass_block"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 0.5], "rot": [0, 90] }, + {"at": 4, "do": "interact"}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, 0.5], "rot": [0, 90] }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [7.5, 2, 0.5], "rot": [0, 90] }, + {"at": 8, "do": "interact"}, + { "at": 9, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 1.5], "rot": [0, 90] }, + {"at": 9, "do": "interact"}, + { "at": 10, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 1.5], "rot": [0, 90] }, + {"at": 10, "do": "interact"}, + { "at": 11, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 1.5], "rot": [0, 90] }, + {"at": 11, "do": "interact"}, + { "at": 12, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 1.5], "rot": [0, 90] }, + {"at": 12, "do": "interact"}, + { "at": 13, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 1.5], "rot": [0, 90] }, + {"at": 13, "do": "interact"}, + { "at": 14, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 1.5], "rot": [0, 90] }, + {"at": 14, "do": "interact"}, + { "at": 15, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, 1.5], "rot": [0, 90] }, + {"at": 15, "do": "interact"}, + { "at": 16, "do": "tp", "entity_alias": "player", "pos": [7.5, 2, 1.5], "rot": [0, 90] }, + {"at": 16, "do": "interact"}, + { "at": 17, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 2.5], "rot": [0, 90] }, + {"at": 17, "do": "interact"}, + { "at": 18, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 2.5], "rot": [0, 90] }, + {"at": 18, "do": "interact"}, + { "at": 19, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 2.5], "rot": [0, 90] }, + {"at": 19, "do": "interact"}, + { "at": 20, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 2.5], "rot": [0, 90] }, + {"at": 20, "do": "interact"}, + { "at": 21, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 2.5], "rot": [0, 90] }, + {"at": 21, "do": "interact"}, + { "at": 22, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 2.5], "rot": [0, 90] }, + {"at": 22, "do": "interact"}, + { "at": 23, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, 2.5], "rot": [0, 90] }, + {"at": 23, "do": "interact"}, + { "at": 24, "do": "tp", "entity_alias": "player", "pos": [7.5, 2, 2.5], "rot": [0, 90] }, + {"at": 24, "do": "interact"}, + { "at": 25, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 3.5], "rot": [0, 90] }, + {"at": 25, "do": "interact"}, + { "at": 26, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 3.5], "rot": [0, 90] }, + {"at": 26, "do": "interact"}, + { "at": 27, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 3.5], "rot": [0, 90] }, + {"at": 27, "do": "interact"}, + { "at": 28, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 3.5], "rot": [0, 90] }, + {"at": 28, "do": "interact"}, + { "at": 29, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 3.5], "rot": [0, 90] }, + {"at": 29, "do": "interact"}, + { "at": 30, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 3.5], "rot": [0, 90] }, + {"at": 30, "do": "interact"}, + { "at": 31, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, 3.5], "rot": [0, 90] }, + {"at": 31, "do": "interact"}, + { + "at": 32, + "do": "assert", + "checks": [ + { "pos": [6, 0, 3], "is": {"id": "minecraft:farmland", "moisture": 0} }, + { "is": {"id": "minecraft:golden_hoe", "count": 1} , "slot": "hotbar1" } + ] + }, + { "at": 32, "do": "tp", "entity_alias": "player", "pos": [7.5, 2, 3.5], "rot": [0, 90] }, + {"at": 32, "do": "interact"}, + { + "at": 33, + "do": "assert", + "checks": [ + { "pos": [7, 0, 3], "is": {"id": "minecraft:farmland", "moisture": 0} }, + { "is": "empty" , "slot": "hotbar1" } + ] + }, + { + "at": 34, + "do": "assert", + "checks": [ + { "pos": [0, 0, 4], "is": {"id": "minecraft:grass_block"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/hoe/hoe_ignores_bottom_face.json b/tests/items/hoe/hoe_ignores_bottom_face.json new file mode 100644 index 0000000..0fdf4f5 --- /dev/null +++ b/tests/items/hoe/hoe_ignores_bottom_face.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:golden_hoe", "minecraft:dirt", "minecraft:farmland", "minecraft:stone"], + "name": "hoe_ignores_bottom_face", + "description": "Using a hoe on the bottom face of floating dirt does nothing (onlyIfAirAbove rejects Direction.DOWN); using it on the top face of the same dirt afterwards tills it.", + "tags": ["item", "hoe", "tilling", "edge-case", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 5, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:dirt" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt" } }, + { "is": {"id": "minecraft:golden_hoe", "count": 1}, "slot": "hotbar1" } + ] + }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:farmland", "moisture": 0} } + ] + } + ] +} + diff --git a/tests/items/hoe/hoe_ignores_non_tillable_blocks.json b/tests/items/hoe/hoe_ignores_non_tillable_blocks.json new file mode 100644 index 0000000..21ec5a5 --- /dev/null +++ b/tests/items/hoe/hoe_ignores_non_tillable_blocks.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:golden_hoe", "minecraft:stone", "minecraft:farmland"], + "name": "hoe_ignores_non_tillable_blocks", + "description": "Using a hoe on stone or on already tilled farmland does nothing: they are not in the tillable table so useOn passes, and the hoe stays in hand.", + "tags": ["item", "hoe", "tilling", "edge-case", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [3, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 0} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone"} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} }, + { "is": {"id": "minecraft:golden_hoe", "count": 1} , "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/hoe/hoe_rooted_dirt_drops_hanging_roots.json b/tests/items/hoe/hoe_rooted_dirt_drops_hanging_roots.json new file mode 100644 index 0000000..e856f3c --- /dev/null +++ b/tests/items/hoe/hoe_rooted_dirt_drops_hanging_roots.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:golden_hoe", "minecraft:rooted_dirt", "minecraft:dirt", "minecraft:hanging_roots"], + "name": "hoe_rooted_dirt_drops_hanging_roots", + "description": "Using a hoe on rooted dirt turns it into dirt and drops one hanging roots item (HoeItem TILLABLES, changeIntoStateAndDropItem).", + "tags": ["item", "hoe", "tilling", "drop", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [3, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:rooted_dirt"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt"} } , + { "slot": "hotbar1", "is": {"id": "minecraft:golden_hoe", "count": 1} } , + { "is": "minecraft:item", "count": 1, "pos": [0.5, 1, 0.5], "position_tolerance": 2.5 } + ] + } + ] +} + diff --git a/tests/items/hoe/hoe_rooted_dirt_ignores_face_and_cover.json b/tests/items/hoe/hoe_rooted_dirt_ignores_face_and_cover.json new file mode 100644 index 0000000..e874696 --- /dev/null +++ b/tests/items/hoe/hoe_rooted_dirt_ignores_face_and_cover.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:golden_hoe", "minecraft:rooted_dirt", "minecraft:dirt", "minecraft:stone"], + "name": "hoe_rooted_dirt_ignores_face_and_cover", + "description": "Rooted dirt has an always-true predicate, so a hoe converts it to dirt when clicked from below, and when clicked on a side face with stone above it.", + "tags": ["item", "hoe", "tilling", "edge-case", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [4, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, -1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:rooted_dirt"} }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:rooted_dirt"} }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:stone" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt" } }, + { "is": {"id": "minecraft:golden_hoe", "count": 1}, "slot": "hotbar1" } + ] + }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [1.5, 0, 0.5], "rot": [-90, 37] }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [3, 0, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:stone" } }, + { "is": {"id": "minecraft:golden_hoe", "count": 1}, "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/hoe/hoe_tills_dirt.json b/tests/items/hoe/hoe_tills_dirt.json new file mode 100644 index 0000000..aa7fe63 --- /dev/null +++ b/tests/items/hoe/hoe_tills_dirt.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:golden_hoe", "minecraft:dirt", "minecraft:farmland"], + "name": "hoe_tills_dirt", + "description": "Using a hoe on the top face of dirt with air above turns it into farmland (HoeItem TILLABLES) and the hoe stays in the hand.", + "tags": ["item", "hoe", "tilling", "block-state", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [3, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:dirt"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, + { "is": {"id": "minecraft:golden_hoe", "count": 1} , "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/hoe/hoe_tills_dirt_path.json b/tests/items/hoe/hoe_tills_dirt_path.json new file mode 100644 index 0000000..b6e5bd6 --- /dev/null +++ b/tests/items/hoe/hoe_tills_dirt_path.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:golden_hoe", "minecraft:dirt_path", "minecraft:farmland"], + "name": "hoe_tills_dirt_path", + "description": "Using a hoe on the top face of dirt_path with air above turns it into farmland (HoeItem TILLABLES) and the hoe stays in the hand.", + "tags": ["item", "hoe", "tilling", "block-state", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [3, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:dirt_path"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, + { "is": {"id": "minecraft:golden_hoe", "count": 1} , "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/hoe/hoe_tills_grass_block.json b/tests/items/hoe/hoe_tills_grass_block.json new file mode 100644 index 0000000..a095162 --- /dev/null +++ b/tests/items/hoe/hoe_tills_grass_block.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:golden_hoe", "minecraft:grass_block", "minecraft:farmland"], + "name": "hoe_tills_grass_block", + "description": "Using a hoe on the top face of grass_block with air above turns it into farmland (HoeItem TILLABLES) and the hoe stays in the hand.", + "tags": ["item", "hoe", "tilling", "block-state", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [3, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, + { "is": {"id": "minecraft:golden_hoe", "count": 1} , "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/hoe/hoe_turns_coarse_dirt_into_dirt.json b/tests/items/hoe/hoe_turns_coarse_dirt_into_dirt.json new file mode 100644 index 0000000..33a5d35 --- /dev/null +++ b/tests/items/hoe/hoe_turns_coarse_dirt_into_dirt.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:golden_hoe", "minecraft:coarse_dirt", "minecraft:dirt"], + "name": "hoe_turns_coarse_dirt_into_dirt", + "description": "Using a hoe on the top face of coarse_dirt with air above turns it into dirt (HoeItem TILLABLES) and the hoe stays in the hand.", + "tags": ["item", "hoe", "tilling", "block-state", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [3, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:coarse_dirt"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:golden_hoe", "count": 1}, "slot": "hotbar1" } + ] + } + ] +} + From 4cb356c4f777b605c8ee8cf9f56c4ba54625a8d6 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Tue, 27 Oct 2026 06:49:07 +0100 Subject: [PATCH 23/85] Add Flint tests for lanterns (10 blocks) --- ...ntern_aging_blocked_by_younger_copper.json | 70 +++++++++++++++++++ .../exposed_copper_lantern_axe_scrapes.json | 53 ++++++++++++++ ...xposed_copper_lantern_honeycomb_waxes.json | 60 ++++++++++++++++ .../exposed_copper_lantern_oxidizes.json | 64 +++++++++++++++++ .../lantern_blocks_flowing_water.json | 46 ++++++++++++ ...ern_center_support_on_fence_and_chain.json | 46 ++++++++++++ .../lanterns/lantern_destroyed_by_piston.json | 54 ++++++++++++++ ...antern_hanging_breaks_without_ceiling.json | 45 ++++++++++++ .../lantern_hanging_survival_placement.json | 41 +++++++++++ ...antern_placed_in_water_is_waterlogged.json | 52 ++++++++++++++ ...ejects_slab_top_and_fence_gate_bottom.json | 49 +++++++++++++ ...tern_side_click_falls_back_to_hanging.json | 51 ++++++++++++++ ...lantern_standing_breaks_without_floor.json | 43 ++++++++++++ .../lantern_standing_survival_placement.json | 34 +++++++++ .../lantern_unsupported_placement_fails.json | 44 ++++++++++++ ...waterlogged_support_loss_leaves_water.json | 49 +++++++++++++ .../waxed_copper_lantern_axe_removes_wax.json | 53 ++++++++++++++ ...waxed_copper_lantern_does_not_oxidize.json | 68 ++++++++++++++++++ ...axed_copper_lantern_rejects_honeycomb.json | 56 +++++++++++++++ 19 files changed, 978 insertions(+) create mode 100644 tests/decoration/lanterns/exposed_copper_lantern_aging_blocked_by_younger_copper.json create mode 100644 tests/decoration/lanterns/exposed_copper_lantern_axe_scrapes.json create mode 100644 tests/decoration/lanterns/exposed_copper_lantern_honeycomb_waxes.json create mode 100644 tests/decoration/lanterns/exposed_copper_lantern_oxidizes.json create mode 100644 tests/decoration/lanterns/lantern_blocks_flowing_water.json create mode 100644 tests/decoration/lanterns/lantern_center_support_on_fence_and_chain.json create mode 100644 tests/decoration/lanterns/lantern_destroyed_by_piston.json create mode 100644 tests/decoration/lanterns/lantern_hanging_breaks_without_ceiling.json create mode 100644 tests/decoration/lanterns/lantern_hanging_survival_placement.json create mode 100644 tests/decoration/lanterns/lantern_placed_in_water_is_waterlogged.json create mode 100644 tests/decoration/lanterns/lantern_rejects_slab_top_and_fence_gate_bottom.json create mode 100644 tests/decoration/lanterns/lantern_side_click_falls_back_to_hanging.json create mode 100644 tests/decoration/lanterns/lantern_standing_breaks_without_floor.json create mode 100644 tests/decoration/lanterns/lantern_standing_survival_placement.json create mode 100644 tests/decoration/lanterns/lantern_unsupported_placement_fails.json create mode 100644 tests/decoration/lanterns/lantern_waterlogged_support_loss_leaves_water.json create mode 100644 tests/decoration/lanterns/waxed_copper_lantern_axe_removes_wax.json create mode 100644 tests/decoration/lanterns/waxed_copper_lantern_does_not_oxidize.json create mode 100644 tests/decoration/lanterns/waxed_copper_lantern_rejects_honeycomb.json diff --git a/tests/decoration/lanterns/exposed_copper_lantern_aging_blocked_by_younger_copper.json b/tests/decoration/lanterns/exposed_copper_lantern_aging_blocked_by_younger_copper.json new file mode 100644 index 0000000..c5f7a06 --- /dev/null +++ b/tests/decoration/lanterns/exposed_copper_lantern_aging_blocked_by_younger_copper.json @@ -0,0 +1,70 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "exposed_copper_lantern_aging_blocked_by_younger_copper", + "description": "ChangeOverTimeBlock.getNextState scans weathering neighbors up to Manhattan distance 4 and refuses to age if any is younger. At random_tick_speed 4096 an exposed copper lantern whose nearest unaffected copper blocks are 3-4 blocks away stays exposed for 200 ticks, while an identical lantern exactly 5 blocks from the copper oxidizes. The copper blocks form a 3x3x3 cluster so they barely age themselves.", + "tags": ["decoration", "lantern", "copper", "oxidation", "random-tick", "edge-case"], + "minecraftIds": [ + "minecraft:exposed_copper_lantern" , + "minecraft:weathered_copper_lantern", + "minecraft:oxidized_copper_lantern" , + "minecraft:copper_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-5, 0, -1], [5, 2, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -1], [2, 2, 1] ], + "with": {"id": "minecraft:copper_block"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [5, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [5, 1, 0], + "block": {"id": "minecraft:exposed_copper_lantern", "hanging": false, "waterlogged": false} + }, + { "pos": [-5, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [-5, 1, 0], + "block": {"id": "minecraft:exposed_copper_lantern", "hanging": false, "waterlogged": false} + } + ] + }, + { + "at": 200, + "do": "assert", + "checks": [ + { + "pos": [5, 1, 0], + "is": {"id": "minecraft:exposed_copper_lantern", "hanging": false, "waterlogged": false} + }, + { + "pos": [-5, 1, 0], + "is": [ + {"id": "minecraft:weathered_copper_lantern", "hanging": false, "waterlogged": false}, + {"id": "minecraft:oxidized_copper_lantern" , "hanging": false, "waterlogged": false} + ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/exposed_copper_lantern_axe_scrapes.json b/tests/decoration/lanterns/exposed_copper_lantern_axe_scrapes.json new file mode 100644 index 0000000..a7b20f6 --- /dev/null +++ b/tests/decoration/lanterns/exposed_copper_lantern_axe_scrapes.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "exposed_copper_lantern_axe_scrapes", + "description": "Using an axe on a hanging, waterlogged exposed copper lantern scrapes it back one stage (WeatheringCopper.getPrevious) to a copper lantern with the same hanging and waterlogged values; the axe is kept.", + "tags": ["decoration", "lantern", "copper", "oxidation", "axe", "block-state", "player"], + "minecraftIds": ["minecraft:exposed_copper_lantern", "minecraft:copper_lantern", "minecraft:iron_axe"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -3, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, -3, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": {"id": "minecraft:exposed_copper_lantern", "hanging": true, "waterlogged": true} + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, -2, 0.5], "rot": [0, -90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_lantern", "hanging": true, "waterlogged": true} }, + { "slot": "hotbar1", "is": {"id": "minecraft:iron_axe", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/exposed_copper_lantern_honeycomb_waxes.json b/tests/decoration/lanterns/exposed_copper_lantern_honeycomb_waxes.json new file mode 100644 index 0000000..4ec07c2 --- /dev/null +++ b/tests/decoration/lanterns/exposed_copper_lantern_honeycomb_waxes.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "exposed_copper_lantern_honeycomb_waxes", + "description": "Using honeycomb on an exposed copper lantern waxes it (HoneycombItem.WAXABLES) into a waxed exposed copper lantern with the same properties, and the survival player's honeycomb is consumed.", + "tags": ["decoration", "lantern", "copper", "waxed", "honeycomb", "block-state", "player"], + "minecraftIds": [ + "minecraft:exposed_copper_lantern" , + "minecraft:waxed_exposed_copper_lantern", + "minecraft:honeycomb" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": {"id": "minecraft:exposed_copper_lantern", "hanging": false, "waterlogged": false} + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:waxed_exposed_copper_lantern", "hanging": false, "waterlogged": false} + }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/exposed_copper_lantern_oxidizes.json b/tests/decoration/lanterns/exposed_copper_lantern_oxidizes.json new file mode 100644 index 0000000..3e738d1 --- /dev/null +++ b/tests/decoration/lanterns/exposed_copper_lantern_oxidizes.json @@ -0,0 +1,64 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "exposed_copper_lantern_oxidizes", + "description": "With random_tick_speed 4096 and no other copper nearby, a hanging exposed copper lantern ages (WeatheringLanternBlock.randomTick -> changeOverTime) to the next oxidation stage, keeping hanging=true and waterlogged=false.", + "tags": ["decoration", "lantern", "copper", "oxidation", "random-tick", "block-state"], + "minecraftIds": [ + "minecraft:exposed_copper_lantern" , + "minecraft:weathered_copper_lantern", + "minecraft:oxidized_copper_lantern" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 0, 0], + "block": {"id": "minecraft:exposed_copper_lantern", "hanging": true, "waterlogged": false} + } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": {"id": "minecraft:exposed_copper_lantern", "hanging": true, "waterlogged": false} + } + ] + }, + { + "at": 200, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": [ + {"id": "minecraft:weathered_copper_lantern", "hanging": true, "waterlogged": false}, + {"id": "minecraft:oxidized_copper_lantern" , "hanging": true, "waterlogged": false} + ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/lantern_blocks_flowing_water.json b/tests/decoration/lanterns/lantern_blocks_flowing_water.json new file mode 100644 index 0000000..b60c1fd --- /dev/null +++ b/tests/decoration/lanterns/lantern_blocks_flowing_water.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lantern_blocks_flowing_water", + "description": "Flowing water reaching a lantern neither destroys nor waterlogs it: SimpleWaterloggedBlock only accepts water sources, so the flow stops at the lantern and the space behind it stays dry.", + "tags": ["decoration", "lantern", "water", "fluid", "waterlogging", "edge-case"], + "minecraftIds": ["minecraft:lantern", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 1, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [2, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place", + "pos": [1, 1, 0], + "block": {"id": "minecraft:lantern", "hanging": false, "waterlogged": false} + }, + { "at": 2, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:water"} }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:lantern", "hanging": false, "waterlogged": false} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/lantern_center_support_on_fence_and_chain.json b/tests/decoration/lanterns/lantern_center_support_on_fence_and_chain.json new file mode 100644 index 0000000..d241ba7 --- /dev/null +++ b/tests/decoration/lanterns/lantern_center_support_on_fence_and_chain.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lantern_center_support_on_fence_and_chain", + "description": "Lanterns only need center support (Block.canSupportCenter): a survival player can place one standing on a fence post and one hanging under a vertical chain.", + "tags": ["decoration", "lantern", "placement", "support", "block-state", "player"], + "minecraftIds": ["minecraft:lantern", "minecraft:oak_fence", "minecraft:iron_chain"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [4, 3, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:lantern", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:oak_fence" } }, + { "pos": [4, -1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 3, 0], "block": {"id": "minecraft:iron_chain", "axis": "y"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 0, 0.5], "rot": [0, -90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:lantern", "hanging": false, "waterlogged": false} }, + { "pos": [4, 2, 0], "is": {"id": "minecraft:lantern", "hanging": true, "waterlogged": false} } , + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/lantern_destroyed_by_piston.json b/tests/decoration/lanterns/lantern_destroyed_by_piston.json new file mode 100644 index 0000000..6dab46a --- /dev/null +++ b/tests/decoration/lanterns/lantern_destroyed_by_piston.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lantern_destroyed_by_piston", + "description": "Lanterns have PushReaction.DESTROY: an extending piston breaks the lantern in front of it instead of pushing it, drops one lantern item, and extends fully.", + "tags": ["decoration", "lantern", "piston", "push-reaction", "redstone", "drops"], + "minecraftIds": [ + "minecraft:lantern" , "minecraft:piston" , "minecraft:piston_head" , "minecraft:redstone_block", + "minecraft:item" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [12, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [8, 0, 0], [12, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [9, 1, 0] , "block": {"id": "minecraft:piston", "facing": "east", "extended": false} }, + { "pos": [10, 1, 0], "block": {"id": "minecraft:lantern", "hanging": false, "waterlogged": false} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [10, 1, 0], "is": {"id": "minecraft:lantern", "hanging": false, "waterlogged": false} }, + {"is": "minecraft:item", "exists": false} + ] + }, + { "at": 2, "do": "place", "pos": [8, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [9, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": true} } , + { "pos": [10, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east", "type": "normal"} } , + { "pos": [11, 1, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:lantern", "Item.count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/lantern_hanging_breaks_without_ceiling.json b/tests/decoration/lanterns/lantern_hanging_breaks_without_ceiling.json new file mode 100644 index 0000000..09bec0f --- /dev/null +++ b/tests/decoration/lanterns/lantern_hanging_breaks_without_ceiling.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lantern_hanging_breaks_without_ceiling", + "description": "A hanging lantern ignores the removal of a block beside it, but turns to air and drops one lantern item when the block above it is removed (only the connected direction is checked in updateShape).", + "tags": ["decoration", "lantern", "support", "block-update", "drops"], + "minecraftIds": ["minecraft:lantern", "minecraft:stone", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [12, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [12, 2, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [11, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [12, 1, 0], "block": {"id": "minecraft:lantern", "hanging": true, "waterlogged": false} } + ] + }, + { "at": 1, "do": "remove", "pos": [11, 1, 0] }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [12, 1, 0], "is": {"id": "minecraft:lantern", "hanging": true, "waterlogged": false} }, + {"is": "minecraft:item", "exists": false} + ] + }, + { "at": 4, "do": "remove", "pos": [12, 2, 0] }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [12, 1, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:lantern", "Item.count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/lantern_hanging_survival_placement.json b/tests/decoration/lanterns/lantern_hanging_survival_placement.json new file mode 100644 index 0000000..e23f217 --- /dev/null +++ b/tests/decoration/lanterns/lantern_hanging_survival_placement.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lantern_hanging_survival_placement", + "description": "Clicking the bottom face of a ceiling block puts UP first in the nearest looking directions, so the lantern is placed hanging (hanging=true) and the item is consumed.", + "tags": ["decoration", "lantern", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:lantern"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [0, 3, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:lantern", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 3, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:lantern", "hanging": true, "waterlogged": false} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/lantern_placed_in_water_is_waterlogged.json b/tests/decoration/lanterns/lantern_placed_in_water_is_waterlogged.json new file mode 100644 index 0000000..6b1658d --- /dev/null +++ b/tests/decoration/lanterns/lantern_placed_in_water_is_waterlogged.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lantern_placed_in_water_is_waterlogged", + "description": "A lantern placed by a player into a water source block is waterlogged, because getStateForPlacement sets waterlogged from the replaced fluid state.", + "tags": ["decoration", "lantern", "placement", "waterlogging", "water", "block-state", "player"], + "minecraftIds": ["minecraft:lantern", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 1, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:lantern", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:water"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:lantern", "hanging": false, "waterlogged": true} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/lantern_rejects_slab_top_and_fence_gate_bottom.json b/tests/decoration/lanterns/lantern_rejects_slab_top_and_fence_gate_bottom.json new file mode 100644 index 0000000..aa01810 --- /dev/null +++ b/tests/decoration/lanterns/lantern_rejects_slab_top_and_fence_gate_bottom.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lantern_rejects_slab_top_and_fence_gate_bottom", + "description": "A bottom slab has no top face to give center support, and fence gates are in unstable_bottom_center, so a lantern can neither stand on a bottom slab nor hang under a fence gate; both placements fail and no item is used.", + "tags": ["decoration", "lantern", "placement", "support", "player", "edge-case"], + "minecraftIds": ["minecraft:lantern", "minecraft:stone_slab", "minecraft:oak_fence_gate"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [5, 4, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:lantern", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [5, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 3, 0], "block": {"id": "minecraft:oak_fence_gate", "facing": "north", "open": false} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [-90, 28] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone_slab", "type": "bottom"} } , + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} } , + { "pos": [4, 2, 0], "is": {"id": "minecraft:air"} } , + { "pos": [4, 3, 0], "is": {"id": "minecraft:oak_fence_gate", "facing": "north", "open": false} }, + { "slot": "hotbar1", "is": {"id": "minecraft:lantern", "count": 2} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/lantern_side_click_falls_back_to_hanging.json b/tests/decoration/lanterns/lantern_side_click_falls_back_to_hanging.json new file mode 100644 index 0000000..0f273b9 --- /dev/null +++ b/tests/decoration/lanterns/lantern_side_click_falls_back_to_hanging.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lantern_side_click_falls_back_to_hanging", + "description": "Clicking the side of a wall while looking down tries a standing lantern first; with no floor below but a stone ceiling above, getStateForPlacement falls back to the UP direction and places it hanging.", + "tags": ["decoration", "lantern", "placement", "block-state", "player", "edge-case"], + "minecraftIds": ["minecraft:lantern"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, 0], [1, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:lantern", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-3, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [-2, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 2, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-2.5, 1, 0.5], "rot": [-90, 20] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:lantern", "hanging": true, "waterlogged": false} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/lantern_standing_breaks_without_floor.json b/tests/decoration/lanterns/lantern_standing_breaks_without_floor.json new file mode 100644 index 0000000..2b34450 --- /dev/null +++ b/tests/decoration/lanterns/lantern_standing_breaks_without_floor.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lantern_standing_breaks_without_floor", + "description": "A standing lantern turns to air and drops one lantern item when the block under it is removed (updateShape checks canSurvive toward its connected direction).", + "tags": ["decoration", "lantern", "support", "block-update", "drops"], + "minecraftIds": ["minecraft:lantern", "minecraft:stone", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [12, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [12, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [12, 1, 0], "block": {"id": "minecraft:lantern", "hanging": false, "waterlogged": false} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [12, 1, 0], "is": {"id": "minecraft:lantern", "hanging": false, "waterlogged": false} }, + {"is": "minecraft:item", "exists": false} + ] + }, + { "at": 2, "do": "remove", "pos": [12, 0, 0] }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [12, 1, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:lantern", "Item.count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/lantern_standing_survival_placement.json b/tests/decoration/lanterns/lantern_standing_survival_placement.json new file mode 100644 index 0000000..70e1801 --- /dev/null +++ b/tests/decoration/lanterns/lantern_standing_survival_placement.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lantern_standing_survival_placement", + "description": "A survival player clicking the top of a stone block places a standing lantern (hanging=false, waterlogged=false) and consumes the item (LanternBlock.getStateForPlacement tries DOWN first).", + "tags": ["decoration", "lantern", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:lantern"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:lantern", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:lantern", "hanging": false, "waterlogged": false} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/lantern_unsupported_placement_fails.json b/tests/decoration/lanterns/lantern_unsupported_placement_fails.json new file mode 100644 index 0000000..607d2b4 --- /dev/null +++ b/tests/decoration/lanterns/lantern_unsupported_placement_fails.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lantern_unsupported_placement_fails", + "description": "Clicking the side of a wall where the target spot has no block above or below makes getStateForPlacement return null: nothing is placed and the lantern stays in the hotbar.", + "tags": ["decoration", "lantern", "placement", "player", "edge-case"], + "minecraftIds": ["minecraft:lantern"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, 0], [1, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:lantern", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-3, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [-2, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-2.5, 1, 0.5], "rot": [-90, 20] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [0, 0, 0], "is": {"id": "minecraft:air" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:lantern", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/lantern_waterlogged_support_loss_leaves_water.json b/tests/decoration/lanterns/lantern_waterlogged_support_loss_leaves_water.json new file mode 100644 index 0000000..9919b68 --- /dev/null +++ b/tests/decoration/lanterns/lantern_waterlogged_support_loss_leaves_water.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lantern_waterlogged_support_loss_leaves_water", + "description": "A waterlogged hanging lantern that loses its ceiling breaks and leaves a water source behind: updateShape returns air, so updateOrDestroy calls destroyBlock, which places the block's fluid state (water) and drops one lantern item.", + "tags": ["decoration", "lantern", "support", "waterlogging", "water", "drops", "edge-case"], + "minecraftIds": ["minecraft:lantern", "minecraft:water", "minecraft:stone", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [13, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [11, 0, -1], [13, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [12, 2, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [12, 1, 0], "block": {"id": "minecraft:lantern", "hanging": true, "waterlogged": true} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [12, 1, 0], "is": {"id": "minecraft:lantern", "hanging": true, "waterlogged": true} }, + {"is": "minecraft:item", "exists": false} + ] + }, + { "at": 2, "do": "remove", "pos": [12, 2, 0] }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [12, 1, 0], "is": {"id": "minecraft:water", "level": 0} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:lantern", "Item.count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/waxed_copper_lantern_axe_removes_wax.json b/tests/decoration/lanterns/waxed_copper_lantern_axe_removes_wax.json new file mode 100644 index 0000000..b8c108b --- /dev/null +++ b/tests/decoration/lanterns/waxed_copper_lantern_axe_removes_wax.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_copper_lantern_axe_removes_wax", + "description": "Using an axe on a hanging, waterlogged waxed copper lantern removes the wax (HoneycombItem.WAX_OFF_BY_BLOCK) and gives a copper lantern with the same hanging and waterlogged values; the axe is kept.", + "tags": ["decoration", "lantern", "copper", "waxed", "axe", "block-state", "player"], + "minecraftIds": ["minecraft:waxed_copper_lantern", "minecraft:copper_lantern", "minecraft:iron_axe"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -3, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, -3, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": {"id": "minecraft:waxed_copper_lantern", "hanging": true, "waterlogged": true} + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, -2, 0.5], "rot": [0, -90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_lantern", "hanging": true, "waterlogged": true} }, + { "slot": "hotbar1", "is": {"id": "minecraft:iron_axe", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/waxed_copper_lantern_does_not_oxidize.json b/tests/decoration/lanterns/waxed_copper_lantern_does_not_oxidize.json new file mode 100644 index 0000000..123e70b --- /dev/null +++ b/tests/decoration/lanterns/waxed_copper_lantern_does_not_oxidize.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_copper_lantern_does_not_oxidize", + "description": "Waxed copper lanterns are plain LanternBlocks with no random tick, so at random_tick_speed 4096 a waxed copper lantern stays unchanged for 200 ticks while an unwaxed exposed copper lantern next to it oxidizes.", + "tags": ["decoration", "lantern", "copper", "waxed", "oxidation", "random-tick"], + "minecraftIds": [ + "minecraft:waxed_copper_lantern" , + "minecraft:exposed_copper_lantern" , + "minecraft:weathered_copper_lantern", + "minecraft:oxidized_copper_lantern" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [8, 1, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [8, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [0, 1, 0], + "block": {"id": "minecraft:waxed_copper_lantern", "hanging": false, "waterlogged": false} + }, + { + "pos": [8, 1, 0], + "block": {"id": "minecraft:exposed_copper_lantern", "hanging": false, "waterlogged": false} + } + ] + }, + { + "at": 200, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:waxed_copper_lantern", "hanging": false, "waterlogged": false} + }, + { + "pos": [8, 1, 0], + "is": [ + {"id": "minecraft:weathered_copper_lantern", "hanging": false, "waterlogged": false}, + {"id": "minecraft:oxidized_copper_lantern" , "hanging": false, "waterlogged": false} + ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/lanterns/waxed_copper_lantern_rejects_honeycomb.json b/tests/decoration/lanterns/waxed_copper_lantern_rejects_honeycomb.json new file mode 100644 index 0000000..314c21e --- /dev/null +++ b/tests/decoration/lanterns/waxed_copper_lantern_rejects_honeycomb.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_copper_lantern_rejects_honeycomb", + "description": "Using honeycomb on an already waxed copper lantern does nothing (HoneycombItem.getWaxed finds no mapping): the block is unchanged and the honeycomb is not consumed.", + "tags": ["decoration", "lantern", "copper", "waxed", "honeycomb", "player", "edge-case"], + "minecraftIds": ["minecraft:waxed_copper_lantern", "minecraft:honeycomb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": {"id": "minecraft:waxed_copper_lantern", "hanging": false, "waterlogged": false} + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:waxed_copper_lantern", "hanging": false, "waterlogged": false} + }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} }, + { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 1} } + ] + } + ], + "breakpoints": [] +} + From aa6e175736352667f324824f8a50a69c5f64d484 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Tue, 27 Oct 2026 06:53:15 +0100 Subject: [PATCH 24/85] Add Flint tests for copper_ores (2 blocks) --- .../copper_ore_blast_furnace_smelting.json | 75 +++++++++++++++++++ .../copper_ore_furnace_smelting.json | 75 +++++++++++++++++++ .../copper_ore_note_block_instrument.json | 43 +++++++++++ .../copper_ore_pushed_by_piston.json | 53 +++++++++++++ .../copper_ore_sticky_piston_pull.json | 59 +++++++++++++++ .../copper_ore_survival_placement.json | 35 +++++++++ 6 files changed, 340 insertions(+) create mode 100644 tests/world/copper_ore/copper_ore_blast_furnace_smelting.json create mode 100644 tests/world/copper_ore/copper_ore_furnace_smelting.json create mode 100644 tests/world/copper_ore/copper_ore_note_block_instrument.json create mode 100644 tests/world/copper_ore/copper_ore_pushed_by_piston.json create mode 100644 tests/world/copper_ore/copper_ore_sticky_piston_pull.json create mode 100644 tests/world/copper_ore/copper_ore_survival_placement.json diff --git a/tests/world/copper_ore/copper_ore_blast_furnace_smelting.json b/tests/world/copper_ore/copper_ore_blast_furnace_smelting.json new file mode 100644 index 0000000..889246b --- /dev/null +++ b/tests/world/copper_ore/copper_ore_blast_furnace_smelting.json @@ -0,0 +1,75 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_ore_blast_furnace_smelting", + "description": "Copper ore in a blast furnace burns coal for 800 ticks (twice as fast as a furnace), and one that finishes cooking consumes the ore, outputs one copper ingot and resets its cooking time to 100 ticks.", + "tags": ["copper_ore", "smelting", "blast_furnace", "block-entity"], + "minecraftIds": ["minecraft:copper_ore", "minecraft:blast_furnace", "minecraft:coal", "minecraft:copper_ingot"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [0, 0, 0], + "block": { + "id": "minecraft:blast_furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:copper_ore\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}]" + } + } + }, + { + "pos": [2, 0, 0], + "block": { + "id": "minecraft:blast_furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:copper_ore\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}]", + "cooking_time_spent": "90s", + "cooking_total_time": "100s" + } + } + } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:blast_furnace", + "lit": "true", + "nbt": {"lit_total_time": "800s", "Items[0].id": "\"minecraft:copper_ore\""} + } + } + ] + }, + { + "at": 20, + "do": "assert", + "checks": [ + { + "pos": [2, 0, 0], + "is": { + "id": "minecraft:blast_furnace", + "nbt": { + "Items[0].id" : "\"minecraft:copper_ingot\"", + "Items[0].count" : "1" , + "cooking_total_time": "100s" + } + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/copper_ore/copper_ore_furnace_smelting.json b/tests/world/copper_ore/copper_ore_furnace_smelting.json new file mode 100644 index 0000000..c7adad2 --- /dev/null +++ b/tests/world/copper_ore/copper_ore_furnace_smelting.json @@ -0,0 +1,75 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_ore_furnace_smelting", + "description": "Copper ore in a furnace burns coal for 1600 ticks, and one that finishes cooking consumes the ore, outputs one copper ingot and resets its cooking time to 200 ticks.", + "tags": ["copper_ore", "smelting", "furnace", "block-entity"], + "minecraftIds": ["minecraft:copper_ore", "minecraft:furnace", "minecraft:coal", "minecraft:copper_ingot"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:copper_ore\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}]" + } + } + }, + { + "pos": [2, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:copper_ore\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}]", + "cooking_time_spent": "190s", + "cooking_total_time": "200s" + } + } + } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "true", + "nbt": {"lit_total_time": "1600s", "Items[0].id": "\"minecraft:copper_ore\""} + } + } + ] + }, + { + "at": 20, + "do": "assert", + "checks": [ + { + "pos": [2, 0, 0], + "is": { + "id": "minecraft:furnace", + "nbt": { + "Items[0].id" : "\"minecraft:copper_ingot\"", + "Items[0].count" : "1" , + "cooking_total_time": "200s" + } + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/copper_ore/copper_ore_note_block_instrument.json b/tests/world/copper_ore/copper_ore_note_block_instrument.json new file mode 100644 index 0000000..70c33fb --- /dev/null +++ b/tests/world/copper_ore/copper_ore_note_block_instrument.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_ore_note_block_instrument", + "description": "A note block above dirt plays harp, switches to basedrum when the dirt is replaced by copper ore, and returns to harp when dirt is placed again.", + "tags": ["copper_ore", "note_block", "instrument"], + "minecraftIds": ["minecraft:copper_ore", "minecraft:note_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt"} }, + { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:note_block"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:note_block", "instrument": "harp"} } + ] + }, + { "at": 3, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:copper_ore"} }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:note_block", "instrument": "basedrum"} } + ] + }, + { "at": 5, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt"} }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:note_block", "instrument": "harp"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/copper_ore/copper_ore_pushed_by_piston.json b/tests/world/copper_ore/copper_ore_pushed_by_piston.json new file mode 100644 index 0000000..dc65ea5 --- /dev/null +++ b/tests/world/copper_ore/copper_ore_pushed_by_piston.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_ore_pushed_by_piston", + "description": "An extending piston pushes copper ore one block forward instead of destroying it, and a copper ore beside the piston arm is left alone.", + "tags": ["copper_ore", "piston", "push-reaction", "redstone"], + "minecraftIds": ["minecraft:copper_ore", "minecraft:piston", "minecraft:piston_head", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [3, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-1, 1, 0], "block": {"id": "minecraft:piston" , "facing": "east", "extended": "false"} }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:copper_ore" } }, + { "pos": [-1, 2, 1], "block": {"id": "minecraft:copper_ore" } } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [-1, 1, 0], "is": {"id": "minecraft:piston" , "facing": "east", "extended": "false"} }, + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:copper_ore" } }, + { "pos": [ 1, 1, 0], "is": {"id": "minecraft:air" } } + ] + }, + { "at": 2, "do": "place", "pos": [-2, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [-1, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": "true"} }, + { "pos": [0, 1, 0] , "is": {"id": "minecraft:piston_head", "facing": "east", "type": "normal"} }, + { "pos": [1, 1, 0] , "is": {"id": "minecraft:copper_ore"} }, + { "pos": [-1, 2, 1], "is": {"id": "minecraft:copper_ore"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/copper_ore/copper_ore_sticky_piston_pull.json b/tests/world/copper_ore/copper_ore_sticky_piston_pull.json new file mode 100644 index 0000000..1174dae --- /dev/null +++ b/tests/world/copper_ore/copper_ore_sticky_piston_pull.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_ore_sticky_piston_pull", + "description": "A sticky piston pushes copper ore out ahead of it when powered and pulls it back when power is removed.", + "tags": ["copper_ore", "sticky_piston", "push-reaction", "redstone"], + "minecraftIds": [ + "minecraft:copper_ore" , "minecraft:sticky_piston" , "minecraft:piston_head" , "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [3, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [-1, 1, 0], + "block": {"id": "minecraft:sticky_piston", "facing": "east", "extended": "false"} + }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_ore"} } + ] + }, + { "at": 1, "do": "place", "pos": [-2, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [-1, 1, 0], "is": {"id": "minecraft:sticky_piston", "facing": "east", "extended": "true"} }, + { "pos": [0, 1, 0] , "is": {"id": "minecraft:piston_head", "facing": "east", "type": "sticky"} }, + { "pos": [1, 1, 0] , "is": {"id": "minecraft:copper_ore"} }, + { "pos": [2, 1, 0] , "is": {"id": "minecraft:air"} } + ] + }, + { "at": 9, "do": "remove", "pos": [-2, 1, 0] }, + { + "at": 16, + "do": "assert", + "checks": [ + { "pos": [-1, 1, 0], "is": {"id": "minecraft:sticky_piston", "facing": "east", "extended": "false"} }, + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:copper_ore" } }, + { "pos": [ 1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [ 2, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/copper_ore/copper_ore_survival_placement.json b/tests/world/copper_ore/copper_ore_survival_placement.json new file mode 100644 index 0000000..59dbb46 --- /dev/null +++ b/tests/world/copper_ore/copper_ore_survival_placement.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "copper_ore_survival_placement", + "description": "A survival player using a copper ore item on the top face of stone places a copper ore block above it and consumes the item.", + "tags": ["copper_ore", "placement", "player"], + "minecraftIds": ["minecraft:copper_ore"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:copper_ore", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:copper_ore"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + From 2ee2de8d23732b3dbc26ea06c9f7d856b14180ad Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Tue, 27 Oct 2026 07:03:46 +0100 Subject: [PATCH 25/85] Add Flint tests for shovels (7 blocks) --- .../shovel_breaks_after_32_flattens.json | 111 +++++++++++++++ ...l_creative_flatten_uses_no_durability.json | 127 ++++++++++++++++++ ...shovel_does_nothing_in_adventure_mode.json | 34 +++++ ...xtinguishes_campfire_with_block_above.json | 66 +++++++++ ...shovel_failed_uses_cost_no_durability.json | 117 ++++++++++++++++ ...hovel_flattens_all_flattenable_blocks.json | 59 ++++++++ .../shovel_flattens_from_side_face.json | 40 ++++++ .../shovel/shovel_flattens_grass_block.json | 34 +++++ .../shovel/shovel_ignores_bottom_face.json | 41 ++++++ .../shovel_ignores_dirt_with_block_above.json | 48 +++++++ .../shovel_ignores_grass_with_snow_above.json | 42 ++++++ .../shovel_ignores_unflattenable_blocks.json | 56 ++++++++ .../shovel/shovel_ignores_unlit_campfire.json | 59 ++++++++ 13 files changed, 834 insertions(+) create mode 100644 tests/items/shovel/shovel_breaks_after_32_flattens.json create mode 100644 tests/items/shovel/shovel_creative_flatten_uses_no_durability.json create mode 100644 tests/items/shovel/shovel_does_nothing_in_adventure_mode.json create mode 100644 tests/items/shovel/shovel_extinguishes_campfire_with_block_above.json create mode 100644 tests/items/shovel/shovel_failed_uses_cost_no_durability.json create mode 100644 tests/items/shovel/shovel_flattens_all_flattenable_blocks.json create mode 100644 tests/items/shovel/shovel_flattens_from_side_face.json create mode 100644 tests/items/shovel/shovel_flattens_grass_block.json create mode 100644 tests/items/shovel/shovel_ignores_bottom_face.json create mode 100644 tests/items/shovel/shovel_ignores_dirt_with_block_above.json create mode 100644 tests/items/shovel/shovel_ignores_grass_with_snow_above.json create mode 100644 tests/items/shovel/shovel_ignores_unflattenable_blocks.json create mode 100644 tests/items/shovel/shovel_ignores_unlit_campfire.json diff --git a/tests/items/shovel/shovel_breaks_after_32_flattens.json b/tests/items/shovel/shovel_breaks_after_32_flattens.json new file mode 100644 index 0000000..e32dd11 --- /dev/null +++ b/tests/items/shovel/shovel_breaks_after_32_flattens.json @@ -0,0 +1,111 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "shovel_breaks_after_32_flattens", + "description": "A fresh survival golden shovel (32 durability) survives 31 flattens and breaks on the 32nd: ShovelItem.useOn calls hurtAndBreak(1) per flatten and the hotbar slot becomes empty.", + "tags": ["item", "shovel", "durability", "player"], + "minecraftIds": ["minecraft:golden_shovel", "minecraft:dirt", "minecraft:dirt_path"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -3], [2, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [2, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [1, 2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 0] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 9, "do": "interact"}, + { "at": 10, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 11, "do": "interact"}, + { "at": 12, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 13, "do": "interact"}, + { "at": 14, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 15, "do": "interact"}, + { "at": 16, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 17, "do": "interact"}, + { "at": 18, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 19, "do": "interact"}, + { "at": 20, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 21, "do": "interact"}, + { "at": 22, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 23, "do": "interact"}, + { "at": 24, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 25, "do": "interact"}, + { "at": 26, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 27, "do": "interact"}, + { "at": 28, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 29, "do": "interact"}, + { "at": 30, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 31, "do": "interact"}, + { "at": 32, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 33, "do": "interact"}, + { "at": 34, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 35, "do": "interact"}, + { "at": 36, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 37, "do": "interact"}, + { "at": 38, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 39, "do": "interact"}, + { "at": 40, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 41, "do": "interact"}, + { "at": 42, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 43, "do": "interact"}, + { "at": 44, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 45, "do": "interact"}, + { "at": 46, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 47, "do": "interact"}, + { "at": 48, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 49, "do": "interact"}, + { "at": 50, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 51, "do": "interact"}, + { "at": 52, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 53, "do": "interact"}, + { "at": 54, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 55, "do": "interact"}, + { "at": 56, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 57, "do": "interact"}, + { "at": 58, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 59, "do": "interact"}, + { "at": 60, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 61, "do": "interact"}, + { "at": 62, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 63, "do": "interact"}, + { + "at": 64, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt_path" } }, + { "is": {"id": "minecraft:golden_shovel", "count": 1}, "slot": "hotbar1" } + ] + }, + { "at": 64, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 65, "do": "interact"}, + { + "at": 67, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt_path"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/shovel/shovel_creative_flatten_uses_no_durability.json b/tests/items/shovel/shovel_creative_flatten_uses_no_durability.json new file mode 100644 index 0000000..8021f93 --- /dev/null +++ b/tests/items/shovel/shovel_creative_flatten_uses_no_durability.json @@ -0,0 +1,127 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "shovel_creative_flatten_uses_no_durability", + "description": "A creative-mode golden shovel (32 durability) keeps working through 40 flattens and stays in the hotbar, because ItemStack.hurtAndBreak skips damage for players with infinite materials.", + "tags": ["item", "shovel", "durability", "creative", "player"], + "minecraftIds": ["minecraft:golden_shovel", "minecraft:dirt", "minecraft:dirt_path"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -3], [2, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [2, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [1, 2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 0] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 9, "do": "interact"}, + { "at": 10, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 11, "do": "interact"}, + { "at": 12, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 13, "do": "interact"}, + { "at": 14, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 15, "do": "interact"}, + { "at": 16, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 17, "do": "interact"}, + { "at": 18, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 19, "do": "interact"}, + { "at": 20, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 21, "do": "interact"}, + { "at": 22, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 23, "do": "interact"}, + { "at": 24, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 25, "do": "interact"}, + { "at": 26, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 27, "do": "interact"}, + { "at": 28, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 29, "do": "interact"}, + { "at": 30, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 31, "do": "interact"}, + { "at": 32, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 33, "do": "interact"}, + { "at": 34, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 35, "do": "interact"}, + { "at": 36, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 37, "do": "interact"}, + { "at": 38, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 39, "do": "interact"}, + { "at": 40, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 41, "do": "interact"}, + { "at": 42, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 43, "do": "interact"}, + { "at": 44, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 45, "do": "interact"}, + { "at": 46, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 47, "do": "interact"}, + { "at": 48, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 49, "do": "interact"}, + { "at": 50, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 51, "do": "interact"}, + { "at": 52, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 53, "do": "interact"}, + { "at": 54, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 55, "do": "interact"}, + { "at": 56, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 57, "do": "interact"}, + { "at": 58, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 59, "do": "interact"}, + { "at": 60, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 61, "do": "interact"}, + { "at": 62, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 63, "do": "interact"}, + { "at": 64, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 65, "do": "interact"}, + { "at": 66, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 67, "do": "interact"}, + { + "at": 68, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt_path" } }, + { "is": {"id": "minecraft:golden_shovel", "count": 1}, "slot": "hotbar1" } + ] + }, + { "at": 68, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 69, "do": "interact"}, + { "at": 70, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 71, "do": "interact"}, + { "at": 72, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 73, "do": "interact"}, + { "at": 74, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 75, "do": "interact"}, + { "at": 76, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 77, "do": "interact"}, + { "at": 78, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 79, "do": "interact"}, + { "at": 80, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 81, "do": "interact"}, + { + "at": 83, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt_path" } }, + { "is": {"id": "minecraft:golden_shovel", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/shovel/shovel_does_nothing_in_adventure_mode.json b/tests/items/shovel/shovel_does_nothing_in_adventure_mode.json new file mode 100644 index 0000000..f388cc0 --- /dev/null +++ b/tests/items/shovel/shovel_does_nothing_in_adventure_mode.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "shovel_does_nothing_in_adventure_mode", + "description": "An adventure-mode golden shovel used on grass does nothing: ItemStack.useOn returns PASS when the player may not build and the item has no can_place_on component.", + "tags": ["item", "shovel", "flatten", "adventure", "edge-case", "player"], + "minecraftIds": ["minecraft:golden_shovel", "minecraft:grass_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Adventure" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block" } }, + { "is": {"id": "minecraft:golden_shovel", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/shovel/shovel_extinguishes_campfire_with_block_above.json b/tests/items/shovel/shovel_extinguishes_campfire_with_block_above.json new file mode 100644 index 0000000..81aa5cf --- /dev/null +++ b/tests/items/shovel/shovel_extinguishes_campfire_with_block_above.json @@ -0,0 +1,66 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "shovel_extinguishes_campfire_with_block_above", + "description": "A survival golden shovel used on the side of a lit campfire with stone directly above still puts it out, because the campfire branch of ShovelItem.useOn does not check the block above (unlike the flatten branch).", + "tags": ["item", "shovel", "campfire", "edge-case", "player"], + "minecraftIds": ["minecraft:golden_shovel", "minecraft:campfire", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -3], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [0, 2, 0], + "block": { + "id": "minecraft:campfire", + "lit": true, + "waterlogged": false, + "signal_fire": false, + "facing": "north" + } + }, + { "pos": [0, 3, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 10] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:campfire", + "lit": false, + "waterlogged": false, + "signal_fire": false, + "facing": "north" + } + }, + { "pos": [0, 3, 0], "is": {"id": "minecraft:stone"} }, + { "slot": "hotbar1", "is": {"id": "minecraft:golden_shovel", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/shovel/shovel_failed_uses_cost_no_durability.json b/tests/items/shovel/shovel_failed_uses_cost_no_durability.json new file mode 100644 index 0000000..065fc93 --- /dev/null +++ b/tests/items/shovel/shovel_failed_uses_cost_no_durability.json @@ -0,0 +1,117 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "shovel_failed_uses_cost_no_durability", + "description": "Uses that do nothing (golden shovel on stone) do not damage a survival shovel: after 5 no-op uses it still survives 31 flattens and breaks only on the 32nd, so hurtAndBreak only runs on success.", + "tags": ["item", "shovel", "durability", "edge-case", "player"], + "minecraftIds": ["minecraft:golden_shovel", "minecraft:dirt", "minecraft:dirt_path"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -3], [2, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [2, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [1, 2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [1.5, 1, -2.5], "rot": [0, 0] }, + {"at": 3, "do": "interact"}, + {"at": 4, "do": "interact"}, + {"at": 5, "do": "interact"}, + {"at": 6, "do": "interact"}, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 0] }, + {"at": 9, "do": "interact"}, + { "at": 10, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 11, "do": "interact"}, + { "at": 12, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 13, "do": "interact"}, + { "at": 14, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 15, "do": "interact"}, + { "at": 16, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 17, "do": "interact"}, + { "at": 18, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 19, "do": "interact"}, + { "at": 20, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 21, "do": "interact"}, + { "at": 22, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 23, "do": "interact"}, + { "at": 24, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 25, "do": "interact"}, + { "at": 26, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 27, "do": "interact"}, + { "at": 28, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 29, "do": "interact"}, + { "at": 30, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 31, "do": "interact"}, + { "at": 32, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 33, "do": "interact"}, + { "at": 34, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 35, "do": "interact"}, + { "at": 36, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 37, "do": "interact"}, + { "at": 38, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 39, "do": "interact"}, + { "at": 40, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 41, "do": "interact"}, + { "at": 42, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 43, "do": "interact"}, + { "at": 44, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 45, "do": "interact"}, + { "at": 46, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 47, "do": "interact"}, + { "at": 48, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 49, "do": "interact"}, + { "at": 50, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 51, "do": "interact"}, + { "at": 52, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 53, "do": "interact"}, + { "at": 54, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 55, "do": "interact"}, + { "at": 56, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 57, "do": "interact"}, + { "at": 58, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 59, "do": "interact"}, + { "at": 60, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 61, "do": "interact"}, + { "at": 62, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 63, "do": "interact"}, + { "at": 64, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 65, "do": "interact"}, + { "at": 66, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 67, "do": "interact"}, + { "at": 68, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 69, "do": "interact"}, + { + "at": 70, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt_path" } }, + { "is": {"id": "minecraft:golden_shovel", "count": 1}, "slot": "hotbar1" } + ] + }, + { "at": 70, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + {"at": 71, "do": "interact"}, + { + "at": 73, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt_path"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/shovel/shovel_flattens_all_flattenable_blocks.json b/tests/items/shovel/shovel_flattens_all_flattenable_blocks.json new file mode 100644 index 0000000..ba7451a --- /dev/null +++ b/tests/items/shovel/shovel_flattens_all_flattenable_blocks.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "shovel_flattens_all_flattenable_blocks", + "description": "A survival golden shovel flattens every block in ShovelItem.FLATTENABLES that is not grass: dirt, podzol, coarse dirt, mycelium and rooted dirt all become dirt paths.", + "tags": ["item", "shovel", "flatten", "player"], + "minecraftIds": [ + "minecraft:golden_shovel", "minecraft:dirt" , "minecraft:podzol" , "minecraft:coarse_dirt" , + "minecraft:mycelium" , "minecraft:rooted_dirt" , "minecraft:dirt_path" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:podzol" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:coarse_dirt"} }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:mycelium" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:rooted_dirt"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [1.5, 3, 0.5], "rot": [0, 90] }, + {"at": 4, "do": "interact"}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [2.5, 3, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [3.5, 3, 0.5], "rot": [0, 90] }, + {"at": 8, "do": "interact"}, + { "at": 9, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, + {"at": 10, "do": "interact"}, + { + "at": 11, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt_path" } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:dirt_path" } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:dirt_path" } }, + { "pos": [3, 0, 0], "is": {"id": "minecraft:dirt_path" } }, + { "pos": [4, 0, 0], "is": {"id": "minecraft:dirt_path" } }, + { "is": {"id": "minecraft:golden_shovel", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/shovel/shovel_flattens_from_side_face.json b/tests/items/shovel/shovel_flattens_from_side_face.json new file mode 100644 index 0000000..b1e2cee --- /dev/null +++ b/tests/items/shovel/shovel_flattens_from_side_face.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "shovel_flattens_from_side_face", + "description": "A survival golden shovel used on the north face of a dirt block with air above still makes a dirt path, because ShovelItem.useOn only rejects the DOWN face.", + "tags": ["item", "shovel", "flatten", "edge-case", "player"], + "minecraftIds": ["minecraft:golden_shovel", "minecraft:dirt", "minecraft:dirt_path"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -3], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt_path" } }, + { "is": {"id": "minecraft:golden_shovel", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/shovel/shovel_flattens_grass_block.json b/tests/items/shovel/shovel_flattens_grass_block.json new file mode 100644 index 0000000..8cf2981 --- /dev/null +++ b/tests/items/shovel/shovel_flattens_grass_block.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "shovel_flattens_grass_block", + "description": "A survival golden shovel used on the top of a grass block with air above turns it into a dirt path (ShovelItem.useOn via FLATTENABLES) and the shovel stays in the hotbar.", + "tags": ["item", "shovel", "flatten", "player"], + "minecraftIds": ["minecraft:golden_shovel", "minecraft:grass_block", "minecraft:dirt_path"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt_path" } }, + { "is": {"id": "minecraft:golden_shovel", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/shovel/shovel_ignores_bottom_face.json b/tests/items/shovel/shovel_ignores_bottom_face.json new file mode 100644 index 0000000..b7931e9 --- /dev/null +++ b/tests/items/shovel/shovel_ignores_bottom_face.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "shovel_ignores_bottom_face", + "description": "A survival golden shovel used on the bottom face of a floating dirt block does nothing, because ShovelItem.useOn returns PASS for a clicked face of DOWN.", + "tags": ["item", "shovel", "flatten", "edge-case", "player"], + "minecraftIds": ["minecraft:golden_shovel", "minecraft:dirt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:dirt" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt" } }, + { "is": {"id": "minecraft:golden_shovel", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/shovel/shovel_ignores_dirt_with_block_above.json b/tests/items/shovel/shovel_ignores_dirt_with_block_above.json new file mode 100644 index 0000000..9e934b3 --- /dev/null +++ b/tests/items/shovel/shovel_ignores_dirt_with_block_above.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "shovel_ignores_dirt_with_block_above", + "description": "A survival golden shovel used on the side of a dirt block with stone directly above does nothing, because ShovelItem.useOn requires air above the flattened block.", + "tags": ["item", "shovel", "flatten", "edge-case", "player"], + "minecraftIds": ["minecraft:golden_shovel", "minecraft:dirt", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -3], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 2, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [0, 3, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [0, 3, 0], "is": {"id": "minecraft:stone" } }, + { "is": {"id": "minecraft:golden_shovel", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/shovel/shovel_ignores_grass_with_snow_above.json b/tests/items/shovel/shovel_ignores_grass_with_snow_above.json new file mode 100644 index 0000000..2896e37 --- /dev/null +++ b/tests/items/shovel/shovel_ignores_grass_with_snow_above.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "shovel_ignores_grass_with_snow_above", + "description": "A survival golden shovel used on the side of a grass block with a snow layer above does nothing, because the block above is not air even though snow is not a full block.", + "tags": ["item", "shovel", "flatten", "edge-case", "player"], + "minecraftIds": ["minecraft:golden_shovel", "minecraft:grass_block", "minecraft:snow"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -3], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 0, "do": "place", "pos": [0, 3, 0], "block": {"id": "minecraft:snow", "layers": 1} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:grass_block"} }, + { "pos": [0, 3, 0], "is": {"id": "minecraft:snow", "layers": 1} }, + { "is": {"id": "minecraft:golden_shovel", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/shovel/shovel_ignores_unflattenable_blocks.json b/tests/items/shovel/shovel_ignores_unflattenable_blocks.json new file mode 100644 index 0000000..890ae95 --- /dev/null +++ b/tests/items/shovel/shovel_ignores_unflattenable_blocks.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "shovel_ignores_unflattenable_blocks", + "description": "A survival golden shovel used on the top of stone, sand, farmland and an existing dirt path changes none of them, because they are not in ShovelItem.FLATTENABLES.", + "tags": ["item", "shovel", "flatten", "edge-case", "player"], + "minecraftIds": [ + "minecraft:golden_shovel", "minecraft:stone" , "minecraft:sand" , "minecraft:farmland" , + "minecraft:dirt_path" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [3, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, -1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:sand" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:farmland" , "moisture": 0} }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:dirt_path" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [1.5, 3, 0.5], "rot": [0, 90] }, + {"at": 4, "do": "interact"}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [2.5, 3, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [3.5, 3, 0.5], "rot": [0, 90] }, + {"at": 8, "do": "interact"}, + { + "at": 9, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:sand" } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:farmland" } }, + { "pos": [3, 0, 0], "is": {"id": "minecraft:dirt_path" } }, + { "is": {"id": "minecraft:golden_shovel", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/shovel/shovel_ignores_unlit_campfire.json b/tests/items/shovel/shovel_ignores_unlit_campfire.json new file mode 100644 index 0000000..296c561 --- /dev/null +++ b/tests/items/shovel/shovel_ignores_unlit_campfire.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "shovel_ignores_unlit_campfire", + "description": "A survival golden shovel used on the top of an unlit campfire changes nothing, because the campfire branch of ShovelItem.useOn requires lit=true.", + "tags": ["item", "shovel", "campfire", "edge-case", "player"], + "minecraftIds": ["minecraft:golden_shovel", "minecraft:campfire"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:campfire", + "lit": false, + "waterlogged": false, + "signal_fire": false, + "facing": "north" + } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:campfire", + "lit": false, + "waterlogged": false, + "signal_fire": false, + "facing": "north" + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:golden_shovel", "count": 1} } + ] + } + ], + "breakpoints": [] +} + From 2831552c5e0a5370a9750ad3708743998bfe2e03 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Wed, 28 Oct 2026 05:06:52 +0100 Subject: [PATCH 26/85] Add Flint tests for copper_torch (1 blocks) --- .../copper_torch_destroyed_by_piston.json | 60 ++++++++++++++++ .../copper_torch_floor_placement.json | 35 +++++++++ ...r_torch_floor_support_loss_drops_item.json | 44 ++++++++++++ .../copper_torch_forces_wall_post.json | 71 +++++++++++++++++++ .../copper_torch_not_placed_on_ceiling.json | 36 ++++++++++ .../copper_torch_not_placed_on_leaves.json | 44 ++++++++++++ .../copper_torch_on_wall_and_fence_posts.json | 44 ++++++++++++ ...opper_torch_wall_placement_four_sides.json | 51 +++++++++++++ .../copper_torch_washed_away_by_water.json | 68 ++++++++++++++++++ ...l_torch_removed_when_support_replaced.json | 45 ++++++++++++ ...l_torch_support_loss_drops_torch_item.json | 49 +++++++++++++ ...h_survives_unrelated_neighbor_changes.json | 56 +++++++++++++++ 12 files changed, 603 insertions(+) create mode 100644 tests/decoration/copper_torches/copper_torch_destroyed_by_piston.json create mode 100644 tests/decoration/copper_torches/copper_torch_floor_placement.json create mode 100644 tests/decoration/copper_torches/copper_torch_floor_support_loss_drops_item.json create mode 100644 tests/decoration/copper_torches/copper_torch_forces_wall_post.json create mode 100644 tests/decoration/copper_torches/copper_torch_not_placed_on_ceiling.json create mode 100644 tests/decoration/copper_torches/copper_torch_not_placed_on_leaves.json create mode 100644 tests/decoration/copper_torches/copper_torch_on_wall_and_fence_posts.json create mode 100644 tests/decoration/copper_torches/copper_torch_wall_placement_four_sides.json create mode 100644 tests/decoration/copper_torches/copper_torch_washed_away_by_water.json create mode 100644 tests/decoration/copper_torches/copper_wall_torch_removed_when_support_replaced.json create mode 100644 tests/decoration/copper_torches/copper_wall_torch_support_loss_drops_torch_item.json create mode 100644 tests/decoration/copper_torches/copper_wall_torch_survives_unrelated_neighbor_changes.json diff --git a/tests/decoration/copper_torches/copper_torch_destroyed_by_piston.json b/tests/decoration/copper_torches/copper_torch_destroyed_by_piston.json new file mode 100644 index 0000000..deead89 --- /dev/null +++ b/tests/decoration/copper_torches/copper_torch_destroyed_by_piston.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_torch_destroyed_by_piston", + "description": "An extending piston destroys a standing copper torch and a copper wall torch in front of it instead of pushing them, and extends fully.", + "tags": ["decoration", "copper_torch", "piston", "push-reaction", "redstone"], + "minecraftIds": [ + "minecraft:copper_torch" , "minecraft:copper_wall_torch", "minecraft:piston" , + "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [9, 2, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [5, 0, 0], [9, 0, 4] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [8, 1, 4], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [7, 1, 0], "block": {"id": "minecraft:piston", "facing": "east", "extended": "false"} }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:copper_torch"} }, + { "pos": [7, 1, 3], "block": {"id": "minecraft:piston", "facing": "east", "extended": "false"} }, + { "pos": [8, 1, 3], "block": {"id": "minecraft:copper_wall_torch", "facing": "north"} } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [8, 1, 0], "is": {"id": "minecraft:copper_torch" } }, + { "pos": [8, 1, 3], "is": {"id": "minecraft:copper_wall_torch", "facing": "north"} } + ] + }, + { "at": 4, "do": "place", "pos": [6, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { "at": 4, "do": "place", "pos": [6, 1, 3], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [7, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": "true"} }, + { "pos": [8, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east", "type": "normal"} }, + { "pos": [9, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [7, 1, 3], "is": {"id": "minecraft:piston", "facing": "east", "extended": "true"} }, + { "pos": [8, 1, 3], "is": {"id": "minecraft:piston_head", "facing": "east", "type": "normal"} }, + { "pos": [9, 1, 3], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_torches/copper_torch_floor_placement.json b/tests/decoration/copper_torches/copper_torch_floor_placement.json new file mode 100644 index 0000000..d3f2c48 --- /dev/null +++ b/tests/decoration/copper_torches/copper_torch_floor_placement.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_torch_floor_placement", + "description": "A survival player using a copper torch on the top of stone places a standing copper torch above it and consumes the item.", + "tags": ["decoration", "copper_torch", "placement", "player"], + "minecraftIds": ["minecraft:copper_torch", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:copper_torch", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:copper_torch" } }, + { "is": {"id": "minecraft:air" , "count": 0}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_torches/copper_torch_floor_support_loss_drops_item.json b/tests/decoration/copper_torches/copper_torch_floor_support_loss_drops_item.json new file mode 100644 index 0000000..e76d14a --- /dev/null +++ b/tests/decoration/copper_torches/copper_torch_floor_support_loss_drops_item.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_torch_floor_support_loss_drops_item", + "description": "Removing the block under a standing copper torch turns the torch into air and drops a copper torch item.", + "tags": ["decoration", "copper_torch", "support", "neighbor-update", "drops"], + "minecraftIds": ["minecraft:copper_torch", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [9, 3, 1] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [8, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "place", "pos": [8, 2, 0], "block": {"id": "minecraft:copper_torch"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [8, 2, 0], "is": {"id": "minecraft:copper_torch"} } + ] + }, + { "at": 4, "do": "remove", "pos": [8, 1, 0] }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [8, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [8, 2, 0], "is": {"id": "minecraft:air"} }, + { + "is": "minecraft:item", + "exists": true, + "count": 1, + "pos": [8.5, 2.2, 0.5], + "position_tolerance": 1.5, + "Item.id": "minecraft:copper_torch" + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_torches/copper_torch_forces_wall_post.json b/tests/decoration/copper_torches/copper_torch_forces_wall_post.json new file mode 100644 index 0000000..ba4e2e4 --- /dev/null +++ b/tests/decoration/copper_torches/copper_torch_forces_wall_post.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_torch_forces_wall_post", + "description": "A copper torch on top of the middle of a straight cobblestone wall run raises the wall post, while a run with nothing on top has no post.", + "tags": ["decoration", "copper_torch", "connectible", "wall", "block-state"], + "minecraftIds": ["minecraft:copper_torch", "minecraft:cobblestone_wall"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 3, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [2, 1, 0] ], + "with": {"id": "minecraft:cobblestone_wall"} + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 1, 3], [2, 1, 3] ], + "with": {"id": "minecraft:cobblestone_wall"} + }, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [1, 1, 0], + "is": { + "id" : "minecraft:cobblestone_wall", + "up" : "false" , + "east" : "low" , + "west" : "low" , + "north": "none" , + "south": "none" + } + }, + { + "pos": [1, 1, 3], + "is": { + "id" : "minecraft:cobblestone_wall", + "up" : "false" , + "east" : "low" , + "west" : "low" , + "north": "none" , + "south": "none" + } + } + ] + }, + { "at": 3, "do": "place", "pos": [1, 2, 3], "block": {"id": "minecraft:copper_torch"} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:cobblestone_wall", "up": "false"} }, + { + "pos": [1, 1, 3], + "is": {"id": "minecraft:cobblestone_wall", "up": "true", "east": "low", "west": "low"} + }, + { "pos": [1, 2, 3], "is": {"id": "minecraft:copper_torch"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_torches/copper_torch_not_placed_on_ceiling.json b/tests/decoration/copper_torches/copper_torch_not_placed_on_ceiling.json new file mode 100644 index 0000000..bff4fbe --- /dev/null +++ b/tests/decoration/copper_torches/copper_torch_not_placed_on_ceiling.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_torch_not_placed_on_ceiling", + "description": "Using a copper torch on the underside of a block places nothing because a torch cannot hang from a ceiling, and the item is not consumed.", + "tags": ["decoration", "copper_torch", "placement", "support", "player"], + "minecraftIds": ["minecraft:copper_torch", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:copper_torch", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, -2, 0.5], "rot": [0, -90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:copper_torch", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_torches/copper_torch_not_placed_on_leaves.json b/tests/decoration/copper_torches/copper_torch_not_placed_on_leaves.json new file mode 100644 index 0000000..eb169c7 --- /dev/null +++ b/tests/decoration/copper_torches/copper_torch_not_placed_on_leaves.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_torch_not_placed_on_leaves", + "description": "A copper torch cannot be placed on top of oak leaves because leaves cannot support its center, so nothing is placed or consumed, while the same torch is placed on stone.", + "tags": ["decoration", "copper_torch", "support", "placement", "player"], + "minecraftIds": ["minecraft:copper_torch", "minecraft:oak_leaves", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:copper_torch", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:oak_leaves", "persistent": true} }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:stone" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 4, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, + { "pos": [3, 2, 0], "is": {"id": "minecraft:copper_torch" } }, + { "is": {"id": "minecraft:copper_torch", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_torches/copper_torch_on_wall_and_fence_posts.json b/tests/decoration/copper_torches/copper_torch_on_wall_and_fence_posts.json new file mode 100644 index 0000000..317888e --- /dev/null +++ b/tests/decoration/copper_torches/copper_torch_on_wall_and_fence_posts.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_torch_on_wall_and_fence_posts", + "description": "A copper torch can be placed on top of a cobblestone wall post and an oak fence post, which are not full blocks but still support the torch's center, and it stays there.", + "tags": ["decoration", "copper_torch", "support", "placement", "player"], + "minecraftIds": ["minecraft:copper_torch", "minecraft:cobblestone_wall", "minecraft:oak_fence"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:copper_torch", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:cobblestone_wall"} }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:oak_fence" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 4, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:copper_torch" } }, + { "pos": [3, 2, 0], "is": {"id": "minecraft:copper_torch" } }, + { "is": {"id": "minecraft:air" , "count": 0}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_torches/copper_torch_wall_placement_four_sides.json b/tests/decoration/copper_torches/copper_torch_wall_placement_four_sides.json new file mode 100644 index 0000000..5342c11 --- /dev/null +++ b/tests/decoration/copper_torches/copper_torch_wall_placement_four_sides.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_torch_wall_placement_four_sides", + "description": "Using a copper torch on each horizontal side of a stone block places a copper wall torch with the matching facing.", + "tags": ["decoration", "copper_torch", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:copper_torch", "minecraft:copper_wall_torch", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-13, 0, -1], [1, 2, 9] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:copper_torch", "count": 5} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ -4, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [-12, 1, 8], "block": {"id": "minecraft:stone"} }, + { "pos": [-12, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [ -4, 1, 4], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-3.5, 0, -3.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [-11.5, 0, 11.5], "rot": [180, 0] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [-8.5, 0, 4.5], "rot": [90, 0] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [-7.5, 0, 4.5], "rot": [-90, 0] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [ -4, 1, -1], "is": {"id": "minecraft:copper_wall_torch", "facing": "north"} }, + { "pos": [-12, 1, 9], "is": {"id": "minecraft:copper_wall_torch", "facing": "south"} }, + { "pos": [-11, 1, 4], "is": {"id": "minecraft:copper_wall_torch", "facing": "east" } }, + { "pos": [ -5, 1, 4], "is": {"id": "minecraft:copper_wall_torch", "facing": "west" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_torches/copper_torch_washed_away_by_water.json b/tests/decoration/copper_torches/copper_torch_washed_away_by_water.json new file mode 100644 index 0000000..f7572c9 --- /dev/null +++ b/tests/decoration/copper_torches/copper_torch_washed_away_by_water.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_torch_washed_away_by_water", + "description": "Water flowing along a stone channel onto a standing copper torch replaces it and drops a copper torch item.", + "tags": ["decoration", "copper_torch", "fluid", "drops"], + "minecraftIds": ["minecraft:copper_torch", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [9, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [6, 1, -1], [9, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [6, 2, -1], [9, 2, -1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [6, 2, 1], [9, 2, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [6, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 2, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "place", "pos": [8, 2, 0], "block": {"id": "minecraft:copper_torch"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [8, 2, 0], "is": {"id": "minecraft:copper_torch"} } + ] + }, + { "at": 4, "do": "place", "pos": [7, 2, 0], "block": {"id": "minecraft:water", "level": "0"} }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [8, 2, 0], "is": {"id": "minecraft:water"} }, + { + "is": "minecraft:item", + "exists": true, + "count": 1, + "pos": [8.5, 2.2, 0.5], + "position_tolerance": 2, + "Item.id": "minecraft:copper_torch" + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_torches/copper_wall_torch_removed_when_support_replaced.json b/tests/decoration/copper_torches/copper_wall_torch_removed_when_support_replaced.json new file mode 100644 index 0000000..cad453f --- /dev/null +++ b/tests/decoration/copper_torches/copper_wall_torch_removed_when_support_replaced.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_wall_torch_removed_when_support_replaced", + "description": "A copper wall torch with nothing behind it stays until a neighbor update arrives from behind, and a non-sturdy block placed there removes it, while a torch on an unchanged stone block stays.", + "tags": ["decoration", "copper_torch", "support", "neighbor-update"], + "minecraftIds": ["minecraft:copper_wall_torch", "minecraft:stone", "minecraft:oak_leaves"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [9, 3, 3] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [2, 1, 1], "block": {"id": "minecraft:copper_wall_torch", "facing": "south"} }, + { "pos": [5, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [5, 1, 1], "block": {"id": "minecraft:copper_wall_torch", "facing": "south"} } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [2, 1, 1], "is": {"id": "minecraft:copper_wall_torch", "facing": "south"} }, + { "pos": [5, 1, 1], "is": {"id": "minecraft:copper_wall_torch", "facing": "south"} } + ] + }, + { "at": 3, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:oak_leaves", "persistent": true} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:oak_leaves" } }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [5, 1, 1], "is": {"id": "minecraft:copper_wall_torch", "facing": "south"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_torches/copper_wall_torch_support_loss_drops_torch_item.json b/tests/decoration/copper_torches/copper_wall_torch_support_loss_drops_torch_item.json new file mode 100644 index 0000000..8f82d0f --- /dev/null +++ b/tests/decoration/copper_torches/copper_wall_torch_support_loss_drops_torch_item.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_wall_torch_support_loss_drops_torch_item", + "description": "Removing the block behind a copper wall torch turns the wall torch into air and drops a copper torch item.", + "tags": ["decoration", "copper_torch", "support", "neighbor-update", "drops"], + "minecraftIds": ["minecraft:copper_wall_torch", "minecraft:copper_torch", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [9, 3, 2] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [8, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "place", + "pos": [8, 1, 1], + "block": {"id": "minecraft:copper_wall_torch", "facing": "south"} + }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [8, 1, 1], "is": {"id": "minecraft:copper_wall_torch", "facing": "south"} } + ] + }, + { "at": 4, "do": "remove", "pos": [8, 1, 0] }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [8, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [8, 1, 1], "is": {"id": "minecraft:air"} }, + { + "is": "minecraft:item", + "exists": true, + "count": 1, + "pos": [8.5, 1.2, 1.5], + "position_tolerance": 1.5, + "Item.id": "minecraft:copper_torch" + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_torches/copper_wall_torch_survives_unrelated_neighbor_changes.json b/tests/decoration/copper_torches/copper_wall_torch_survives_unrelated_neighbor_changes.json new file mode 100644 index 0000000..fde73a8 --- /dev/null +++ b/tests/decoration/copper_torches/copper_wall_torch_survives_unrelated_neighbor_changes.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_wall_torch_survives_unrelated_neighbor_changes", + "description": "A copper wall torch is only removed when the block it hangs on changes: placing and then removing blocks below, beside, above and in front of it leaves it in place.", + "tags": ["decoration", "copper_torch", "support", "neighbor-update"], + "minecraftIds": ["minecraft:copper_wall_torch", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [9, 3, 3] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [8, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "place", + "pos": [8, 1, 1], + "block": {"id": "minecraft:copper_wall_torch", "facing": "south"} + }, + { + "at": 3, + "do": "place_each", + "blocks": [ + { "pos": [8, 0, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [7, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 2, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 2], "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [8, 1, 1], "is": {"id": "minecraft:copper_wall_torch", "facing": "south"} } + ] + }, + { "at": 6, "do": "remove", "pos": [8, 0, 1] }, + { "at": 6, "do": "remove", "pos": [7, 1, 1] }, + { "at": 6, "do": "remove", "pos": [9, 1, 1] }, + { "at": 6, "do": "remove", "pos": [8, 2, 1] }, + { "at": 6, "do": "remove", "pos": [8, 1, 2] }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [8, 1, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [8, 1, 1], "is": {"id": "minecraft:copper_wall_torch", "facing": "south"} } + ] + } + ], + "breakpoints": [] +} + From fbba65df61409ca467af988978a85f0fd244fbc3 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Wed, 28 Oct 2026 05:25:53 +0100 Subject: [PATCH 27/85] Add Flint tests for copper_wall_torch (1 blocks) --- ...copper_wall_torch_destroyed_by_piston.json | 55 ++++++++++++++++++ ...copper_wall_torch_four_side_placement.json | 56 +++++++++++++++++++ ...er_wall_torch_ignores_other_neighbors.json | 52 +++++++++++++++++ ...er_wall_torch_rejects_non_sturdy_side.json | 40 +++++++++++++ ...wall_torch_support_removed_drops_item.json | 49 ++++++++++++++++ ..._torch_support_replaced_by_non_sturdy.json | 49 ++++++++++++++++ .../copper_wall_torch_survives_on_glass.json | 41 ++++++++++++++ ..._torch_top_face_places_standing_torch.json | 35 ++++++++++++ ...opper_wall_torch_washed_away_by_water.json | 53 ++++++++++++++++++ 9 files changed, 430 insertions(+) create mode 100644 tests/decoration/copper_wall_torch/copper_wall_torch_destroyed_by_piston.json create mode 100644 tests/decoration/copper_wall_torch/copper_wall_torch_four_side_placement.json create mode 100644 tests/decoration/copper_wall_torch/copper_wall_torch_ignores_other_neighbors.json create mode 100644 tests/decoration/copper_wall_torch/copper_wall_torch_rejects_non_sturdy_side.json create mode 100644 tests/decoration/copper_wall_torch/copper_wall_torch_support_removed_drops_item.json create mode 100644 tests/decoration/copper_wall_torch/copper_wall_torch_support_replaced_by_non_sturdy.json create mode 100644 tests/decoration/copper_wall_torch/copper_wall_torch_survives_on_glass.json create mode 100644 tests/decoration/copper_wall_torch/copper_wall_torch_top_face_places_standing_torch.json create mode 100644 tests/decoration/copper_wall_torch/copper_wall_torch_washed_away_by_water.json diff --git a/tests/decoration/copper_wall_torch/copper_wall_torch_destroyed_by_piston.json b/tests/decoration/copper_wall_torch/copper_wall_torch_destroyed_by_piston.json new file mode 100644 index 0000000..044f690 --- /dev/null +++ b/tests/decoration/copper_wall_torch/copper_wall_torch_destroyed_by_piston.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_wall_torch_destroyed_by_piston", + "description": "A piston extending into a copper wall torch destroys it and drops one copper torch item instead of pushing it.", + "tags": ["decoration", "copper-torch", "wall-torch", "piston", "push-reaction", "drops"], + "minecraftIds": [ + "minecraft:copper_wall_torch", "minecraft:copper_torch" , "minecraft:stone" , + "minecraft:piston" , "minecraft:piston_head" , "minecraft:redstone_block" , + "minecraft:item" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [11, 4, 1] ] + }, + "player": {"game_mode": "Spectator"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [11, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [8, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 1, 0], "block": {"id": "minecraft:piston", "facing": "up", "extended": false} }, + { "pos": [9, 2, 0], "block": {"id": "minecraft:copper_wall_torch", "facing": "east"} } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [9, 2, 0], "is": {"id": "minecraft:copper_wall_torch", "facing": "east"} } + ] + }, + { "at": 3, "do": "place", "pos": [10, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 15, + "do": "assert", + "checks": [ + { "pos": [9, 1, 0], "is": {"id": "minecraft:piston", "facing": "up", "extended": true} } , + { "pos": [9, 2, 0], "is": {"id": "minecraft:piston_head", "facing": "up"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:copper_torch"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_wall_torch/copper_wall_torch_four_side_placement.json b/tests/decoration/copper_wall_torch/copper_wall_torch_four_side_placement.json new file mode 100644 index 0000000..dfa86e5 --- /dev/null +++ b/tests/decoration/copper_wall_torch/copper_wall_torch_four_side_placement.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_wall_torch_four_side_placement", + "description": "Using a copper torch on each horizontal side face of stone places a copper wall torch facing away from that face and consumes all four items.", + "tags": ["decoration", "copper-torch", "wall-torch", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:copper_wall_torch", "minecraft:copper_torch", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 2, 10] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:copper_torch", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 6], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 6], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [3.5, 0, 0.5], "rot": [90, 0] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 0, 0.5], "rot": [-90, 0] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [4.5, 0, 2.5], "rot": [0, 0] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [8.5, 0, 9.5], "rot": [180, 0] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:copper_wall_torch", "facing": "east"} } , + { "pos": [7, 1, 0], "is": {"id": "minecraft:copper_wall_torch", "facing": "west"} } , + { "pos": [4, 1, 5], "is": {"id": "minecraft:copper_wall_torch", "facing": "north"} }, + { "pos": [8, 1, 7], "is": {"id": "minecraft:copper_wall_torch", "facing": "south"} }, + { "is": {"id": "minecraft:air", "count": 0}, "slot": "hotbar1" } + ] + }, + { "at": 6, "do": "remove", "pos": [1, 1, 0] }, + { "at": 6, "do": "remove", "pos": [7, 1, 0] }, + { "at": 6, "do": "remove", "pos": [4, 1, 5] }, + { "at": 6, "do": "remove", "pos": [8, 1, 7] } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_wall_torch/copper_wall_torch_ignores_other_neighbors.json b/tests/decoration/copper_wall_torch/copper_wall_torch_ignores_other_neighbors.json new file mode 100644 index 0000000..4c3bbef --- /dev/null +++ b/tests/decoration/copper_wall_torch/copper_wall_torch_ignores_other_neighbors.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_wall_torch_ignores_other_neighbors", + "description": "A copper wall torch stays when the blocks below, above and beside it are removed, because only its attached side is checked.", + "tags": ["decoration", "copper-torch", "wall-torch", "support", "neighbor-update"], + "minecraftIds": ["minecraft:copper_wall_torch", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [11, 4, 1] ] + }, + "player": {"game_mode": "Spectator"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [11, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 8, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 9, 1, 0], "block": {"id": "minecraft:copper_wall_torch", "facing": "east"} }, + { "pos": [ 9, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 9, 2, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [10, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 9, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 9, 1, -1], "block": {"id": "minecraft:stone" } } + ] + }, + { "at": 2, "do": "remove", "pos": [9, 0, 0] }, + { "at": 2, "do": "remove", "pos": [9, 2, 0] }, + { "at": 2, "do": "remove", "pos": [10, 1, 0] }, + { "at": 2, "do": "remove", "pos": [9, 1, 1] }, + { "at": 2, "do": "remove", "pos": [9, 1, -1] }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [9, 0, 0], "is": {"id": "minecraft:air" } }, + { "pos": [9, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [9, 1, 0], "is": {"id": "minecraft:copper_wall_torch", "facing": "east"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_wall_torch/copper_wall_torch_rejects_non_sturdy_side.json b/tests/decoration/copper_wall_torch/copper_wall_torch_rejects_non_sturdy_side.json new file mode 100644 index 0000000..b2419ae --- /dev/null +++ b/tests/decoration/copper_wall_torch/copper_wall_torch_rejects_non_sturdy_side.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_wall_torch_rejects_non_sturdy_side", + "description": "Using a copper torch on the side of oak leaves with nothing solid below places nothing and keeps the item, because leaves have no sturdy face.", + "tags": ["decoration", "copper-torch", "wall-torch", "placement", "support", "player"], + "minecraftIds": ["minecraft:copper_wall_torch", "minecraft:copper_torch", "minecraft:oak_leaves"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:copper_torch", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 2, 1] ], + "with": {"id": "minecraft:air"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_leaves", "persistent": true} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [3.5, 0, 0.5], "rot": [90, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:copper_torch", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_wall_torch/copper_wall_torch_support_removed_drops_item.json b/tests/decoration/copper_wall_torch/copper_wall_torch_support_removed_drops_item.json new file mode 100644 index 0000000..9f65384 --- /dev/null +++ b/tests/decoration/copper_wall_torch/copper_wall_torch_support_removed_drops_item.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_wall_torch_support_removed_drops_item", + "description": "Removing the block a copper wall torch is attached to removes the torch and drops one copper torch item.", + "tags": ["decoration", "copper-torch", "wall-torch", "support", "neighbor-update", "drops"], + "minecraftIds": ["minecraft:copper_wall_torch", "minecraft:copper_torch", "minecraft:stone", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [11, 4, 1] ] + }, + "player": {"game_mode": "Spectator"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [11, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [8, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [9, 1, 0], "block": {"id": "minecraft:copper_wall_torch", "facing": "east"} } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [9, 1, 0], "is": {"id": "minecraft:copper_wall_torch", "facing": "east"} } + ] + }, + { "at": 3, "do": "remove", "pos": [8, 1, 0] }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [9, 1, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:copper_torch"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_wall_torch/copper_wall_torch_support_replaced_by_non_sturdy.json b/tests/decoration/copper_wall_torch/copper_wall_torch_support_replaced_by_non_sturdy.json new file mode 100644 index 0000000..46904b0 --- /dev/null +++ b/tests/decoration/copper_wall_torch/copper_wall_torch_support_replaced_by_non_sturdy.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_wall_torch_support_replaced_by_non_sturdy", + "description": "Replacing the block a copper wall torch is attached to with oak leaves removes the torch, because leaves have no sturdy face.", + "tags": ["decoration", "copper-torch", "wall-torch", "support", "neighbor-update"], + "minecraftIds": ["minecraft:copper_wall_torch", "minecraft:stone", "minecraft:oak_leaves"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [11, 4, 1] ] + }, + "player": {"game_mode": "Spectator"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [11, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [8, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [9, 1, 0], "block": {"id": "minecraft:copper_wall_torch", "facing": "east"} } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [9, 1, 0], "is": {"id": "minecraft:copper_wall_torch", "facing": "east"} } + ] + }, + { "at": 3, "do": "place", "pos": [8, 1, 0], "block": {"id": "minecraft:oak_leaves", "persistent": true} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [8, 1, 0], "is": {"id": "minecraft:oak_leaves"} }, + { "pos": [9, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_wall_torch/copper_wall_torch_survives_on_glass.json b/tests/decoration/copper_wall_torch/copper_wall_torch_survives_on_glass.json new file mode 100644 index 0000000..37088d4 --- /dev/null +++ b/tests/decoration/copper_wall_torch/copper_wall_torch_survives_on_glass.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_wall_torch_survives_on_glass", + "description": "A copper wall torch attached to glass stays, because glass has a sturdy side face even though it is transparent.", + "tags": ["decoration", "copper-torch", "wall-torch", "support", "glass"], + "minecraftIds": ["minecraft:copper_wall_torch", "minecraft:glass"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [11, 4, 1] ] + }, + "player": {"game_mode": "Spectator"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [11, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [8, 1, 0], "block": {"id": "minecraft:glass" } }, + { "pos": [9, 1, 0], "block": {"id": "minecraft:copper_wall_torch", "facing": "east"} } + ] + }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [8, 1, 0], "is": {"id": "minecraft:glass" } }, + { "pos": [9, 1, 0], "is": {"id": "minecraft:copper_wall_torch", "facing": "east"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_wall_torch/copper_wall_torch_top_face_places_standing_torch.json b/tests/decoration/copper_wall_torch/copper_wall_torch_top_face_places_standing_torch.json new file mode 100644 index 0000000..386067d --- /dev/null +++ b/tests/decoration/copper_wall_torch/copper_wall_torch_top_face_places_standing_torch.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_wall_torch_top_face_places_standing_torch", + "description": "Using a copper torch on the top face of stone places a standing copper torch, not a copper wall torch.", + "tags": ["decoration", "copper-torch", "wall-torch", "placement", "player"], + "minecraftIds": ["minecraft:copper_wall_torch", "minecraft:copper_torch", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:copper_torch", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:copper_torch" } }, + { "is": {"id": "minecraft:air" , "count": 0}, "slot": "hotbar1" } + ] + }, + { "at": 4, "do": "remove", "pos": [0, 2, 0] } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/copper_wall_torch/copper_wall_torch_washed_away_by_water.json b/tests/decoration/copper_wall_torch/copper_wall_torch_washed_away_by_water.json new file mode 100644 index 0000000..dd22a85 --- /dev/null +++ b/tests/decoration/copper_wall_torch/copper_wall_torch_washed_away_by_water.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "copper_wall_torch_washed_away_by_water", + "description": "Flowing water spreading into a copper wall torch replaces it and drops one copper torch item.", + "tags": ["decoration", "copper-torch", "wall-torch", "fluid", "water", "drops"], + "minecraftIds": [ + "minecraft:copper_wall_torch", "minecraft:copper_torch" , "minecraft:stone" , + "minecraft:water" , "minecraft:item" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [11, 4, 1] ] + }, + "player": {"game_mode": "Spectator"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [11, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [8, 2, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [9, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [9, 2, 0], "block": {"id": "minecraft:copper_wall_torch", "facing": "east"} } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [9, 2, 0], "is": {"id": "minecraft:copper_wall_torch", "facing": "east"} } + ] + }, + { "at": 3, "do": "place", "pos": [9, 3, 0], "block": {"id": "minecraft:water", "level": 0} }, + { + "at": 18, + "do": "assert", + "checks": [ + { "pos": [9, 2, 0], "is": {"id": "minecraft:water"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:copper_torch"} + ] + } + ], + "breakpoints": [] +} + From 2f4181c54699ff835bd090f4c7c6ee5ff4b3c984 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Wed, 28 Oct 2026 05:30:36 +0100 Subject: [PATCH 28/85] Add Flint tests for cornflower (1 blocks) --- .../cornflower_piston_destroys.json | 59 +++++++++++++ .../cornflower_placement_on_supports.json | 85 +++++++++++++++++++ ...placement_rejected_on_invalid_support.json | 63 ++++++++++++++ .../cornflower/cornflower_potting.json | 47 ++++++++++ .../cornflower_rejects_bonemeal.json | 63 ++++++++++++++ .../cornflower_replaced_by_flowing_lava.json | 50 +++++++++++ .../cornflower_replaced_by_flowing_water.json | 50 +++++++++++ .../cornflower/cornflower_support_loss.json | 60 +++++++++++++ 8 files changed, 477 insertions(+) create mode 100644 tests/vegetation/cornflower/cornflower_piston_destroys.json create mode 100644 tests/vegetation/cornflower/cornflower_placement_on_supports.json create mode 100644 tests/vegetation/cornflower/cornflower_placement_rejected_on_invalid_support.json create mode 100644 tests/vegetation/cornflower/cornflower_potting.json create mode 100644 tests/vegetation/cornflower/cornflower_rejects_bonemeal.json create mode 100644 tests/vegetation/cornflower/cornflower_replaced_by_flowing_lava.json create mode 100644 tests/vegetation/cornflower/cornflower_replaced_by_flowing_water.json create mode 100644 tests/vegetation/cornflower/cornflower_support_loss.json diff --git a/tests/vegetation/cornflower/cornflower_piston_destroys.json b/tests/vegetation/cornflower/cornflower_piston_destroys.json new file mode 100644 index 0000000..c8c352f --- /dev/null +++ b/tests/vegetation/cornflower/cornflower_piston_destroys.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "cornflower_piston_destroys", + "description": "A piston pushing into a cornflower destroys it rather than moving it, and its head extends into the space.", + "tags": ["vegetation", "cornflower", "piston", "push-reaction"], + "minecraftIds": [ + "minecraft:cornflower" , "minecraft:grass_block" , "minecraft:piston" , "minecraft:redstone_block", + "minecraft:piston_head" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [12, 4, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -1], [12, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, -1], [12, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [10, 0, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [10, 1, 0], "block": {"id": "minecraft:cornflower" } }, + { "pos": [ 9, 1, 0], "block": {"id": "minecraft:piston" , "facing": "east", "extended": false} } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [10, 1, 0], "is": {"id": "minecraft:cornflower"} } + ] + }, + { "at": 5, "do": "place", "pos": [9, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 9, + "do": "assert", + "checks": [ + { "pos": [ 9, 1, 0], "is": {"id": "minecraft:piston" , "facing": "east", "extended": true} }, + { "pos": [10, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east" } }, + { "pos": [11, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/cornflower/cornflower_placement_on_supports.json b/tests/vegetation/cornflower/cornflower_placement_on_supports.json new file mode 100644 index 0000000..cecae10 --- /dev/null +++ b/tests/vegetation/cornflower/cornflower_placement_on_supports.json @@ -0,0 +1,85 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "cornflower_placement_on_supports", + "description": "Cornflower items used on grass block, dirt, podzol, mycelium, rooted dirt, mud, moss block and farmland create a cornflower on each and consume all eight items.", + "tags": ["vegetation", "cornflower", "placement", "supports-vegetation", "player"], + "minecraftIds": [ + "minecraft:cornflower" , "minecraft:grass_block", "minecraft:dirt" , "minecraft:podzol" , + "minecraft:mycelium" , "minecraft:rooted_dirt", "minecraft:mud" , "minecraft:moss_block" , + "minecraft:farmland" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [8, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:cornflower", "count": 8} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [8, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [7, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:podzol" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:mycelium" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:rooted_dirt"} }, + { "pos": [5, 0, 0], "block": {"id": "minecraft:mud" } }, + { "pos": [6, 0, 0], "block": {"id": "minecraft:moss_block" } }, + { "pos": [7, 0, 0], "block": {"id": "minecraft:farmland" } } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 0.5], "rot": [0, 90] }, + {"at": 8, "do": "interact"}, + { "at": 9, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 0.5], "rot": [0, 90] }, + {"at": 9, "do": "interact"}, + { "at": 10, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 0.5], "rot": [0, 90] }, + {"at": 10, "do": "interact"}, + { "at": 11, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, 0.5], "rot": [0, 90] }, + {"at": 11, "do": "interact"}, + { "at": 12, "do": "tp", "entity_alias": "player", "pos": [7.5, 2, 0.5], "rot": [0, 90] }, + {"at": 12, "do": "interact"}, + { "at": 13, "do": "tp", "entity_alias": "player", "pos": [3.5, 6, 0.5] }, + { + "at": 14, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:cornflower"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:cornflower"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:cornflower"} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:cornflower"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:cornflower"} }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:cornflower"} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:cornflower"} }, + { "pos": [7, 1, 0], "is": {"id": "minecraft:cornflower"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/cornflower/cornflower_placement_rejected_on_invalid_support.json b/tests/vegetation/cornflower/cornflower_placement_rejected_on_invalid_support.json new file mode 100644 index 0000000..fdac0a6 --- /dev/null +++ b/tests/vegetation/cornflower/cornflower_placement_rejected_on_invalid_support.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "cornflower_placement_rejected_on_invalid_support", + "description": "Cornflower items used on stone, sand and gravel do not place a cornflower and are not consumed, because none of them supports vegetation.", + "tags": ["vegetation", "cornflower", "placement", "supports-vegetation", "player"], + "minecraftIds": ["minecraft:cornflower", "minecraft:stone", "minecraft:sand", "minecraft:gravel"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [3, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:cornflower", "count": 3} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, -1, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [2, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [1, 0, 0], "block": {"id": "minecraft:sand" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:gravel"} } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 9, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:sand" } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:gravel" } }, + { "is": {"id": "minecraft:cornflower", "count": 3}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/cornflower/cornflower_potting.json b/tests/vegetation/cornflower/cornflower_potting.json new file mode 100644 index 0000000..ae267c5 --- /dev/null +++ b/tests/vegetation/cornflower/cornflower_potting.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "cornflower_potting", + "description": "A cornflower item used on an empty flower pot turns it into a potted cornflower and uses up the item.", + "tags": ["vegetation", "cornflower", "flower-pot", "player"], + "minecraftIds": ["minecraft:cornflower", "minecraft:flower_pot", "minecraft:potted_cornflower"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:cornflower", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:flower_pot"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_cornflower"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/cornflower/cornflower_rejects_bonemeal.json b/tests/vegetation/cornflower/cornflower_rejects_bonemeal.json new file mode 100644 index 0000000..7ac48ef --- /dev/null +++ b/tests/vegetation/cornflower/cornflower_rejects_bonemeal.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "cornflower_rejects_bonemeal", + "description": "Bone meal used on a cornflower grows nothing, neither new flowers around it nor above it, and is not consumed, because a flower block is not bonemealable.", + "tags": ["vegetation", "cornflower", "bone-meal", "player"], + "minecraftIds": ["minecraft:cornflower", "minecraft:grass_block", "minecraft:bone_meal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -2], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -2], [2, 4, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [-1, 1, -1], [1, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [ 1, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [-1, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [ 0, 0, 1], "block": {"id": "minecraft:grass_block"} }, + { "pos": [ 0, 0, -1], "block": {"id": "minecraft:grass_block"} }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:cornflower" } } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:cornflower" } }, + { "pos": [ 1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [ 0, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [ 0, 1, -1], "is": {"id": "minecraft:air" } }, + { "pos": [ 0, 2, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:bone_meal" , "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/cornflower/cornflower_replaced_by_flowing_lava.json b/tests/vegetation/cornflower/cornflower_replaced_by_flowing_lava.json new file mode 100644 index 0000000..5d6bdbc --- /dev/null +++ b/tests/vegetation/cornflower/cornflower_replaced_by_flowing_lava.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "cornflower_replaced_by_flowing_lava", + "description": "Lava flowing sideways into the space of a cornflower replaces it with lava, because a cornflower has no collision and cannot block fluids.", + "tags": ["vegetation", "cornflower", "fluid", "lava", "replaced"], + "minecraftIds": ["minecraft:cornflower", "minecraft:lava", "minecraft:grass_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [2, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 4, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:cornflower"} }, + { "at": 4, "do": "place", "pos": [2, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:cornflower"} } + ] + }, + { "at": 5, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:lava"} }, + { + "at": 95, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:lava"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:lava"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:lava"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/cornflower/cornflower_replaced_by_flowing_water.json b/tests/vegetation/cornflower/cornflower_replaced_by_flowing_water.json new file mode 100644 index 0000000..45f5a4f --- /dev/null +++ b/tests/vegetation/cornflower/cornflower_replaced_by_flowing_water.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "cornflower_replaced_by_flowing_water", + "description": "Water flowing sideways into the space of a cornflower replaces it with water, because a cornflower has no collision and cannot block fluids.", + "tags": ["vegetation", "cornflower", "fluid", "water", "replaced"], + "minecraftIds": ["minecraft:cornflower", "minecraft:water", "minecraft:grass_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [2, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 4, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:cornflower"} }, + { "at": 4, "do": "place", "pos": [2, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:cornflower"} } + ] + }, + { "at": 5, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:water"} }, + { + "at": 25, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:water"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/cornflower/cornflower_support_loss.json b/tests/vegetation/cornflower/cornflower_support_loss.json new file mode 100644 index 0000000..096e076 --- /dev/null +++ b/tests/vegetation/cornflower/cornflower_support_loss.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "cornflower_support_loss", + "description": "A cornflower on grass block or farmland becomes air once the block beneath it is removed.", + "tags": ["vegetation", "cornflower", "support", "neighbor-update"], + "minecraftIds": ["minecraft:cornflower", "minecraft:grass_block", "minecraft:farmland"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [2, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [2, 2, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [1, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:farmland" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:cornflower" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:cornflower" } } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:cornflower"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:cornflower"} } + ] + }, + { "at": 5, "do": "remove", "pos": [0, 0, 0] }, + { "at": 5, "do": "remove", "pos": [1, 0, 0] }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + From 93baa55878d61bdfe74d7016884af558070b5ff9 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Wed, 28 Oct 2026 05:34:57 +0100 Subject: [PATCH 29/85] Add Flint tests for crafting_table (1 blocks) --- .../crafting_table_burns_as_furnace_fuel.json | 42 +++++++++++++++++ .../crafting_table_pushed_by_piston.json | 42 +++++++++++++++++ .../crafting_table_sets_note_block_bass.json | 47 +++++++++++++++++++ .../crafting_table_survival_placement.json | 35 ++++++++++++++ 4 files changed, 166 insertions(+) create mode 100644 tests/decoration/crafting_table/crafting_table_burns_as_furnace_fuel.json create mode 100644 tests/decoration/crafting_table/crafting_table_pushed_by_piston.json create mode 100644 tests/decoration/crafting_table/crafting_table_sets_note_block_bass.json create mode 100644 tests/decoration/crafting_table/crafting_table_survival_placement.json diff --git a/tests/decoration/crafting_table/crafting_table_burns_as_furnace_fuel.json b/tests/decoration/crafting_table/crafting_table_burns_as_furnace_fuel.json new file mode 100644 index 0000000..e9ea41c --- /dev/null +++ b/tests/decoration/crafting_table/crafting_table_burns_as_furnace_fuel.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "crafting_table_burns_as_furnace_fuel", + "description": "A crafting table in a furnace's fuel slot is consumed as fuel with a burn time of 300 ticks (1.5 base units) and lights the furnace while it smelts raw beef.", + "tags": ["decoration", "crafting_table", "furnace", "fuel", "block-entity"], + "minecraftIds": ["minecraft:crafting_table", "minecraft:furnace", "minecraft:beef"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:furnace", + "facing": "north", + "lit": false, + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:beef\"}, {Slot: 1b, count: 1, id: \"minecraft:crafting_table\"}]" + } + } + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:furnace", "lit": true, "nbt": {"lit_total_time": "300s"} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/crafting_table/crafting_table_pushed_by_piston.json b/tests/decoration/crafting_table/crafting_table_pushed_by_piston.json new file mode 100644 index 0000000..6172134 --- /dev/null +++ b/tests/decoration/crafting_table/crafting_table_pushed_by_piston.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "crafting_table_pushed_by_piston", + "description": "An extending piston pushes a crafting table one block forward (push reaction NORMAL) instead of destroying it; the table is still a crafting table in its new position.", + "tags": ["decoration", "crafting_table", "piston", "push-reaction", "redstone"], + "minecraftIds": ["minecraft:crafting_table", "minecraft:piston"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston", "facing": "east", "extended": "false"} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:crafting_table"} } + ] + }, + { "at": 2, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": "true"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east", "type": "normal"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:crafting_table"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/crafting_table/crafting_table_sets_note_block_bass.json b/tests/decoration/crafting_table/crafting_table_sets_note_block_bass.json new file mode 100644 index 0000000..9ed030a --- /dev/null +++ b/tests/decoration/crafting_table/crafting_table_sets_note_block_bass.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "crafting_table_sets_note_block_bass", + "description": "A note block above a crafting table takes the bass instrument from the table's block properties, and returns to basedrum when the table below is replaced by stone.", + "tags": ["decoration", "crafting_table", "note_block", "instrument", "block-update"], + "minecraftIds": ["minecraft:crafting_table", "minecraft:note_block", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:note_block", "instrument": "harp", "note": 0, "powered": false} + }, + { "at": 1, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:crafting_table"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:note_block", "instrument": "bass", "note": 0, "powered": false} + } + ] + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 6, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:note_block", "instrument": "basedrum", "note": 0, "powered": false} + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/crafting_table/crafting_table_survival_placement.json b/tests/decoration/crafting_table/crafting_table_survival_placement.json new file mode 100644 index 0000000..727b5d1 --- /dev/null +++ b/tests/decoration/crafting_table/crafting_table_survival_placement.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "crafting_table_survival_placement", + "description": "A survival player using a crafting table on the top face of stone places a crafting table above it and consumes the item.", + "tags": ["decoration", "crafting_table", "placement", "player"], + "minecraftIds": ["minecraft:crafting_table"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:crafting_table", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:crafting_table"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + From 06f1a159b7d06086e084e78945d7f39a534ef8ce Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Wed, 28 Oct 2026 05:43:17 +0100 Subject: [PATCH 30/85] Add Flint tests for crimson_fungus (1 blocks) --- ...son_fungus_bonemeal_grows_huge_fungus.json | 66 ++++++++++++++ ...ungus_bonemeal_growth_ignores_ceiling.json | 72 +++++++++++++++ ...s_bonemeal_rejected_on_other_supports.json | 73 +++++++++++++++ .../crimson_fungus_destroyed_by_piston.json | 58 ++++++++++++ .../crimson_fungus_flower_pot.json | 51 +++++++++++ .../crimson_fungus_placement_on_supports.json | 89 +++++++++++++++++++ ...placement_rejected_on_invalid_support.json | 68 ++++++++++++++ ...mson_fungus_replaced_by_flowing_water.json | 54 +++++++++++ .../crimson_fungus_support_loss.json | 60 +++++++++++++ 9 files changed, 591 insertions(+) create mode 100644 tests/vegetation/crimson_fungus/crimson_fungus_bonemeal_grows_huge_fungus.json create mode 100644 tests/vegetation/crimson_fungus/crimson_fungus_bonemeal_growth_ignores_ceiling.json create mode 100644 tests/vegetation/crimson_fungus/crimson_fungus_bonemeal_rejected_on_other_supports.json create mode 100644 tests/vegetation/crimson_fungus/crimson_fungus_destroyed_by_piston.json create mode 100644 tests/vegetation/crimson_fungus/crimson_fungus_flower_pot.json create mode 100644 tests/vegetation/crimson_fungus/crimson_fungus_placement_on_supports.json create mode 100644 tests/vegetation/crimson_fungus/crimson_fungus_placement_rejected_on_invalid_support.json create mode 100644 tests/vegetation/crimson_fungus/crimson_fungus_replaced_by_flowing_water.json create mode 100644 tests/vegetation/crimson_fungus/crimson_fungus_support_loss.json diff --git a/tests/vegetation/crimson_fungus/crimson_fungus_bonemeal_grows_huge_fungus.json b/tests/vegetation/crimson_fungus/crimson_fungus_bonemeal_grows_huge_fungus.json new file mode 100644 index 0000000..3e55ddc --- /dev/null +++ b/tests/vegetation/crimson_fungus/crimson_fungus_bonemeal_grows_huge_fungus.json @@ -0,0 +1,66 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_fungus_bonemeal_grows_huge_fungus", + "description": "Repeated bone meal on a crimson fungus on crimson nylium eventually replaces it with a crimson stem column at least four blocks tall, leaving the nylium in place.", + "tags": ["vegetation", "crimson_fungus", "bone-meal", "growth", "player"], + "minecraftIds": [ + "minecraft:crimson_fungus", "minecraft:crimson_nylium", "minecraft:crimson_stem" , "minecraft:bone_meal" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-5, 0, -4], [4, 31, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 15} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-5, 0, -4], [4, 0, 4] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [-5, 1, -4], [4, 31, 4] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:crimson_nylium"} }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_fungus"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [-3.5, 1, 0.5], "rot": [-90, 19] }, + {"at": 6, "do": "interact"}, + {"at": 7, "do": "interact"}, + {"at": 8, "do": "interact"}, + {"at": 9, "do": "interact"}, + {"at": 10, "do": "interact"}, + {"at": 11, "do": "interact"}, + {"at": 12, "do": "interact"}, + {"at": 13, "do": "interact"}, + {"at": 14, "do": "interact"}, + {"at": 15, "do": "interact"}, + {"at": 16, "do": "interact"}, + {"at": 17, "do": "interact"}, + {"at": 18, "do": "interact"}, + {"at": 19, "do": "interact"}, + {"at": 20, "do": "interact"}, + { + "at": 22, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:crimson_nylium" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_stem" , "axis": "y"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:crimson_stem" , "axis": "y"} }, + { "pos": [0, 3, 0], "is": {"id": "minecraft:crimson_stem" , "axis": "y"} }, + { "pos": [0, 4, 0], "is": {"id": "minecraft:crimson_stem" , "axis": "y"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_fungus/crimson_fungus_bonemeal_growth_ignores_ceiling.json b/tests/vegetation/crimson_fungus/crimson_fungus_bonemeal_growth_ignores_ceiling.json new file mode 100644 index 0000000..02ce6fc --- /dev/null +++ b/tests/vegetation/crimson_fungus/crimson_fungus_bonemeal_growth_ignores_ceiling.json @@ -0,0 +1,72 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_fungus_bonemeal_growth_ignores_ceiling", + "description": "Bone meal on a crimson fungus on crimson nylium with stone directly above still grows it into a single crimson stem, and the stone above is not replaced.", + "tags": ["vegetation", "crimson_fungus", "bone-meal", "growth", "player"], + "minecraftIds": [ + "minecraft:crimson_fungus", "minecraft:crimson_nylium", "minecraft:crimson_stem" , "minecraft:stone" , + "minecraft:bone_meal" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-5, 0, -4], [4, 6, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 15} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-5, 0, -4], [4, 0, 4] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [-5, 1, -4], [4, 6, 4] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:crimson_nylium"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_fungus"} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:stone" } } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [-3.5, 1, 0.5], "rot": [-90, 19] }, + {"at": 6, "do": "interact"}, + {"at": 7, "do": "interact"}, + {"at": 8, "do": "interact"}, + {"at": 9, "do": "interact"}, + {"at": 10, "do": "interact"}, + {"at": 11, "do": "interact"}, + {"at": 12, "do": "interact"}, + {"at": 13, "do": "interact"}, + {"at": 14, "do": "interact"}, + {"at": 15, "do": "interact"}, + {"at": 16, "do": "interact"}, + {"at": 17, "do": "interact"}, + {"at": 18, "do": "interact"}, + {"at": 19, "do": "interact"}, + {"at": 20, "do": "interact"}, + { + "at": 22, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:crimson_nylium" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_stem" , "axis": "y"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_fungus/crimson_fungus_bonemeal_rejected_on_other_supports.json b/tests/vegetation/crimson_fungus/crimson_fungus_bonemeal_rejected_on_other_supports.json new file mode 100644 index 0000000..3de3c13 --- /dev/null +++ b/tests/vegetation/crimson_fungus/crimson_fungus_bonemeal_rejected_on_other_supports.json @@ -0,0 +1,73 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_fungus_bonemeal_rejected_on_other_supports", + "description": "Bone meal used on crimson fungi standing on warped nylium, soul soil and grass block has no effect and is not consumed, because only crimson nylium is a valid growth base.", + "tags": ["vegetation", "crimson_fungus", "bone-meal", "player"], + "minecraftIds": [ + "minecraft:crimson_fungus", "minecraft:warped_nylium" , "minecraft:soul_soil" , "minecraft:grass_block" , + "minecraft:bone_meal" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 3} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [2, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:warped_nylium" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:soul_soil" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_fungus"} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:crimson_fungus"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:crimson_fungus"} } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [1.5, 6, 0.5] }, + { + "at": 9, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_fungus"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:crimson_fungus"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:crimson_fungus"} } + ] + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:bone_meal", "count": 3} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_fungus/crimson_fungus_destroyed_by_piston.json b/tests/vegetation/crimson_fungus/crimson_fungus_destroyed_by_piston.json new file mode 100644 index 0000000..d677d0c --- /dev/null +++ b/tests/vegetation/crimson_fungus/crimson_fungus_destroyed_by_piston.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_fungus_destroyed_by_piston", + "description": "A piston extending into a crimson fungus destroys it instead of pushing it, and the piston head takes its place.", + "tags": ["vegetation", "crimson_fungus", "piston", "push-reaction"], + "minecraftIds": [ + "minecraft:crimson_fungus", "minecraft:crimson_nylium", "minecraft:piston" , "minecraft:piston_head" , + "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [14, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -1], [14, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [12, 1, 0], [13, 2, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [13, 0, 0], "block": {"id": "minecraft:crimson_nylium"} }, + { "pos": [13, 1, 0], "block": {"id": "minecraft:crimson_fungus"} }, + { "pos": [12, 1, 0], "block": {"id": "minecraft:piston", "facing": "east", "extended": false} } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [13, 1, 0], "is": {"id": "minecraft:crimson_fungus"} } + ] + }, + { "at": 5, "do": "place", "pos": [12, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [12, 1, 0], "is": {"id": "minecraft:piston" , "facing": "east", "extended": true} }, + { "pos": [13, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_fungus/crimson_fungus_flower_pot.json b/tests/vegetation/crimson_fungus/crimson_fungus_flower_pot.json new file mode 100644 index 0000000..1874654 --- /dev/null +++ b/tests/vegetation/crimson_fungus/crimson_fungus_flower_pot.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_fungus_flower_pot", + "description": "A crimson fungus item used on an empty flower pot turns it into a potted crimson fungus and consumes the item.", + "tags": ["vegetation", "crimson_fungus", "flower-pot", "player"], + "minecraftIds": ["minecraft:crimson_fungus", "minecraft:flower_pot", "minecraft:potted_crimson_fungus"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:crimson_fungus", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:flower_pot"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 5, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_crimson_fungus"} } + ] + }, + { + "at": 8, + "do": "assert", + "checks": [ {"slot": "hotbar1", "is": "empty"} ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_fungus/crimson_fungus_placement_on_supports.json b/tests/vegetation/crimson_fungus/crimson_fungus_placement_on_supports.json new file mode 100644 index 0000000..681f878 --- /dev/null +++ b/tests/vegetation/crimson_fungus/crimson_fungus_placement_on_supports.json @@ -0,0 +1,89 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_fungus_placement_on_supports", + "description": "Crimson fungus items placed on crimson nylium, warped nylium, mycelium, soul soil, grass block, dirt, moss block, mud and farmland create a fungus on each and consume all nine items.", + "tags": ["vegetation", "crimson_fungus", "placement", "supports-fungus", "player"], + "minecraftIds": [ + "minecraft:crimson_fungus", "minecraft:crimson_nylium", "minecraft:warped_nylium" , "minecraft:mycelium" , + "minecraft:soul_soil" , "minecraft:grass_block" , "minecraft:dirt" , "minecraft:moss_block" , + "minecraft:mud" , "minecraft:farmland" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:crimson_fungus", "count": 9} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [9, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [8, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:crimson_nylium"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:warped_nylium" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:mycelium" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:soul_soil" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [5, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [6, 0, 0], "block": {"id": "minecraft:moss_block" } }, + { "pos": [7, 0, 0], "block": {"id": "minecraft:mud" } }, + { "pos": [8, 0, 0], "block": {"id": "minecraft:farmland" } } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 0.5], "rot": [0, 90] }, + {"at": 8, "do": "interact"}, + { "at": 9, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 0.5], "rot": [0, 90] }, + {"at": 9, "do": "interact"}, + { "at": 10, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 0.5], "rot": [0, 90] }, + {"at": 10, "do": "interact"}, + { "at": 11, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, 0.5], "rot": [0, 90] }, + {"at": 11, "do": "interact"}, + { "at": 12, "do": "tp", "entity_alias": "player", "pos": [7.5, 2, 0.5], "rot": [0, 90] }, + {"at": 12, "do": "interact"}, + { "at": 13, "do": "tp", "entity_alias": "player", "pos": [8.5, 2, 0.5], "rot": [0, 90] }, + {"at": 13, "do": "interact"}, + { "at": 14, "do": "tp", "entity_alias": "player", "pos": [4.5, 6, 0.5] }, + { + "at": 15, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_fungus"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:crimson_fungus"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:crimson_fungus"} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:crimson_fungus"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:crimson_fungus"} }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:crimson_fungus"} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:crimson_fungus"} }, + { "pos": [7, 1, 0], "is": {"id": "minecraft:crimson_fungus"} }, + { "pos": [8, 1, 0], "is": {"id": "minecraft:crimson_fungus"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_fungus/crimson_fungus_placement_rejected_on_invalid_support.json b/tests/vegetation/crimson_fungus/crimson_fungus_placement_rejected_on_invalid_support.json new file mode 100644 index 0000000..e48eef3 --- /dev/null +++ b/tests/vegetation/crimson_fungus/crimson_fungus_placement_rejected_on_invalid_support.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_fungus_placement_rejected_on_invalid_support", + "description": "Crimson fungus items used on stone, netherrack, soul sand and sand place nothing and are not consumed, because none of them supports a fungus.", + "tags": ["vegetation", "crimson_fungus", "placement", "player"], + "minecraftIds": [ + "minecraft:crimson_fungus", "minecraft:stone" , "minecraft:netherrack" , "minecraft:soul_sand" , + "minecraft:sand" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:crimson_fungus", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [4, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [3, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:netherrack"} }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:soul_sand" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:sand" } } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 0.5], "rot": [0, 90] }, + {"at": 8, "do": "interact"}, + { "at": 9, "do": "tp", "entity_alias": "player", "pos": [1.5, 6, 0.5] }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:crimson_fungus", "count": 4}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_fungus/crimson_fungus_replaced_by_flowing_water.json b/tests/vegetation/crimson_fungus/crimson_fungus_replaced_by_flowing_water.json new file mode 100644 index 0000000..e57e671 --- /dev/null +++ b/tests/vegetation/crimson_fungus/crimson_fungus_replaced_by_flowing_water.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_fungus_replaced_by_flowing_water", + "description": "Flowing water from a neighbouring source replaces a crimson fungus with water.", + "tags": ["vegetation", "crimson_fungus", "fluid", "replaceable"], + "minecraftIds": ["minecraft:crimson_fungus", "minecraft:crimson_nylium", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [14, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -1], [14, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [12, 1, 0], [13, 2, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [13, 0, 0], "block": {"id": "minecraft:crimson_nylium"} }, + { "pos": [13, 1, 0], "block": {"id": "minecraft:crimson_fungus"} } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [13, 1, 0], "is": {"id": "minecraft:crimson_fungus"} } + ] + }, + { "at": 5, "do": "place", "pos": [12, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [13, 1, 0], "is": {"id": "minecraft:water" } }, + { "pos": [13, 0, 0], "is": {"id": "minecraft:crimson_nylium"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_fungus/crimson_fungus_support_loss.json b/tests/vegetation/crimson_fungus/crimson_fungus_support_loss.json new file mode 100644 index 0000000..750162c --- /dev/null +++ b/tests/vegetation/crimson_fungus/crimson_fungus_support_loss.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_fungus_support_loss", + "description": "A crimson fungus on crimson nylium or soul soil becomes air once the block beneath it is removed.", + "tags": ["vegetation", "crimson_fungus", "support", "neighbor-update"], + "minecraftIds": ["minecraft:crimson_fungus", "minecraft:crimson_nylium", "minecraft:soul_soil"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [13, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -1], [13, 2, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [12, 1, 0], [13, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [12, 0, 0], "block": {"id": "minecraft:crimson_nylium"} }, + { "pos": [13, 0, 0], "block": {"id": "minecraft:soul_soil" } }, + { "pos": [12, 1, 0], "block": {"id": "minecraft:crimson_fungus"} }, + { "pos": [13, 1, 0], "block": {"id": "minecraft:crimson_fungus"} } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [12, 1, 0], "is": {"id": "minecraft:crimson_fungus"} }, + { "pos": [13, 1, 0], "is": {"id": "minecraft:crimson_fungus"} } + ] + }, + { "at": 5, "do": "remove", "pos": [12, 0, 0] }, + { "at": 5, "do": "remove", "pos": [13, 0, 0] }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [12, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [12, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [13, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [13, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + From 248ef1febb5721af0ea865180a2905fb61a88f25 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Wed, 28 Oct 2026 05:48:32 +0100 Subject: [PATCH 31/85] Add Flint tests for hyphae (4 blocks) --- ...crimson_hyphae_axe_strip_keeps_axis_x.json | 44 ++++++++++++ .../crimson_hyphae_axe_strips_axis_y.json | 44 ++++++++++++ .../hyphae/crimson_hyphae_not_fuel.json | 68 +++++++++++++++++++ ...on_hyphae_placement_north_face_axis_z.json | 41 +++++++++++ .../crimson_hyphae_placement_top_axis_y.json | 35 ++++++++++ ...son_hyphae_placement_west_face_axis_x.json | 41 +++++++++++ ...on_hyphae_shield_offhand_blocks_strip.json | 44 ++++++++++++ ...ripped_warped_hyphae_axe_does_nothing.json | 44 ++++++++++++ 8 files changed, 361 insertions(+) create mode 100644 tests/decoration/hyphae/crimson_hyphae_axe_strip_keeps_axis_x.json create mode 100644 tests/decoration/hyphae/crimson_hyphae_axe_strips_axis_y.json create mode 100644 tests/decoration/hyphae/crimson_hyphae_not_fuel.json create mode 100644 tests/decoration/hyphae/crimson_hyphae_placement_north_face_axis_z.json create mode 100644 tests/decoration/hyphae/crimson_hyphae_placement_top_axis_y.json create mode 100644 tests/decoration/hyphae/crimson_hyphae_placement_west_face_axis_x.json create mode 100644 tests/decoration/hyphae/crimson_hyphae_shield_offhand_blocks_strip.json create mode 100644 tests/decoration/hyphae/stripped_warped_hyphae_axe_does_nothing.json diff --git a/tests/decoration/hyphae/crimson_hyphae_axe_strip_keeps_axis_x.json b/tests/decoration/hyphae/crimson_hyphae_axe_strip_keeps_axis_x.json new file mode 100644 index 0000000..05446c1 --- /dev/null +++ b/tests/decoration/hyphae/crimson_hyphae_axe_strip_keeps_axis_x.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Crimson Hyphae Axe Strip Keeps Axis X", + "description": "An axe used on crimson hyphae with axis x turns it into stripped crimson hyphae and keeps axis x.", + "tags": ["hyphae", "axe", "strip", "player"], + "minecraftIds": [ + "minecraft:crimson_hyphae" , "minecraft:stripped_crimson_hyphae", "minecraft:iron_axe" , + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_axe"} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_hyphae", "axis": "x"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stripped_crimson_hyphae", "axis": "x"} }, + { "is": {"id": "minecraft:iron_axe"}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/hyphae/crimson_hyphae_axe_strips_axis_y.json b/tests/decoration/hyphae/crimson_hyphae_axe_strips_axis_y.json new file mode 100644 index 0000000..f297f34 --- /dev/null +++ b/tests/decoration/hyphae/crimson_hyphae_axe_strips_axis_y.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Crimson Hyphae Axe Strips Axis Y", + "description": "An axe used on crimson hyphae turns it into stripped crimson hyphae and keeps axis y.", + "tags": ["hyphae", "axe", "strip", "player"], + "minecraftIds": [ + "minecraft:crimson_hyphae" , "minecraft:stripped_crimson_hyphae", "minecraft:iron_axe" , + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_axe"} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_hyphae", "axis": "y"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stripped_crimson_hyphae", "axis": "y"} }, + { "is": {"id": "minecraft:iron_axe"}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/hyphae/crimson_hyphae_not_fuel.json b/tests/decoration/hyphae/crimson_hyphae_not_fuel.json new file mode 100644 index 0000000..8eb3ac1 --- /dev/null +++ b/tests/decoration/hyphae/crimson_hyphae_not_fuel.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Crimson Hyphae Not Fuel", + "description": "Crimson hyphae in a furnace fuel slot is not burned, while oak planks in an identical furnace light it.", + "tags": ["hyphae", "fuel", "furnace", "block-entity"], + "minecraftIds": ["minecraft:crimson_hyphae", "minecraft:furnace", "minecraft:raw_iron", "minecraft:oak_planks"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:crimson_hyphae\"}]" + } + } + }, + { + "pos": [1, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:oak_planks\"}]" + } + } + } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "false", + "nbt": { + "lit_total_time": "0s", + "Items[1].id": "\"minecraft:crimson_hyphae\"", + "Items[1].count": 1 + } + } + }, + { + "pos": [1, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "true", + "nbt": {"lit_total_time": "300s", "Items[0].id": "\"minecraft:raw_iron\""} + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/hyphae/crimson_hyphae_placement_north_face_axis_z.json b/tests/decoration/hyphae/crimson_hyphae_placement_north_face_axis_z.json new file mode 100644 index 0000000..bc5f545 --- /dev/null +++ b/tests/decoration/hyphae/crimson_hyphae_placement_north_face_axis_z.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Crimson Hyphae Placement North Face Axis Z", + "description": "Using crimson hyphae on the north face of stone places it with axis z (the axis of the clicked face).", + "tags": ["hyphae", "placement", "axis", "player"], + "minecraftIds": ["minecraft:crimson_hyphae", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, -3], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:crimson_hyphae", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-3, 0, -3], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0] , "is": {"id": "minecraft:stone"} }, + { "pos": [0, 2, -1], "is": {"id": "minecraft:crimson_hyphae", "axis": "z"} }, + { "is": {"id": "minecraft:crimson_hyphae", "count": 1} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/hyphae/crimson_hyphae_placement_top_axis_y.json b/tests/decoration/hyphae/crimson_hyphae_placement_top_axis_y.json new file mode 100644 index 0000000..5c5cece --- /dev/null +++ b/tests/decoration/hyphae/crimson_hyphae_placement_top_axis_y.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Crimson Hyphae Placement Top Axis Y", + "description": "Using crimson hyphae on the top face of stone places it with axis y and consumes one item.", + "tags": ["hyphae", "placement", "axis", "player"], + "minecraftIds": ["minecraft:crimson_hyphae", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:crimson_hyphae", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_hyphae", "axis": "y"} }, + { "is": {"id": "minecraft:crimson_hyphae", "count": 1} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/hyphae/crimson_hyphae_placement_west_face_axis_x.json b/tests/decoration/hyphae/crimson_hyphae_placement_west_face_axis_x.json new file mode 100644 index 0000000..fc22cd3 --- /dev/null +++ b/tests/decoration/hyphae/crimson_hyphae_placement_west_face_axis_x.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Crimson Hyphae Placement West Face Axis X", + "description": "Using crimson hyphae on the west face of stone places it with axis x (the axis of the clicked face).", + "tags": ["hyphae", "placement", "axis", "player"], + "minecraftIds": ["minecraft:crimson_hyphae", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, -3], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:crimson_hyphae", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-3, 0, -3], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-2.5, 1, 0.5], "rot": [-90, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0] , "is": {"id": "minecraft:stone"} }, + { "pos": [-1, 2, 0], "is": {"id": "minecraft:crimson_hyphae", "axis": "x"} }, + { "is": {"id": "minecraft:crimson_hyphae", "count": 1} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/hyphae/crimson_hyphae_shield_offhand_blocks_strip.json b/tests/decoration/hyphae/crimson_hyphae_shield_offhand_blocks_strip.json new file mode 100644 index 0000000..cf8a12a --- /dev/null +++ b/tests/decoration/hyphae/crimson_hyphae_shield_offhand_blocks_strip.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Crimson Hyphae Shield Offhand Blocks Strip", + "description": "With a shield in the off hand and no sneaking, a main-hand axe leaves crimson hyphae unstripped.", + "tags": ["hyphae", "axe", "shield", "player"], + "minecraftIds": [ + "minecraft:crimson_hyphae", "minecraft:crimson_hyphae", "minecraft:iron_axe" , "minecraft:stone" , + "minecraft:shield" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_axe"}, "off_hand": {"id": "minecraft:shield"} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_hyphae", "axis": "y"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_hyphae", "axis": "y"} }, + { "is": {"id": "minecraft:iron_axe" }, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/hyphae/stripped_warped_hyphae_axe_does_nothing.json b/tests/decoration/hyphae/stripped_warped_hyphae_axe_does_nothing.json new file mode 100644 index 0000000..720889f --- /dev/null +++ b/tests/decoration/hyphae/stripped_warped_hyphae_axe_does_nothing.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Stripped Warped Hyphae Axe Does Nothing", + "description": "An axe used on stripped warped hyphae changes nothing: the block and its axis stay the same.", + "tags": ["hyphae", "axe", "strip", "player"], + "minecraftIds": [ + "minecraft:stripped_warped_hyphae", "minecraft:stripped_warped_hyphae", "minecraft:iron_axe" , + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_axe"} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:stripped_warped_hyphae", "axis": "x"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stripped_warped_hyphae", "axis": "x"} }, + { "is": {"id": "minecraft:iron_axe" }, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + From f424cd28162e35b027fdf719e64fb4f98e26b793 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Thu, 29 Oct 2026 04:06:20 +0100 Subject: [PATCH 32/85] Add Flint tests for crimson_roots (1 blocks) --- .../crimson_roots_piston_destroys.json | 60 +++++++++++++++ .../crimson_roots_placement_on_supports.json | 76 +++++++++++++++++++ ...placement_rejected_on_invalid_support.json | 60 +++++++++++++++ .../crimson_roots/crimson_roots_potting.json | 47 ++++++++++++ .../crimson_roots_rejects_bonemeal.json | 58 ++++++++++++++ ...son_roots_replaced_by_block_placement.json | 50 ++++++++++++ .../crimson_roots_replaced_by_water.json | 48 ++++++++++++ .../crimson_roots_support_loss.json | 60 +++++++++++++++ ...crimson_roots_support_loss_drops_item.json | 46 +++++++++++ 9 files changed, 505 insertions(+) create mode 100644 tests/vegetation/crimson_roots/crimson_roots_piston_destroys.json create mode 100644 tests/vegetation/crimson_roots/crimson_roots_placement_on_supports.json create mode 100644 tests/vegetation/crimson_roots/crimson_roots_placement_rejected_on_invalid_support.json create mode 100644 tests/vegetation/crimson_roots/crimson_roots_potting.json create mode 100644 tests/vegetation/crimson_roots/crimson_roots_rejects_bonemeal.json create mode 100644 tests/vegetation/crimson_roots/crimson_roots_replaced_by_block_placement.json create mode 100644 tests/vegetation/crimson_roots/crimson_roots_replaced_by_water.json create mode 100644 tests/vegetation/crimson_roots/crimson_roots_support_loss.json create mode 100644 tests/vegetation/crimson_roots/crimson_roots_support_loss_drops_item.json diff --git a/tests/vegetation/crimson_roots/crimson_roots_piston_destroys.json b/tests/vegetation/crimson_roots/crimson_roots_piston_destroys.json new file mode 100644 index 0000000..54966a2 --- /dev/null +++ b/tests/vegetation/crimson_roots/crimson_roots_piston_destroys.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_roots_piston_destroys", + "description": "A piston pushing into crimson roots destroys them rather than moving them, and its head extends into the space.", + "tags": ["vegetation", "crimson_roots", "piston", "push-reaction"], + "minecraftIds": [ + "minecraft:crimson_nylium", "minecraft:crimson_roots" , "minecraft:piston" , "minecraft:redstone_block", + "minecraft:piston_head" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [12, 4, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -1], [12, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, -1], [12, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [10, 0, 0], "block": {"id": "minecraft:crimson_nylium"} }, + { "pos": [10, 1, 0], "block": {"id": "minecraft:crimson_roots"} }, + { "pos": [9, 1, 0] , "block": {"id": "minecraft:piston", "facing": "east", "extended": false} } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [ 9, 1, 0], "is": {"id": "minecraft:piston" , "facing": "east", "extended": false} }, + { "pos": [10, 1, 0], "is": {"id": "minecraft:crimson_roots" } } + ] + }, + { "at": 5, "do": "place", "pos": [9, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 9, + "do": "assert", + "checks": [ + { "pos": [ 9, 1, 0], "is": {"id": "minecraft:piston" , "facing": "east", "extended": true} }, + { "pos": [10, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east" } }, + { "pos": [11, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_roots/crimson_roots_placement_on_supports.json b/tests/vegetation/crimson_roots/crimson_roots_placement_on_supports.json new file mode 100644 index 0000000..4368786 --- /dev/null +++ b/tests/vegetation/crimson_roots/crimson_roots_placement_on_supports.json @@ -0,0 +1,76 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_roots_placement_on_supports", + "description": "Crimson roots items placed on crimson nylium, warped nylium, soul soil, grass block, dirt and mycelium create roots on each and consume all six items.", + "tags": ["vegetation", "crimson_roots", "placement", "supports-vegetation", "player"], + "minecraftIds": [ + "minecraft:crimson_roots" , "minecraft:crimson_nylium", "minecraft:warped_nylium" , "minecraft:soul_soil" , + "minecraft:grass_block" , "minecraft:dirt" , "minecraft:mycelium" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [6, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:crimson_roots", "count": 6} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [6, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [5, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:crimson_nylium"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:warped_nylium" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:soul_soil" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [5, 0, 0], "block": {"id": "minecraft:mycelium" } } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 0.5], "rot": [0, 90] }, + {"at": 8, "do": "interact"}, + { "at": 9, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 0.5], "rot": [0, 90] }, + {"at": 9, "do": "interact"}, + { "at": 10, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 0.5], "rot": [0, 90] }, + {"at": 10, "do": "interact"}, + { "at": 11, "do": "tp", "entity_alias": "player", "pos": [2.5, 6, 0.5] }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_roots"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:crimson_roots"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:crimson_roots"} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:crimson_roots"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:crimson_roots"} }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:crimson_roots"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_roots/crimson_roots_placement_rejected_on_invalid_support.json b/tests/vegetation/crimson_roots/crimson_roots_placement_rejected_on_invalid_support.json new file mode 100644 index 0000000..660e46a --- /dev/null +++ b/tests/vegetation/crimson_roots/crimson_roots_placement_rejected_on_invalid_support.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_roots_placement_rejected_on_invalid_support", + "description": "Crimson roots items used on netherrack, soul sand and stone place nothing and none of the three items are consumed.", + "tags": ["vegetation", "crimson_roots", "placement", "invalid-support", "player"], + "minecraftIds": ["minecraft:crimson_roots", "minecraft:netherrack", "minecraft:soul_sand", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:crimson_roots", "count": 3} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [2, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:netherrack"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:soul_sand" } } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [1.5, 6, 0.5] }, + { + "at": 9, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:crimson_roots", "count": 3}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_roots/crimson_roots_potting.json b/tests/vegetation/crimson_roots/crimson_roots_potting.json new file mode 100644 index 0000000..987c6b0 --- /dev/null +++ b/tests/vegetation/crimson_roots/crimson_roots_potting.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_roots_potting", + "description": "Using a crimson roots item on an empty flower pot turns it into a potted crimson roots and consumes the item.", + "tags": ["vegetation", "crimson_roots", "flower-pot", "player"], + "minecraftIds": ["minecraft:crimson_roots", "minecraft:flower_pot", "minecraft:potted_crimson_roots"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:crimson_roots", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:flower_pot"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_crimson_roots"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_roots/crimson_roots_rejects_bonemeal.json b/tests/vegetation/crimson_roots/crimson_roots_rejects_bonemeal.json new file mode 100644 index 0000000..dd65e6b --- /dev/null +++ b/tests/vegetation/crimson_roots/crimson_roots_rejects_bonemeal.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_roots_rejects_bonemeal", + "description": "Bone meal used on crimson roots changes nothing around them and is not consumed.", + "tags": ["vegetation", "crimson_roots", "bone-meal", "player"], + "minecraftIds": ["minecraft:crimson_roots", "minecraft:crimson_nylium", "minecraft:bone_meal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -2], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -2], [2, 4, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [-1, 1, -1], [1, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:crimson_nylium"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:crimson_nylium"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_roots" } } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:crimson_roots" } }, + { "pos": [ 1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [ 0, 2, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:bone_meal" , "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_roots/crimson_roots_replaced_by_block_placement.json b/tests/vegetation/crimson_roots/crimson_roots_replaced_by_block_placement.json new file mode 100644 index 0000000..fc617b6 --- /dev/null +++ b/tests/vegetation/crimson_roots/crimson_roots_replaced_by_block_placement.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_roots_replaced_by_block_placement", + "description": "Because crimson roots are replaceable, placing a stone block against them replaces the roots in their own position instead of going on top.", + "tags": ["vegetation", "crimson_roots", "replaceable", "placement", "player"], + "minecraftIds": ["minecraft:crimson_roots", "minecraft:crimson_nylium", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:crimson_nylium"} }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_roots"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:crimson_nylium"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_roots/crimson_roots_replaced_by_water.json b/tests/vegetation/crimson_roots/crimson_roots_replaced_by_water.json new file mode 100644 index 0000000..0cb3411 --- /dev/null +++ b/tests/vegetation/crimson_roots/crimson_roots_replaced_by_water.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_roots_replaced_by_water", + "description": "Water flowing from an adjacent source into the space of crimson roots replaces them.", + "tags": ["vegetation", "crimson_roots", "fluid", "replaceable"], + "minecraftIds": ["minecraft:crimson_nylium", "minecraft:crimson_roots", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [10, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [10, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [2, 2, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:crimson_nylium"} }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_roots"} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_roots"} } + ] + }, + { "at": 5, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:water"} }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_roots/crimson_roots_support_loss.json b/tests/vegetation/crimson_roots/crimson_roots_support_loss.json new file mode 100644 index 0000000..74f7f78 --- /dev/null +++ b/tests/vegetation/crimson_roots/crimson_roots_support_loss.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_roots_support_loss", + "description": "Crimson roots on crimson nylium and on soul soil become air once the block beneath them is removed.", + "tags": ["vegetation", "crimson_roots", "support", "neighbor-update"], + "minecraftIds": ["minecraft:crimson_roots", "minecraft:crimson_nylium", "minecraft:soul_soil"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [2, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [2, 2, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [1, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:crimson_nylium"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:soul_soil" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_roots" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:crimson_roots" } } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_roots"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:crimson_roots"} } + ] + }, + { "at": 5, "do": "remove", "pos": [0, 0, 0] }, + { "at": 5, "do": "remove", "pos": [1, 0, 0] }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/crimson_roots/crimson_roots_support_loss_drops_item.json b/tests/vegetation/crimson_roots/crimson_roots_support_loss_drops_item.json new file mode 100644 index 0000000..7934a68 --- /dev/null +++ b/tests/vegetation/crimson_roots/crimson_roots_support_loss_drops_item.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "crimson_roots_support_loss_drops_item", + "description": "Crimson roots that lose their support are removed and drop one crimson roots item.", + "tags": ["vegetation", "crimson_roots", "support", "drops", "neighbor-update"], + "minecraftIds": ["minecraft:crimson_nylium", "minecraft:crimson_roots", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [12, 4, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -1], [12, 2, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [10, 1, 0], [10, 2, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [10, 0, 0], "block": {"id": "minecraft:crimson_nylium"} }, + { "at": 4, "do": "place", "pos": [10, 1, 0], "block": {"id": "minecraft:crimson_roots"} }, + { "at": 5, "do": "remove", "pos": [10, 0, 0] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [10, 1, 0], "is": {"id": "minecraft:air"} }, + { + "is": "minecraft:item", + "exists": true, + "count": 1, + "Item": "{count: 1, id: \"minecraft:crimson_roots\"}" + } + ] + } + ], + "breakpoints": [] +} + From c61fbc51e91def589b265379c84787611df47ab2 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Thu, 29 Oct 2026 04:11:06 +0100 Subject: [PATCH 33/85] Add Flint tests for crimson_stem (1 blocks) --- .../crimson_stem_axe_strip_keeps_axis.json | 38 ++++++++++++ .../crimson_stem_axe_strips_upright.json | 38 ++++++++++++ .../crimson_stem/crimson_stem_not_fuel.json | 47 +++++++++++++++ .../crimson_stem_not_smelted_to_charcoal.json | 48 +++++++++++++++ .../crimson_stem_placement_north_face.json | 41 +++++++++++++ .../crimson_stem_placement_top.json | 41 +++++++++++++ .../crimson_stem_placement_west_face.json | 41 +++++++++++++ .../crimson_stem_survives_fire.json | 60 +++++++++++++++++++ 8 files changed, 354 insertions(+) create mode 100644 tests/world/crimson_stem/crimson_stem_axe_strip_keeps_axis.json create mode 100644 tests/world/crimson_stem/crimson_stem_axe_strips_upright.json create mode 100644 tests/world/crimson_stem/crimson_stem_not_fuel.json create mode 100644 tests/world/crimson_stem/crimson_stem_not_smelted_to_charcoal.json create mode 100644 tests/world/crimson_stem/crimson_stem_placement_north_face.json create mode 100644 tests/world/crimson_stem/crimson_stem_placement_top.json create mode 100644 tests/world/crimson_stem/crimson_stem_placement_west_face.json create mode 100644 tests/world/crimson_stem/crimson_stem_survives_fire.json diff --git a/tests/world/crimson_stem/crimson_stem_axe_strip_keeps_axis.json b/tests/world/crimson_stem/crimson_stem_axe_strip_keeps_axis.json new file mode 100644 index 0000000..fe521f8 --- /dev/null +++ b/tests/world/crimson_stem/crimson_stem_axe_strip_keeps_axis.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "crimson_stem_axe_strip_keeps_axis", + "description": "Stripping a sideways crimson stem with an axe keeps its axis x.", + "tags": ["crimson_stem", "pillar", "axe", "strip", "block-state", "player"], + "minecraftIds": [ + "minecraft:crimson_stem" , "minecraft:stripped_crimson_stem", "minecraft:iron_axe" , + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_stem", "axis": "x"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stripped_crimson_stem", "axis": "x"} }, + { "is": {"id": "minecraft:iron_axe" }, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/crimson_stem/crimson_stem_axe_strips_upright.json b/tests/world/crimson_stem/crimson_stem_axe_strips_upright.json new file mode 100644 index 0000000..8e00014 --- /dev/null +++ b/tests/world/crimson_stem/crimson_stem_axe_strips_upright.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "crimson_stem_axe_strips_upright", + "description": "A survival player using an axe on an upright crimson stem turns it into a stripped crimson stem with axis y and keeps the axe.", + "tags": ["crimson_stem", "pillar", "axe", "strip", "block-state", "player"], + "minecraftIds": [ + "minecraft:crimson_stem" , "minecraft:stripped_crimson_stem", "minecraft:iron_axe" , + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_stem", "axis": "y"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stripped_crimson_stem", "axis": "y"} }, + { "is": {"id": "minecraft:iron_axe" }, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/crimson_stem/crimson_stem_not_fuel.json b/tests/world/crimson_stem/crimson_stem_not_fuel.json new file mode 100644 index 0000000..e961493 --- /dev/null +++ b/tests/world/crimson_stem/crimson_stem_not_fuel.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "crimson_stem_not_fuel", + "description": "A crimson stem in a furnace fuel slot is not a valid fuel: it is not consumed and the furnace stays unlit.", + "tags": ["crimson_stem", "fuel", "furnace", "block-entity"], + "minecraftIds": ["minecraft:crimson_stem", "minecraft:furnace", "minecraft:raw_iron", "minecraft:coal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:crimson_stem\"}]" + } + } + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "false", + "nbt": { + "lit_total_time": "0s", + "Items[1].id": "\"minecraft:crimson_stem\"", + "Items[1].count": 1 + } + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/crimson_stem/crimson_stem_not_smelted_to_charcoal.json b/tests/world/crimson_stem/crimson_stem_not_smelted_to_charcoal.json new file mode 100644 index 0000000..e5019c3 --- /dev/null +++ b/tests/world/crimson_stem/crimson_stem_not_smelted_to_charcoal.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "crimson_stem_not_smelted_to_charcoal", + "description": "A crimson stem in a furnace input slot is not smelted into charcoal even with coal as fuel: the furnace stays unlit and the coal is not consumed.", + "tags": ["crimson_stem", "fuel", "furnace", "block-entity"], + "minecraftIds": ["minecraft:crimson_stem", "minecraft:furnace", "minecraft:raw_iron", "minecraft:coal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:crimson_stem\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}]" + } + } + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "false", + "nbt": { + "lit_total_time": "0s", + "Items[0].id": "\"minecraft:crimson_stem\"", + "Items[1].id": "\"minecraft:coal\"", + "Items[1].count": 1 + } + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/crimson_stem/crimson_stem_placement_north_face.json b/tests/world/crimson_stem/crimson_stem_placement_north_face.json new file mode 100644 index 0000000..9b438eb --- /dev/null +++ b/tests/world/crimson_stem/crimson_stem_placement_north_face.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "crimson_stem_placement_north_face", + "description": "A crimson stem placed against the north face of a block gets axis z and uses up the item.", + "tags": ["crimson_stem", "pillar", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:crimson_stem", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -3], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:crimson_stem", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -3], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone"} }, + { "pos": [0, 2, -1], "is": {"id": "minecraft:crimson_stem", "axis": "z"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/crimson_stem/crimson_stem_placement_top.json b/tests/world/crimson_stem/crimson_stem_placement_top.json new file mode 100644 index 0000000..fad21e4 --- /dev/null +++ b/tests/world/crimson_stem/crimson_stem_placement_top.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "crimson_stem_placement_top", + "description": "A crimson stem placed on the top face of a block gets axis y and uses up the item.", + "tags": ["crimson_stem", "pillar", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:crimson_stem", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:crimson_stem", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [0, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_stem", "axis": "y"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/crimson_stem/crimson_stem_placement_west_face.json b/tests/world/crimson_stem/crimson_stem_placement_west_face.json new file mode 100644 index 0000000..e2e775d --- /dev/null +++ b/tests/world/crimson_stem/crimson_stem_placement_west_face.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "crimson_stem_placement_west_face", + "description": "A crimson stem placed against the west face of a block gets axis x and uses up the item.", + "tags": ["crimson_stem", "pillar", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:crimson_stem", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:crimson_stem", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-3, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-2.5, 1, 0.5], "rot": [-90, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [ 0, 2, 0], "is": {"id": "minecraft:stone"} }, + { "pos": [-1, 2, 0], "is": {"id": "minecraft:crimson_stem", "axis": "x"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/crimson_stem/crimson_stem_survives_fire.json b/tests/world/crimson_stem/crimson_stem_survives_fire.json new file mode 100644 index 0000000..f77660a --- /dev/null +++ b/tests/world/crimson_stem/crimson_stem_survives_fire.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "crimson_stem_survives_fire", + "description": "A crimson stem surrounded by fire is never burned, while a wool control block surrounded by the same fire is consumed, so the fire was active.", + "tags": ["crimson_stem", "fire", "flammability", "control"], + "minecraftIds": ["minecraft:crimson_stem", "minecraft:white_wool", "minecraft:fire", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [6, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -1], [6, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:crimson_stem", "axis": "y"} }, + { "at": 0, "do": "place", "pos": [5, 1, 0], "block": {"id": "minecraft:white_wool"} }, + { "at": 0, "do": "place", "pos": [5, 2, 0], "block": {"id": "minecraft:white_wool"} }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:fire"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:fire"} }, + { "pos": [1, 1, -1], "block": {"id": "minecraft:fire"} }, + { "pos": [1, 1, 1], "block": {"id": "minecraft:fire"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:fire"} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:fire"} }, + { "pos": [5, 1, -1], "block": {"id": "minecraft:fire"} }, + { "pos": [5, 1, 1], "block": {"id": "minecraft:fire"} }, + { "pos": [4, 2, 0], "block": {"id": "minecraft:fire"} }, + { "pos": [6, 2, 0], "block": {"id": "minecraft:fire"} }, + { "pos": [5, 2, -1], "block": {"id": "minecraft:fire"} }, + { "pos": [5, 2, 1], "block": {"id": "minecraft:fire"} } + ] + }, + { + "at": 200, + "do": "assert", + "checks": [ + { + "pos": [ 5 , 2 , 0 ], + "is" : [ {"id": "minecraft:air"}, {"id": "minecraft:fire"} ] + }, + { + "pos": [ 5 , 1 , 0 ], + "is" : [ {"id": "minecraft:air"}, {"id": "minecraft:fire"} ] + }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:crimson_stem", "axis": "y"} } + ] + } + ], + "breakpoints": [] +} + From 2684a05dfc990b2bb47e6e4b8c2d512ca56bd50e Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Thu, 29 Oct 2026 04:20:22 +0100 Subject: [PATCH 34/85] Add Flint tests for dandelion (1 blocks) --- .../dandelion/dandelion_burned_by_lava.json | 56 +++++++++++++ .../dandelion/dandelion_piston_destroys.json | 63 ++++++++++++++ .../dandelion_placement_on_supports.json | 83 +++++++++++++++++++ ...placement_rejected_on_invalid_support.json | 53 ++++++++++++ .../dandelion_potting_in_empty_pot.json | 48 +++++++++++ .../dandelion_rejected_by_filled_pot.json | 48 +++++++++++ .../dandelion/dandelion_rejects_bonemeal.json | 59 +++++++++++++ .../dandelion/dandelion_support_loss.json | 64 ++++++++++++++ .../dandelion_washed_away_by_water.json | 56 +++++++++++++ 9 files changed, 530 insertions(+) create mode 100644 tests/vegetation/dandelion/dandelion_burned_by_lava.json create mode 100644 tests/vegetation/dandelion/dandelion_piston_destroys.json create mode 100644 tests/vegetation/dandelion/dandelion_placement_on_supports.json create mode 100644 tests/vegetation/dandelion/dandelion_placement_rejected_on_invalid_support.json create mode 100644 tests/vegetation/dandelion/dandelion_potting_in_empty_pot.json create mode 100644 tests/vegetation/dandelion/dandelion_rejected_by_filled_pot.json create mode 100644 tests/vegetation/dandelion/dandelion_rejects_bonemeal.json create mode 100644 tests/vegetation/dandelion/dandelion_support_loss.json create mode 100644 tests/vegetation/dandelion/dandelion_washed_away_by_water.json diff --git a/tests/vegetation/dandelion/dandelion_burned_by_lava.json b/tests/vegetation/dandelion/dandelion_burned_by_lava.json new file mode 100644 index 0000000..b68c53c --- /dev/null +++ b/tests/vegetation/dandelion/dandelion_burned_by_lava.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dandelion_burned_by_lava", + "description": "Lava flowing into a dandelion replaces it and the dandelion is destroyed without dropping an item.", + "tags": ["vegetation", "dandelion", "fluid", "drops"], + "minecraftIds": ["minecraft:dandelion", "minecraft:dirt", "minecraft:stone", "minecraft:lava", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 3, 1] ] + }, + "player": {"game_mode": "Spectator"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [9, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [9, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [7, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [7, 1, 0], "block": {"id": "minecraft:dandelion"} } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [7, 1, 0], "is": {"id": "minecraft:dandelion"} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { "at": 6, "do": "place", "pos": [6, 1, 0], "block": {"id": "minecraft:lava"} }, + { + "at": 60, + "do": "assert", + "checks": [ + { "pos": [7, 1, 0], "is": {"id": "minecraft:lava"} }, + { "is": "minecraft:item" , "exists": false } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dandelion/dandelion_piston_destroys.json b/tests/vegetation/dandelion/dandelion_piston_destroys.json new file mode 100644 index 0000000..50d3d74 --- /dev/null +++ b/tests/vegetation/dandelion/dandelion_piston_destroys.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dandelion_piston_destroys", + "description": "An extending piston destroys a dandelion in its path instead of pushing it, dropping it as an item and leaving the piston head in its place.", + "tags": ["vegetation", "dandelion", "piston", "push-reaction", "drops"], + "minecraftIds": [ + "minecraft:dandelion" , "minecraft:dirt" , "minecraft:stone" , "minecraft:piston" , + "minecraft:piston_head" , "minecraft:redstone_block", "minecraft:item" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 4, 1] ] + }, + "player": {"game_mode": "Spectator"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [9, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, -1], [9, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [7, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [7, 1, 0], "block": {"id": "minecraft:dandelion" } }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:piston" , "facing": "east"} }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:stone" } } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [7, 1, 0], "is": {"id": "minecraft:dandelion"} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { "at": 6, "do": "place", "pos": [6, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [6, 1, 0], "is": {"id": "minecraft:piston", "extended": true, "facing": "east"} }, + { "pos": [7, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east"} } , + { "pos": [8, 1, 0], "is": {"id": "minecraft:stone"} } , + {"is": "minecraft:item", "exists": true, "count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dandelion/dandelion_placement_on_supports.json b/tests/vegetation/dandelion/dandelion_placement_on_supports.json new file mode 100644 index 0000000..0db3355 --- /dev/null +++ b/tests/vegetation/dandelion/dandelion_placement_on_supports.json @@ -0,0 +1,83 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dandelion_placement_on_supports", + "description": "Dandelion items placed on grass block, dirt, podzol, mud, moss block and farmland create a dandelion on each and consume all six items.", + "tags": ["vegetation", "dandelion", "placement", "supports-vegetation", "player"], + "minecraftIds": [ + "minecraft:dandelion" , "minecraft:grass_block", "minecraft:dirt" , "minecraft:podzol" , + "minecraft:mud" , "minecraft:moss_block" , "minecraft:farmland" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [6, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dandelion", "count": 6} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [6, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [5, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:podzol" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:mud" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:moss_block" } }, + { "pos": [5, 0, 0], "block": {"id": "minecraft:farmland" } } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 0.5], "rot": [0, 90] }, + {"at": 8, "do": "interact"}, + { "at": 9, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 0.5], "rot": [0, 90] }, + {"at": 9, "do": "interact"}, + { "at": 10, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 0.5], "rot": [0, 90] }, + {"at": 10, "do": "interact"}, + { "at": 11, "do": "tp", "entity_alias": "player", "pos": [2.5, 6, 0.5] }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dandelion"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:dandelion"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:dandelion"} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:dandelion"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:dandelion"} }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:dandelion"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + }, + { "at": 13, "do": "tp", "entity_alias": "player", "pos": [12.5, 6, 0.5] }, + { "at": 13, "do": "remove", "pos": [0, 1, 0] }, + { "at": 13, "do": "remove", "pos": [1, 1, 0] }, + { "at": 13, "do": "remove", "pos": [2, 1, 0] }, + { "at": 13, "do": "remove", "pos": [3, 1, 0] }, + { "at": 13, "do": "remove", "pos": [4, 1, 0] }, + { "at": 13, "do": "remove", "pos": [5, 1, 0] } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dandelion/dandelion_placement_rejected_on_invalid_support.json b/tests/vegetation/dandelion/dandelion_placement_rejected_on_invalid_support.json new file mode 100644 index 0000000..d54a531 --- /dev/null +++ b/tests/vegetation/dandelion/dandelion_placement_rejected_on_invalid_support.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dandelion_placement_rejected_on_invalid_support", + "description": "Dandelion items used on stone and sand do not place a dandelion and are not consumed, because neither block supports vegetation.", + "tags": ["vegetation", "dandelion", "placement", "supports-vegetation", "player"], + "minecraftIds": ["minecraft:dandelion", "minecraft:stone", "minecraft:sand"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, -1], [9, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dandelion", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [7.5, 6, 0.5] }, + { + "at": 0, + "do": "fill", + "region": [ [6, -1, -1], [9, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [7, 1, 0], [8, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [8, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [7.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [8.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [7.5, 6, 0.5] }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [7, 0, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [7, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [8, 0, 0], "is": {"id": "minecraft:sand" } }, + { "pos": [8, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:dandelion", "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dandelion/dandelion_potting_in_empty_pot.json b/tests/vegetation/dandelion/dandelion_potting_in_empty_pot.json new file mode 100644 index 0000000..177b72a --- /dev/null +++ b/tests/vegetation/dandelion/dandelion_potting_in_empty_pot.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dandelion_potting_in_empty_pot", + "description": "A dandelion item used on an empty flower pot turns it into a potted dandelion and consumes the item.", + "tags": ["vegetation", "dandelion", "flower-pot", "player"], + "minecraftIds": ["minecraft:dandelion", "minecraft:stone", "minecraft:flower_pot", "minecraft:potted_dandelion"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -2], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dandelion", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, -1, -2], [2, 4, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [-1, 1, -1], [1, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:flower_pot"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_dandelion"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dandelion/dandelion_rejected_by_filled_pot.json b/tests/vegetation/dandelion/dandelion_rejected_by_filled_pot.json new file mode 100644 index 0000000..85bf6be --- /dev/null +++ b/tests/vegetation/dandelion/dandelion_rejected_by_filled_pot.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dandelion_rejected_by_filled_pot", + "description": "A dandelion item used on a flower pot that already holds a poppy leaves the pot unchanged and is not consumed.", + "tags": ["vegetation", "dandelion", "flower-pot", "player"], + "minecraftIds": ["minecraft:dandelion", "minecraft:stone", "minecraft:potted_poppy", "minecraft:potted_poppy"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -2], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dandelion", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, -1, -2], [2, 4, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [-1, 1, -1], [1, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:potted_poppy"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_poppy" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:dandelion" , "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dandelion/dandelion_rejects_bonemeal.json b/tests/vegetation/dandelion/dandelion_rejects_bonemeal.json new file mode 100644 index 0000000..a17d9ba --- /dev/null +++ b/tests/vegetation/dandelion/dandelion_rejects_bonemeal.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dandelion_rejects_bonemeal", + "description": "Bone meal used on a dandelion does nothing: the flower stays, no flowers grow around it, and the bone meal is not consumed.", + "tags": ["vegetation", "dandelion", "bone-meal", "player"], + "minecraftIds": ["minecraft:dandelion", "minecraft:dirt", "minecraft:stone", "minecraft:bone_meal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -2], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, -1, -2], [2, 4, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [-1, 1, -1], [1, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:dandelion"} } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:dandelion" } }, + { "pos": [ 1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [ 0, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [ 0, 1, -1], "is": {"id": "minecraft:air" } }, + { "pos": [ 0, 2, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:bone_meal", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dandelion/dandelion_support_loss.json b/tests/vegetation/dandelion/dandelion_support_loss.json new file mode 100644 index 0000000..f41bdee --- /dev/null +++ b/tests/vegetation/dandelion/dandelion_support_loss.json @@ -0,0 +1,64 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dandelion_support_loss", + "description": "A dandelion survives on dirt and farmland, then breaks and drops itself as an item when the block beneath it is removed.", + "tags": ["vegetation", "dandelion", "support", "neighbor-update", "drops"], + "minecraftIds": [ + "minecraft:dandelion", "minecraft:stone" , "minecraft:dirt" , "minecraft:farmland" , + "minecraft:item" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 5, 1] ] + }, + "player": {"game_mode": "Spectator"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [9, 5, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, -1], [9, 5, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [6, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:dandelion"} }, + { "pos": [8, 0, 0], "block": {"id": "minecraft:farmland" } }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:dandelion"} } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [6, 1, 0], "is": {"id": "minecraft:dandelion"} }, + { "pos": [8, 1, 0], "is": {"id": "minecraft:dandelion"} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { "at": 5, "do": "remove", "pos": [6, 0, 0] }, + { "at": 5, "do": "remove", "pos": [8, 0, 0] }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [6, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [8, 1, 0], "is": {"id": "minecraft:air"} }, + { "is": "minecraft:item" , "exists": true, "count": 2 } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dandelion/dandelion_washed_away_by_water.json b/tests/vegetation/dandelion/dandelion_washed_away_by_water.json new file mode 100644 index 0000000..4b0280c --- /dev/null +++ b/tests/vegetation/dandelion/dandelion_washed_away_by_water.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dandelion_washed_away_by_water", + "description": "Water flowing into a dandelion replaces it and drops it as an item.", + "tags": ["vegetation", "dandelion", "fluid", "drops"], + "minecraftIds": ["minecraft:dandelion", "minecraft:dirt", "minecraft:stone", "minecraft:water", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 3, 1] ] + }, + "player": {"game_mode": "Spectator"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [9, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [9, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [7, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [7, 1, 0], "block": {"id": "minecraft:dandelion"} } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [7, 1, 0], "is": {"id": "minecraft:dandelion"} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { "at": 6, "do": "place", "pos": [6, 1, 0], "block": {"id": "minecraft:water"} }, + { + "at": 16, + "do": "assert", + "checks": [ + { "pos": [7, 1, 0], "is": {"id": "minecraft:water"} }, + { "is": "minecraft:item" , "exists": true } + ] + } + ], + "breakpoints": [] +} + From d82e86b12a8fa23ce10dbb15f88d1299cdfab073 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Thu, 29 Oct 2026 05:06:41 +0100 Subject: [PATCH 35/85] Add Flint tests for daylight_detector (1 blocks) --- ...ylight_sensor_adventure_cannot_toggle.json | 35 ++++++++++++++ .../daylight_sensor_corrects_stale_power.json | 39 +++++++++++++++ ...ght_sensor_enclosed_inverted_midnight.json | 38 +++++++++++++++ ...aylight_sensor_enclosed_inverted_noon.json | 38 +++++++++++++++ ...light_sensor_enclosed_normal_midnight.json | 38 +++++++++++++++ .../daylight_sensor_enclosed_normal_noon.json | 38 +++++++++++++++ ...aylight_sensor_not_pushable_by_piston.json | 48 +++++++++++++++++++ .../daylight_sensor_placed_by_player.json | 42 ++++++++++++++++ .../daylight_sensor_powers_adjacent_dust.json | 37 ++++++++++++++ .../daylight_sensor_rain_dims_output.json | 35 ++++++++++++++ .../daylight_sensor_side_light_only.json | 37 ++++++++++++++ .../daylight_sensor_thunder_dims_output.json | 35 ++++++++++++++ .../daylight_sensor_toggle_to_inverted.json | 35 ++++++++++++++ .../daylight_sensor_toggle_to_normal.json | 35 ++++++++++++++ 14 files changed, 530 insertions(+) create mode 100644 tests/redstone/daylight_sensor/daylight_sensor_adventure_cannot_toggle.json create mode 100644 tests/redstone/daylight_sensor/daylight_sensor_corrects_stale_power.json create mode 100644 tests/redstone/daylight_sensor/daylight_sensor_enclosed_inverted_midnight.json create mode 100644 tests/redstone/daylight_sensor/daylight_sensor_enclosed_inverted_noon.json create mode 100644 tests/redstone/daylight_sensor/daylight_sensor_enclosed_normal_midnight.json create mode 100644 tests/redstone/daylight_sensor/daylight_sensor_enclosed_normal_noon.json create mode 100644 tests/redstone/daylight_sensor/daylight_sensor_not_pushable_by_piston.json create mode 100644 tests/redstone/daylight_sensor/daylight_sensor_placed_by_player.json create mode 100644 tests/redstone/daylight_sensor/daylight_sensor_powers_adjacent_dust.json create mode 100644 tests/redstone/daylight_sensor/daylight_sensor_rain_dims_output.json create mode 100644 tests/redstone/daylight_sensor/daylight_sensor_side_light_only.json create mode 100644 tests/redstone/daylight_sensor/daylight_sensor_thunder_dims_output.json create mode 100644 tests/redstone/daylight_sensor/daylight_sensor_toggle_to_inverted.json create mode 100644 tests/redstone/daylight_sensor/daylight_sensor_toggle_to_normal.json diff --git a/tests/redstone/daylight_sensor/daylight_sensor_adventure_cannot_toggle.json b/tests/redstone/daylight_sensor/daylight_sensor_adventure_cannot_toggle.json new file mode 100644 index 0000000..b1df4c2 --- /dev/null +++ b/tests/redstone/daylight_sensor/daylight_sensor_adventure_cannot_toggle.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "daylight_sensor_adventure_cannot_toggle", + "description": "An Adventure-mode player cannot toggle a daylight detector because mayBuild is false; inverted and power stay unchanged.", + "tags": ["redstone", "daylight-sensor", "player"], + "minecraftIds": ["minecraft:daylight_detector"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 3, 1] ] + }, + "world": {"time": "6000"}, + "player": {"game_mode": "Adventure"} + }, + "timeline": [ + { + "at": 105, + "do": "place", + "pos": [1, 0, 0], + "block": {"id": "minecraft:daylight_detector", "inverted": false, "power": 15} + }, + { "at": 106, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 107, "do": "interact"}, + { + "at": 110, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:daylight_detector", "inverted": false, "power": 15} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/daylight_sensor/daylight_sensor_corrects_stale_power.json b/tests/redstone/daylight_sensor/daylight_sensor_corrects_stale_power.json new file mode 100644 index 0000000..eea5912 --- /dev/null +++ b/tests/redstone/daylight_sensor/daylight_sensor_corrects_stale_power.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "daylight_sensor_corrects_stale_power", + "description": "A daylight detector placed with a wrong stored power of 7 at noon corrects itself to 15 on its next 20-tick update.", + "tags": ["redstone", "daylight-sensor", "tick"], + "minecraftIds": ["minecraft:daylight_detector"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 3, 1] ] + }, + "world": {"time": "6000"} + }, + "timeline": [ + { + "at": 105, + "do": "place", + "pos": [1, 0, 0], + "block": {"id": "minecraft:daylight_detector", "inverted": false, "power": 7} + }, + { + "at": 106, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:daylight_detector", "power": 7} } + ] + }, + { + "at": 130, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:daylight_detector", "inverted": false, "power": 15} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/daylight_sensor/daylight_sensor_enclosed_inverted_midnight.json b/tests/redstone/daylight_sensor/daylight_sensor_enclosed_inverted_midnight.json new file mode 100644 index 0000000..3a352f9 --- /dev/null +++ b/tests/redstone/daylight_sensor/daylight_sensor_enclosed_inverted_midnight.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "daylight_sensor_enclosed_inverted_midnight", + "description": "An inverted daylight detector fully enclosed in stone at midnight computes 15 - (0 - sky darkening) which exceeds 15 and is clamped to 15.", + "tags": ["redstone", "daylight-sensor", "sky-light"], + "minecraftIds": ["minecraft:daylight_detector", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 3, 1] ] + }, + "world": {"time": "18000"} + }, + "timeline": [ + { + "at": 105, + "do": "fill", + "region": [ [0, -1, -1], [2, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 106, + "do": "place", + "pos": [1, 0, 0], + "block": {"id": "minecraft:daylight_detector", "inverted": true} + }, + { + "at": 130, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:daylight_detector", "inverted": true, "power": 15} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/daylight_sensor/daylight_sensor_enclosed_inverted_noon.json b/tests/redstone/daylight_sensor/daylight_sensor_enclosed_inverted_noon.json new file mode 100644 index 0000000..68dc144 --- /dev/null +++ b/tests/redstone/daylight_sensor/daylight_sensor_enclosed_inverted_noon.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "daylight_sensor_enclosed_inverted_noon", + "description": "An inverted daylight detector fully enclosed in stone gets no sky light and outputs 15 at noon.", + "tags": ["redstone", "daylight-sensor", "sky-light"], + "minecraftIds": ["minecraft:daylight_detector", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 3, 1] ] + }, + "world": {"time": "6000"} + }, + "timeline": [ + { + "at": 105, + "do": "fill", + "region": [ [0, -1, -1], [2, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 106, + "do": "place", + "pos": [1, 0, 0], + "block": {"id": "minecraft:daylight_detector", "inverted": true} + }, + { + "at": 130, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:daylight_detector", "inverted": true, "power": 15} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/daylight_sensor/daylight_sensor_enclosed_normal_midnight.json b/tests/redstone/daylight_sensor/daylight_sensor_enclosed_normal_midnight.json new file mode 100644 index 0000000..fdd5297 --- /dev/null +++ b/tests/redstone/daylight_sensor/daylight_sensor_enclosed_normal_midnight.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "daylight_sensor_enclosed_normal_midnight", + "description": "A normal daylight detector fully enclosed in stone at midnight computes a negative target which is clamped to 0.", + "tags": ["redstone", "daylight-sensor", "sky-light"], + "minecraftIds": ["minecraft:daylight_detector", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 3, 1] ] + }, + "world": {"time": "18000"} + }, + "timeline": [ + { + "at": 105, + "do": "fill", + "region": [ [0, -1, -1], [2, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 106, + "do": "place", + "pos": [1, 0, 0], + "block": {"id": "minecraft:daylight_detector", "inverted": false} + }, + { + "at": 130, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:daylight_detector", "inverted": false, "power": 0} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/daylight_sensor/daylight_sensor_enclosed_normal_noon.json b/tests/redstone/daylight_sensor/daylight_sensor_enclosed_normal_noon.json new file mode 100644 index 0000000..dfc6d02 --- /dev/null +++ b/tests/redstone/daylight_sensor/daylight_sensor_enclosed_normal_noon.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "daylight_sensor_enclosed_normal_noon", + "description": "A normal daylight detector fully enclosed in stone gets no sky light and outputs 0 even at noon.", + "tags": ["redstone", "daylight-sensor", "sky-light"], + "minecraftIds": ["minecraft:daylight_detector", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 3, 1] ] + }, + "world": {"time": "6000"} + }, + "timeline": [ + { + "at": 105, + "do": "fill", + "region": [ [0, -1, -1], [2, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 106, + "do": "place", + "pos": [1, 0, 0], + "block": {"id": "minecraft:daylight_detector", "inverted": false} + }, + { + "at": 130, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:daylight_detector", "inverted": false, "power": 0} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/daylight_sensor/daylight_sensor_not_pushable_by_piston.json b/tests/redstone/daylight_sensor/daylight_sensor_not_pushable_by_piston.json new file mode 100644 index 0000000..e755979 --- /dev/null +++ b/tests/redstone/daylight_sensor/daylight_sensor_not_pushable_by_piston.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "daylight_sensor_not_pushable_by_piston", + "description": "A daylight detector is a BaseEntityBlock, so its state has a block entity, and PistonBaseBlock.isPushable ends with return !state.hasBlockEntity() (its push reaction is the default NORMAL and its destroy speed is not -1): a powered piston facing it stays retracted and the detector stays in place, while a control piston facing a stone block extends and moves it.", + "tags": ["redstone", "daylight-sensor", "piston"], + "minecraftIds": ["minecraft:daylight_detector", "minecraft:piston", "minecraft:stone", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 3, 1] ] + }, + "world": {"time": "6000"} + }, + "timeline": [ + { + "at": 105, + "do": "place_each", + "blocks": [ + { "pos": [1, 0, 0], "block": {"id": "minecraft:daylight_detector", "inverted": false} }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 0, 0], "block": {"id": "minecraft:piston", "facing": "east"} }, + { "pos": [0, 0, 1], "block": {"id": "minecraft:piston", "facing": "east"} } + ] + }, + { + "at": 106, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, -1], "block": {"id": "minecraft:redstone_block"} }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} } + ] + }, + { + "at": 115, + "do": "assert", + "checks": [ + { "pos": [0, 0, 1], "is": {"id": "minecraft:piston" , "facing": "east", "extended": true } }, + { "pos": [2, 0, 1], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 0], "is": {"id": "minecraft:piston" , "facing": "east", "extended": false} }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:daylight_detector" } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/daylight_sensor/daylight_sensor_placed_by_player.json b/tests/redstone/daylight_sensor/daylight_sensor_placed_by_player.json new file mode 100644 index 0000000..d49af7d --- /dev/null +++ b/tests/redstone/daylight_sensor/daylight_sensor_placed_by_player.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "daylight_sensor_placed_by_player", + "description": "A Survival player placing a daylight detector from the hotbar onto stone gets a normal detector, consumes the item, and the detector reaches full daytime power within one 20-tick update.", + "tags": ["redstone", "daylight-sensor", "placement", "player"], + "minecraftIds": ["minecraft:daylight_detector", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 3, 1] ] + }, + "world": {"time": "6000"}, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:daylight_detector", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 105, "do": "place", "pos": [1, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 106, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 107, "do": "interact"}, + { + "at": 109, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:daylight_detector", "inverted": false} }, + {"is": "empty", "slot": "hotbar1"} + ] + }, + { + "at": 135, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:daylight_detector", "inverted": false, "power": 15} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/daylight_sensor/daylight_sensor_powers_adjacent_dust.json b/tests/redstone/daylight_sensor/daylight_sensor_powers_adjacent_dust.json new file mode 100644 index 0000000..0c2b05b --- /dev/null +++ b/tests/redstone/daylight_sensor/daylight_sensor_powers_adjacent_dust.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "daylight_sensor_powers_adjacent_dust", + "description": "A daylight detector's power is output exactly to adjacent redstone dust: an inverted detector capped by a block at noon has sky light 14, power 1, and the dust beside it reads 1.", + "tags": ["redstone", "daylight-sensor", "redstone-wire", "signal"], + "minecraftIds": ["minecraft:daylight_detector", "minecraft:redstone_wire"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 3, 1] ] + }, + "world": {"time": "6000"} + }, + "timeline": [ + { + "at": 105, + "do": "place_each", + "blocks": [ + { "pos": [2, -1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:daylight_detector", "inverted": true} }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:redstone_wire" } } + ] + }, + { + "at": 130, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:daylight_detector", "inverted": true, "power": 1} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:redstone_wire" , "power": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/daylight_sensor/daylight_sensor_rain_dims_output.json b/tests/redstone/daylight_sensor/daylight_sensor_rain_dims_output.json new file mode 100644 index 0000000..6b96269 --- /dev/null +++ b/tests/redstone/daylight_sensor/daylight_sensor_rain_dims_output.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "daylight_sensor_rain_dims_output", + "description": "At noon in full rain the sky light level is 15 - 11 * 0.3125 = 11.5625 so sky darkening is 3; a normal detector outputs 12 and an inverted one outputs 3.", + "tags": ["redstone", "daylight-sensor", "weather"], + "minecraftIds": ["minecraft:daylight_detector"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 3, 1] ] + }, + "world": {"time": "6000", "weather": "rain"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 0, -1], "block": {"id": "minecraft:daylight_detector", "inverted": false} }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:daylight_detector", "inverted": true } } + ] + }, + { + "at": 160, + "do": "assert", + "checks": [ + { "pos": [1, 0, -1], "is": {"id": "minecraft:daylight_detector", "inverted": false, "power": 12} }, + { "pos": [1, 0, 1], "is": {"id": "minecraft:daylight_detector", "inverted": true , "power": 3} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/daylight_sensor/daylight_sensor_side_light_only.json b/tests/redstone/daylight_sensor/daylight_sensor_side_light_only.json new file mode 100644 index 0000000..85da9c8 --- /dev/null +++ b/tests/redstone/daylight_sensor/daylight_sensor_side_light_only.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "daylight_sensor_side_light_only", + "description": "A daylight detector with a solid block directly above it receives sky light only from the sides, which is 14, so at noon a normal one outputs 14 and an inverted one outputs 1.", + "tags": ["redstone", "daylight-sensor", "sky-light"], + "minecraftIds": ["minecraft:daylight_detector", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 3, 1] ] + }, + "world": {"time": "6000"} + }, + "timeline": [ + { + "at": 105, + "do": "place_each", + "blocks": [ + { "pos": [1, 1, -1], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, -1], "block": {"id": "minecraft:daylight_detector", "inverted": false} }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:daylight_detector", "inverted": true } } + ] + }, + { + "at": 130, + "do": "assert", + "checks": [ + { "pos": [1, 0, -1], "is": {"id": "minecraft:daylight_detector", "inverted": false, "power": 14} }, + { "pos": [1, 0, 1], "is": {"id": "minecraft:daylight_detector", "inverted": true , "power": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/daylight_sensor/daylight_sensor_thunder_dims_output.json b/tests/redstone/daylight_sensor/daylight_sensor_thunder_dims_output.json new file mode 100644 index 0000000..dea10cd --- /dev/null +++ b/tests/redstone/daylight_sensor/daylight_sensor_thunder_dims_output.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "daylight_sensor_thunder_dims_output", + "description": "At noon in full thunder the sky light level is 15 - 11 * 0.52734375 = 9.199 so sky darkening is 5; a normal detector outputs 10 and an inverted one outputs 5.", + "tags": ["redstone", "daylight-sensor", "weather"], + "minecraftIds": ["minecraft:daylight_detector"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 3, 1] ] + }, + "world": {"time": "6000", "weather": "thunder"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 0, -1], "block": {"id": "minecraft:daylight_detector", "inverted": false} }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:daylight_detector", "inverted": true } } + ] + }, + { + "at": 160, + "do": "assert", + "checks": [ + { "pos": [1, 0, -1], "is": {"id": "minecraft:daylight_detector", "inverted": false, "power": 10} }, + { "pos": [1, 0, 1], "is": {"id": "minecraft:daylight_detector", "inverted": true , "power": 5} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/daylight_sensor/daylight_sensor_toggle_to_inverted.json b/tests/redstone/daylight_sensor/daylight_sensor_toggle_to_inverted.json new file mode 100644 index 0000000..c606c82 --- /dev/null +++ b/tests/redstone/daylight_sensor/daylight_sensor_toggle_to_inverted.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "daylight_sensor_toggle_to_inverted", + "description": "Right-clicking a normal daylight detector at noon with an empty hand makes it inverted and immediately drops its power from 15 to 0.", + "tags": ["redstone", "daylight-sensor", "player"], + "minecraftIds": ["minecraft:daylight_detector"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 3, 1] ] + }, + "world": {"time": "6000"}, + "player": {"game_mode": "Creative"} + }, + "timeline": [ + { + "at": 105, + "do": "place", + "pos": [1, 0, 0], + "block": {"id": "minecraft:daylight_detector", "inverted": false, "power": 15} + }, + { "at": 106, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 107, "do": "interact"}, + { + "at": 110, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:daylight_detector", "inverted": true, "power": 0} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/daylight_sensor/daylight_sensor_toggle_to_normal.json b/tests/redstone/daylight_sensor/daylight_sensor_toggle_to_normal.json new file mode 100644 index 0000000..0193600 --- /dev/null +++ b/tests/redstone/daylight_sensor/daylight_sensor_toggle_to_normal.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "daylight_sensor_toggle_to_normal", + "description": "Right-clicking an inverted daylight detector at noon with an empty hand makes it normal again and immediately raises its power from 0 to 15.", + "tags": ["redstone", "daylight-sensor", "player"], + "minecraftIds": ["minecraft:daylight_detector"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -1], [2, 3, 1] ] + }, + "world": {"time": "6000"}, + "player": {"game_mode": "Creative"} + }, + "timeline": [ + { + "at": 105, + "do": "place", + "pos": [1, 0, 0], + "block": {"id": "minecraft:daylight_detector", "inverted": true, "power": 0} + }, + { "at": 106, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 107, "do": "interact"}, + { + "at": 110, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:daylight_detector", "inverted": false, "power": 15} } + ] + } + ], + "breakpoints": [] +} + From 07d484017b7ba2c7d58a95e492c036567435cc79 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Thu, 29 Oct 2026 05:12:40 +0100 Subject: [PATCH 36/85] Add Flint tests for coral (5 blocks) --- .../dead_coral_breaks_without_support.json | 42 ++++++++++++ ...dry_not_waterlogged_by_adjacent_water.json | 67 ++++++++++++++++++ ...d_coral_dry_stays_unchanged_over_time.json | 40 +++++++++++ ...dead_coral_placement_in_flowing_water.json | 68 +++++++++++++++++++ .../dead_coral_placement_in_water_source.json | 42 ++++++++++++ .../coral/dead_coral_placement_on_solid.json | 35 ++++++++++ .../dead_coral_placement_on_top_slab.json | 34 ++++++++++ .../coral/dead_coral_pushed_by_piston.json | 50 ++++++++++++++ .../dead_coral_pushed_off_ledge_breaks.json | 50 ++++++++++++++ .../coral/dead_coral_rejected_on_fence.json | 34 ++++++++++ ...oral_unaffected_by_side_block_removal.json | 46 +++++++++++++ .../dead_coral_waterlogged_spreads_water.json | 58 ++++++++++++++++ 12 files changed, 566 insertions(+) create mode 100644 tests/decoration/coral/dead_coral_breaks_without_support.json create mode 100644 tests/decoration/coral/dead_coral_dry_not_waterlogged_by_adjacent_water.json create mode 100644 tests/decoration/coral/dead_coral_dry_stays_unchanged_over_time.json create mode 100644 tests/decoration/coral/dead_coral_placement_in_flowing_water.json create mode 100644 tests/decoration/coral/dead_coral_placement_in_water_source.json create mode 100644 tests/decoration/coral/dead_coral_placement_on_solid.json create mode 100644 tests/decoration/coral/dead_coral_placement_on_top_slab.json create mode 100644 tests/decoration/coral/dead_coral_pushed_by_piston.json create mode 100644 tests/decoration/coral/dead_coral_pushed_off_ledge_breaks.json create mode 100644 tests/decoration/coral/dead_coral_rejected_on_fence.json create mode 100644 tests/decoration/coral/dead_coral_unaffected_by_side_block_removal.json create mode 100644 tests/decoration/coral/dead_coral_waterlogged_spreads_water.json diff --git a/tests/decoration/coral/dead_coral_breaks_without_support.json b/tests/decoration/coral/dead_coral_breaks_without_support.json new file mode 100644 index 0000000..9470360 --- /dev/null +++ b/tests/decoration/coral/dead_coral_breaks_without_support.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dead_coral_breaks_without_support", + "description": "Removing the block under a dead tube coral turns the coral into air because it can no longer survive.", + "tags": ["decoration", "coral", "support", "block-update"], + "minecraftIds": ["minecraft:dead_tube_coral", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:dead_tube_coral", "waterlogged": "false"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_tube_coral"} } + ] + }, + { "at": 2, "do": "remove", "pos": [0, 0, 0] }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral/dead_coral_dry_not_waterlogged_by_adjacent_water.json b/tests/decoration/coral/dead_coral_dry_not_waterlogged_by_adjacent_water.json new file mode 100644 index 0000000..975c6b9 --- /dev/null +++ b/tests/decoration/coral/dead_coral_dry_not_waterlogged_by_adjacent_water.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dead_coral_dry_not_waterlogged_by_adjacent_water", + "description": "A water source next to a non-waterlogged dead tube coral spreads past it without waterlogging it or washing it away.", + "tags": ["decoration", "coral", "waterlogging", "water", "fluid", "block-state"], + "minecraftIds": ["minecraft:dead_tube_coral", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [4, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -1], [4, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-2, 1, -1], [4, 1, -1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-2, 1, 1], [4, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 4, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:dead_tube_coral", "waterlogged": "false"} + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_tube_coral", "waterlogged": "false"} } + ] + }, + { "at": 2, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_tube_coral", "waterlogged": "false" } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water" , "level": 0} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:water" , "level": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral/dead_coral_dry_stays_unchanged_over_time.json b/tests/decoration/coral/dead_coral_dry_stays_unchanged_over_time.json new file mode 100644 index 0000000..b09a551 --- /dev/null +++ b/tests/decoration/coral/dead_coral_dry_stays_unchanged_over_time.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dead_coral_dry_stays_unchanged_over_time", + "description": "A non-waterlogged dead tube coral away from water stays exactly as it was after well over the maximum 100 tick die delay, unlike living coral.", + "tags": ["decoration", "coral", "ticking", "block-state"], + "minecraftIds": ["minecraft:dead_tube_coral", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:dead_tube_coral", "waterlogged": "false"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_tube_coral", "waterlogged": "false"} } + ] + }, + { + "at": 150, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_tube_coral", "waterlogged": "false"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral/dead_coral_placement_in_flowing_water.json b/tests/decoration/coral/dead_coral_placement_in_flowing_water.json new file mode 100644 index 0000000..9b44eda --- /dev/null +++ b/tests/decoration/coral/dead_coral_placement_in_flowing_water.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dead_coral_placement_in_flowing_water", + "description": "A survival player placing dead tube coral into flowing (non-source) water replaces it but the coral is not waterlogged, because placement requires a full water block.", + "tags": ["decoration", "coral", "placement", "waterlogging", "water", "player", "block-state"], + "minecraftIds": ["minecraft:dead_tube_coral", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [4, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_tube_coral", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -1], [4, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-2, 1, -1], [4, 1, -1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-2, 1, 1], [4, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 4, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 1} } + ] + }, + { "at": 9, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 9, "do": "interact"}, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_tube_coral", "waterlogged": "false"} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral/dead_coral_placement_in_water_source.json b/tests/decoration/coral/dead_coral_placement_in_water_source.json new file mode 100644 index 0000000..aee8c00 --- /dev/null +++ b/tests/decoration/coral/dead_coral_placement_in_water_source.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dead_coral_placement_in_water_source", + "description": "A survival player placing dead tube coral into a water source block replaces the water and the coral becomes waterlogged.", + "tags": ["decoration", "coral", "placement", "waterlogging", "water", "player", "block-state"], + "minecraftIds": ["minecraft:dead_tube_coral", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_tube_coral", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_tube_coral", "waterlogged": "true"} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral/dead_coral_placement_on_solid.json b/tests/decoration/coral/dead_coral_placement_on_solid.json new file mode 100644 index 0000000..e7fc95b --- /dev/null +++ b/tests/decoration/coral/dead_coral_placement_on_solid.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dead_coral_placement_on_solid", + "description": "A survival player placing dead tube coral on top of stone in open air places a non-waterlogged coral and consumes the item.", + "tags": ["decoration", "coral", "placement", "player", "block-state"], + "minecraftIds": ["minecraft:dead_tube_coral", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_tube_coral", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone"} } , + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_tube_coral", "waterlogged": "false"} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral/dead_coral_placement_on_top_slab.json b/tests/decoration/coral/dead_coral_placement_on_top_slab.json new file mode 100644 index 0000000..a6b9116 --- /dev/null +++ b/tests/decoration/coral/dead_coral_placement_on_top_slab.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dead_coral_placement_on_top_slab", + "description": "Dead tube coral can be placed on top of a top slab because its upper face is sturdy.", + "tags": ["decoration", "coral", "placement", "support", "player"], + "minecraftIds": ["minecraft:dead_tube_coral", "minecraft:stone_slab"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_tube_coral", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone_slab", "type": "top"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_tube_coral", "waterlogged": "false"} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral/dead_coral_pushed_by_piston.json b/tests/decoration/coral/dead_coral_pushed_by_piston.json new file mode 100644 index 0000000..8c68298 --- /dev/null +++ b/tests/decoration/coral/dead_coral_pushed_by_piston.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dead_coral_pushed_by_piston", + "description": "An extending piston pushes a dead tube coral one block along a stone floor and the coral survives in its new position.", + "tags": ["decoration", "coral", "piston", "push-reaction", "redstone"], + "minecraftIds": ["minecraft:dead_tube_coral", "minecraft:piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston", "facing": "east", "extended": "false"} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:dead_tube_coral", "waterlogged": "false"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:dead_tube_coral"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } } + ] + }, + { "at": 2, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": "true"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:dead_tube_coral", "waterlogged": "false"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral/dead_coral_pushed_off_ledge_breaks.json b/tests/decoration/coral/dead_coral_pushed_off_ledge_breaks.json new file mode 100644 index 0000000..50a796f --- /dev/null +++ b/tests/decoration/coral/dead_coral_pushed_off_ledge_breaks.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dead_coral_pushed_off_ledge_breaks", + "description": "An extending piston pushing a dead tube coral onto a position with no block underneath makes the coral disappear.", + "tags": ["decoration", "coral", "piston", "push-reaction", "support", "redstone"], + "minecraftIds": ["minecraft:dead_tube_coral", "minecraft:piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston", "facing": "east", "extended": "false"} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:dead_tube_coral", "waterlogged": "false"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:dead_tube_coral"} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:air" } } + ] + }, + { "at": 2, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston" , "facing": "east", "extended": "true"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral/dead_coral_rejected_on_fence.json b/tests/decoration/coral/dead_coral_rejected_on_fence.json new file mode 100644 index 0000000..49df670 --- /dev/null +++ b/tests/decoration/coral/dead_coral_rejected_on_fence.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dead_coral_rejected_on_fence", + "description": "Dead tube coral cannot be placed on top of a fence because the fence top face is not sturdy; nothing is placed and the item is kept.", + "tags": ["decoration", "coral", "placement", "support", "player"], + "minecraftIds": ["minecraft:dead_tube_coral", "minecraft:oak_fence"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_tube_coral", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:oak_fence"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:dead_tube_coral", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral/dead_coral_unaffected_by_side_block_removal.json b/tests/decoration/coral/dead_coral_unaffected_by_side_block_removal.json new file mode 100644 index 0000000..4cd8323 --- /dev/null +++ b/tests/decoration/coral/dead_coral_unaffected_by_side_block_removal.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dead_coral_unaffected_by_side_block_removal", + "description": "Removing a block next to a dead tube coral, but not the one under it, leaves the coral in place.", + "tags": ["decoration", "coral", "support", "block-update"], + "minecraftIds": ["minecraft:dead_tube_coral", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:dead_tube_coral", "waterlogged": "false"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_tube_coral"} } + ] + }, + { "at": 2, "do": "remove", "pos": [1, 1, 0] }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_tube_coral", "waterlogged": "false"} }, + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral/dead_coral_waterlogged_spreads_water.json b/tests/decoration/coral/dead_coral_waterlogged_spreads_water.json new file mode 100644 index 0000000..d180e4f --- /dev/null +++ b/tests/decoration/coral/dead_coral_waterlogged_spreads_water.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dead_coral_waterlogged_spreads_water", + "description": "A waterlogged dead tube coral acts as a water source: water flows out onto the floor next to it while the coral stays waterlogged.", + "tags": ["decoration", "coral", "waterlogging", "water", "fluid", "block-state"], + "minecraftIds": ["minecraft:dead_tube_coral", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [4, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -1], [4, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-2, 1, -1], [4, 1, -1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-2, 1, 1], [4, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 4, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:dead_tube_coral", "waterlogged": "true"} + }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_tube_coral", "waterlogged": "true" } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water" , "level": 1} } + ] + } + ], + "breakpoints": [] +} + From a6c02199013e7d37e70972bc7967895619d1ad3d Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Thu, 29 Oct 2026 05:17:35 +0100 Subject: [PATCH 37/85] Add Flint tests for fan (10 blocks) --- ...aks_without_support_and_drops_nothing.json | 42 ++++++++++++ ...al_fan_on_fence_side_places_floor_fan.json | 35 ++++++++++ ...al_fan_placed_in_water_is_waterlogged.json | 35 ++++++++++ .../dead_coral_fan_pushed_by_piston.json | 41 ++++++++++++ .../dead_coral_fan_rejects_fence_top.json | 34 ++++++++++ ...rejects_unsupported_ceiling_underside.json | 34 ++++++++++ ...ad_coral_fan_stays_dead_without_water.json | 32 ++++++++++ .../dead_coral_fan_survival_placement.json | 35 ++++++++++ ...ead_coral_fan_waterlogged_flows_water.json | 47 ++++++++++++++ ...wall_fan_breaks_without_backing_block.json | 41 ++++++++++++ ...ad_coral_wall_fan_four_side_placement.json | 64 +++++++++++++++++++ ...ll_fan_placed_in_water_is_waterlogged.json | 38 +++++++++++ ...coral_wall_fan_survives_without_floor.json | 39 +++++++++++ 13 files changed, 517 insertions(+) create mode 100644 tests/decoration/coral_fans/dead_coral_fan_breaks_without_support_and_drops_nothing.json create mode 100644 tests/decoration/coral_fans/dead_coral_fan_on_fence_side_places_floor_fan.json create mode 100644 tests/decoration/coral_fans/dead_coral_fan_placed_in_water_is_waterlogged.json create mode 100644 tests/decoration/coral_fans/dead_coral_fan_pushed_by_piston.json create mode 100644 tests/decoration/coral_fans/dead_coral_fan_rejects_fence_top.json create mode 100644 tests/decoration/coral_fans/dead_coral_fan_rejects_unsupported_ceiling_underside.json create mode 100644 tests/decoration/coral_fans/dead_coral_fan_stays_dead_without_water.json create mode 100644 tests/decoration/coral_fans/dead_coral_fan_survival_placement.json create mode 100644 tests/decoration/coral_fans/dead_coral_fan_waterlogged_flows_water.json create mode 100644 tests/decoration/coral_fans/dead_coral_wall_fan_breaks_without_backing_block.json create mode 100644 tests/decoration/coral_fans/dead_coral_wall_fan_four_side_placement.json create mode 100644 tests/decoration/coral_fans/dead_coral_wall_fan_placed_in_water_is_waterlogged.json create mode 100644 tests/decoration/coral_fans/dead_coral_wall_fan_survives_without_floor.json diff --git a/tests/decoration/coral_fans/dead_coral_fan_breaks_without_support_and_drops_nothing.json b/tests/decoration/coral_fans/dead_coral_fan_breaks_without_support_and_drops_nothing.json new file mode 100644 index 0000000..cd1a625 --- /dev/null +++ b/tests/decoration/coral_fans/dead_coral_fan_breaks_without_support_and_drops_nothing.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_coral_fan_breaks_without_support_and_drops_nothing", + "description": "Removing the block under a dead coral fan turns the fan into air and drops no item, since its loot table needs silk touch.", + "tags": ["decoration", "coral", "coral-fan", "support", "drops"], + "minecraftIds": ["minecraft:dead_tube_coral_fan"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [9, 3, 1] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [8, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [8, 2, 0], + "block": {"id": "minecraft:dead_tube_coral_fan", "waterlogged": false} + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [8, 2, 0], "is": {"id": "minecraft:dead_tube_coral_fan"} } + ] + }, + { "at": 2, "do": "remove", "pos": [8, 1, 0] }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [8, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [8, 2, 0], "is": {"id": "minecraft:air"} }, + { "is": "minecraft:item" , "exists": false } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral_fans/dead_coral_fan_on_fence_side_places_floor_fan.json b/tests/decoration/coral_fans/dead_coral_fan_on_fence_side_places_floor_fan.json new file mode 100644 index 0000000..f2a94f5 --- /dev/null +++ b/tests/decoration/coral_fans/dead_coral_fan_on_fence_side_places_floor_fan.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_coral_fan_on_fence_side_places_floor_fan", + "description": "A dead coral fan used on the side of an oak fence cannot hang there, so it becomes a floor fan on the stone below the clicked space.", + "tags": ["decoration", "coral", "coral-fan", "placement", "support", "player"], + "minecraftIds": ["minecraft:dead_tube_coral_fan", "minecraft:oak_fence"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_tube_coral_fan", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_fence"} }, + { "at": 0, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [3.5, 0, 0.5], "rot": [90, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:dead_tube_coral_fan", "waterlogged": false} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral_fans/dead_coral_fan_placed_in_water_is_waterlogged.json b/tests/decoration/coral_fans/dead_coral_fan_placed_in_water_is_waterlogged.json new file mode 100644 index 0000000..62802d2 --- /dev/null +++ b/tests/decoration/coral_fans/dead_coral_fan_placed_in_water_is_waterlogged.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_coral_fan_placed_in_water_is_waterlogged", + "description": "A survival player using a dead coral fan on stone under a water source block places a waterlogged floor fan (getStateForPlacement uses the replaced full water).", + "tags": ["decoration", "coral", "coral-fan", "placement", "waterlogging", "water", "player"], + "minecraftIds": ["minecraft:dead_tube_coral_fan", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_tube_coral_fan", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:water"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:dead_tube_coral_fan", "waterlogged": true} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral_fans/dead_coral_fan_pushed_by_piston.json b/tests/decoration/coral_fans/dead_coral_fan_pushed_by_piston.json new file mode 100644 index 0000000..534864f --- /dev/null +++ b/tests/decoration/coral_fans/dead_coral_fan_pushed_by_piston.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_coral_fan_pushed_by_piston", + "description": "A piston pushes a dead coral fan one block onto stone and it survives there, because dead fans do not use the destroy push reaction.", + "tags": ["decoration", "coral", "coral-fan", "piston", "push-reaction"], + "minecraftIds": ["minecraft:dead_tube_coral_fan", "minecraft:piston"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [4, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place", + "pos": [1, 1, 0], + "block": {"id": "minecraft:dead_tube_coral_fan", "waterlogged": false} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:piston", "facing": "east"} }, + { "at": 1, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "extended": true} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:dead_tube_coral_fan"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral_fans/dead_coral_fan_rejects_fence_top.json b/tests/decoration/coral_fans/dead_coral_fan_rejects_fence_top.json new file mode 100644 index 0000000..b95554b --- /dev/null +++ b/tests/decoration/coral_fans/dead_coral_fan_rejects_fence_top.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_coral_fan_rejects_fence_top", + "description": "A dead coral fan used on the top of an oak fence is not placed because the fence top is not a sturdy face, and the item is kept.", + "tags": ["decoration", "coral", "coral-fan", "placement", "support", "player"], + "minecraftIds": ["minecraft:dead_tube_coral_fan", "minecraft:oak_fence"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_tube_coral_fan", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_fence"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:dead_tube_coral_fan", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral_fans/dead_coral_fan_rejects_unsupported_ceiling_underside.json b/tests/decoration/coral_fans/dead_coral_fan_rejects_unsupported_ceiling_underside.json new file mode 100644 index 0000000..23529f4 --- /dev/null +++ b/tests/decoration/coral_fans/dead_coral_fan_rejects_unsupported_ceiling_underside.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_coral_fan_rejects_unsupported_ceiling_underside", + "description": "A dead coral fan used on the underside of a stone ceiling is not placed when nothing sturdy is below or beside the clicked space, and the item is kept.", + "tags": ["decoration", "coral", "coral-fan", "placement", "support", "player"], + "minecraftIds": ["minecraft:dead_tube_coral_fan"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_tube_coral_fan", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 3, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:dead_tube_coral_fan", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral_fans/dead_coral_fan_stays_dead_without_water.json b/tests/decoration/coral_fans/dead_coral_fan_stays_dead_without_water.json new file mode 100644 index 0000000..462069d --- /dev/null +++ b/tests/decoration/coral_fans/dead_coral_fan_stays_dead_without_water.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_coral_fan_stays_dead_without_water", + "description": "A dead coral fan outside water is unchanged long after the 60-100 tick window in which a living fan would die, because dead fans have no die tick.", + "tags": ["decoration", "coral", "coral-fan", "ticking"], + "minecraftIds": ["minecraft:dead_tube_coral_fan"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 2, 0], + "block": {"id": "minecraft:dead_tube_coral_fan", "waterlogged": false} + }, + { + "at": [1, 110], + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:dead_tube_coral_fan", "waterlogged": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral_fans/dead_coral_fan_survival_placement.json b/tests/decoration/coral_fans/dead_coral_fan_survival_placement.json new file mode 100644 index 0000000..6c2e5ca --- /dev/null +++ b/tests/decoration/coral_fans/dead_coral_fan_survival_placement.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_coral_fan_survival_placement", + "description": "A survival player using a dead coral fan on the top of stone in open air places a non-waterlogged floor fan and consumes the item.", + "tags": ["decoration", "coral", "coral-fan", "placement", "player"], + "minecraftIds": ["minecraft:dead_tube_coral_fan"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_tube_coral_fan", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone"} } , + { "pos": [0, 2, 0], "is": {"id": "minecraft:dead_tube_coral_fan", "waterlogged": false} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral_fans/dead_coral_fan_waterlogged_flows_water.json b/tests/decoration/coral_fans/dead_coral_fan_waterlogged_flows_water.json new file mode 100644 index 0000000..e11ccb0 --- /dev/null +++ b/tests/decoration/coral_fans/dead_coral_fan_waterlogged_flows_water.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_coral_fan_waterlogged_flows_water", + "description": "A waterlogged dead coral fan acts as a water source: after a neighbour update, water flows out of it down a walled one-wide corridor with increasing levels.", + "tags": ["decoration", "coral", "coral-fan", "waterlogging", "water", "fluid"], + "minecraftIds": ["minecraft:dead_tube_coral_fan", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 2, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [0, 1, 0], [3, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 2, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:dead_tube_coral_fan", "waterlogged": true} + }, + { "at": 3, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:glass"} }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_tube_coral_fan", "waterlogged": true } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water" , "level": 1} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:water" , "level": 2} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:water" , "level": 3} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral_fans/dead_coral_wall_fan_breaks_without_backing_block.json b/tests/decoration/coral_fans/dead_coral_wall_fan_breaks_without_backing_block.json new file mode 100644 index 0000000..d1167ba --- /dev/null +++ b/tests/decoration/coral_fans/dead_coral_wall_fan_breaks_without_backing_block.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_coral_wall_fan_breaks_without_backing_block", + "description": "Removing the block a wall fan hangs on turns the fan into air and drops no item.", + "tags": ["decoration", "coral", "coral-fan", "wall-fan", "support", "drops"], + "minecraftIds": ["minecraft:dead_tube_coral_wall_fan"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [9, 3, 1] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [8, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [9, 1, 0], + "block": {"id": "minecraft:dead_tube_coral_wall_fan", "facing": "east", "waterlogged": false} + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [9, 1, 0], "is": {"id": "minecraft:dead_tube_coral_wall_fan", "facing": "east"} } + ] + }, + { "at": 2, "do": "remove", "pos": [8, 1, 0] }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [9, 1, 0], "is": {"id": "minecraft:air"} }, + { "is": "minecraft:item" , "exists": false } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral_fans/dead_coral_wall_fan_four_side_placement.json b/tests/decoration/coral_fans/dead_coral_wall_fan_four_side_placement.json new file mode 100644 index 0000000..c764406 --- /dev/null +++ b/tests/decoration/coral_fans/dead_coral_wall_fan_four_side_placement.json @@ -0,0 +1,64 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_coral_wall_fan_four_side_placement", + "description": "Survival placement against the north, south, east and west faces of stone gives a wall fan facing away from the clicked block on each, consuming all four items.", + "tags": ["decoration", "coral", "coral-fan", "wall-fan", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:dead_tube_coral_fan", "minecraft:dead_tube_coral_wall_fan"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 2, 9] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_tube_coral_fan", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [8, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 8], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 4], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [8.5, 0, -3.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 11.5], "rot": [180, 0] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [3.5, 0, 4.5], "rot": [90, 0] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [4.5, 0, 4.5], "rot": [-90, 0] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [8, 1, -1], + "is": {"id": "minecraft:dead_tube_coral_wall_fan", "facing": "north", "waterlogged": false} + }, + { + "pos": [0, 1, 9], + "is": {"id": "minecraft:dead_tube_coral_wall_fan", "facing": "south", "waterlogged": false} + }, + { + "pos": [1, 1, 4], + "is": {"id": "minecraft:dead_tube_coral_wall_fan", "facing": "east", "waterlogged": false} + }, + { + "pos": [7, 1, 4], + "is": {"id": "minecraft:dead_tube_coral_wall_fan", "facing": "west", "waterlogged": false} + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral_fans/dead_coral_wall_fan_placed_in_water_is_waterlogged.json b/tests/decoration/coral_fans/dead_coral_wall_fan_placed_in_water_is_waterlogged.json new file mode 100644 index 0000000..cd442f7 --- /dev/null +++ b/tests/decoration/coral_fans/dead_coral_wall_fan_placed_in_water_is_waterlogged.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_coral_wall_fan_placed_in_water_is_waterlogged", + "description": "A survival player using a dead coral fan on the side of stone into a water source gets a waterlogged wall fan.", + "tags": ["decoration", "coral", "coral-fan", "wall-fan", "placement", "waterlogging", "water", "player"], + "minecraftIds": ["minecraft:dead_tube_coral_wall_fan", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_tube_coral_fan", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:water"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [3.5, 0, 0.5], "rot": [90, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [1, 1, 0], + "is": {"id": "minecraft:dead_tube_coral_wall_fan", "facing": "east", "waterlogged": true} + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/coral_fans/dead_coral_wall_fan_survives_without_floor.json b/tests/decoration/coral_fans/dead_coral_wall_fan_survives_without_floor.json new file mode 100644 index 0000000..374596f --- /dev/null +++ b/tests/decoration/coral_fans/dead_coral_wall_fan_survives_without_floor.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_coral_wall_fan_survives_without_floor", + "description": "Removing the block under a wall fan leaves it in place, because a wall fan only depends on the block behind it.", + "tags": ["decoration", "coral", "coral-fan", "wall-fan", "support"], + "minecraftIds": ["minecraft:dead_tube_coral_wall_fan"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [2, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [1, 1, 0], + "block": {"id": "minecraft:dead_tube_coral_wall_fan", "facing": "east", "waterlogged": false} + } + ] + }, + { "at": 2, "do": "remove", "pos": [1, 0, 0] }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:dead_tube_coral_wall_fan", "facing": "east"} } + ] + } + ], + "breakpoints": [] +} + From ab7a4aea8a560b72dd412de9a38da49ddae86174 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Fri, 30 Oct 2026 04:31:01 +0100 Subject: [PATCH 38/85] Add Flint tests for dead_bush (1 blocks) --- .../dead_bush_destroyed_by_piston.json | 53 ++++++++++++ .../dead_bush_placement_on_supports.json | 81 +++++++++++++++++++ ...placement_rejected_on_invalid_support.json | 52 ++++++++++++ .../dead_bush_potted_in_flower_pot.json | 47 +++++++++++ .../dead_bush/dead_bush_rejects_bonemeal.json | 49 +++++++++++ ...dead_bush_replaced_by_block_placement.json | 50 ++++++++++++ .../dead_bush/dead_bush_support_loss.json | 54 +++++++++++++ .../dead_bush_support_loss_drops_sticks.json | 77 ++++++++++++++++++ .../dead_bush_washed_away_by_water.json | 56 +++++++++++++ 9 files changed, 519 insertions(+) create mode 100644 tests/vegetation/dead_bush/dead_bush_destroyed_by_piston.json create mode 100644 tests/vegetation/dead_bush/dead_bush_placement_on_supports.json create mode 100644 tests/vegetation/dead_bush/dead_bush_placement_rejected_on_invalid_support.json create mode 100644 tests/vegetation/dead_bush/dead_bush_potted_in_flower_pot.json create mode 100644 tests/vegetation/dead_bush/dead_bush_rejects_bonemeal.json create mode 100644 tests/vegetation/dead_bush/dead_bush_replaced_by_block_placement.json create mode 100644 tests/vegetation/dead_bush/dead_bush_support_loss.json create mode 100644 tests/vegetation/dead_bush/dead_bush_support_loss_drops_sticks.json create mode 100644 tests/vegetation/dead_bush/dead_bush_washed_away_by_water.json diff --git a/tests/vegetation/dead_bush/dead_bush_destroyed_by_piston.json b/tests/vegetation/dead_bush/dead_bush_destroyed_by_piston.json new file mode 100644 index 0000000..eb4f42f --- /dev/null +++ b/tests/vegetation/dead_bush/dead_bush_destroyed_by_piston.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_bush_destroyed_by_piston", + "description": "An extending piston destroys a dead bush in front of it instead of pushing it, so the dead bush is gone and nothing sits behind the piston head.", + "tags": ["vegetation", "dead_bush", "piston", "push-reaction", "redstone"], + "minecraftIds": [ + "minecraft:dead_bush" , "minecraft:piston" , "minecraft:piston_head" , "minecraft:redstone_block", + "minecraft:sand" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 3, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [4, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:sand"} }, + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:piston", "facing": "east", "extended": false} + }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston" , "extended": false} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:dead_bush" } } + ] + }, + { "at": 2, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston" , "extended": true, "facing": "east"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dead_bush/dead_bush_placement_on_supports.json b/tests/vegetation/dead_bush/dead_bush_placement_on_supports.json new file mode 100644 index 0000000..635ffa3 --- /dev/null +++ b/tests/vegetation/dead_bush/dead_bush_placement_on_supports.json @@ -0,0 +1,81 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_bush_placement_on_supports", + "description": "Dead bush items placed on sand, red sand, terracotta, orange terracotta, dirt, grass block and farmland create a dead bush on each and consume all seven items.", + "tags": ["vegetation", "dead_bush", "placement", "supports-dry-vegetation", "player"], + "minecraftIds": [ + "minecraft:dead_bush" , "minecraft:sand" , "minecraft:red_sand" , + "minecraft:terracotta" , "minecraft:orange_terracotta", "minecraft:dirt" , + "minecraft:grass_block" , "minecraft:farmland" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [8, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_bush", "count": 7} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, -1, -1], [8, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [7, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:sand" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:red_sand" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:terracotta" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:orange_terracotta"} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [5, 0, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [6, 0, 0], "block": {"id": "minecraft:farmland" } } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 0.5], "rot": [0, 90] }, + {"at": 8, "do": "interact"}, + { "at": 9, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 0.5], "rot": [0, 90] }, + {"at": 9, "do": "interact"}, + { "at": 10, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 0.5], "rot": [0, 90] }, + {"at": 10, "do": "interact"}, + { "at": 11, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, 0.5], "rot": [0, 90] }, + {"at": 11, "do": "interact"}, + { "at": 12, "do": "tp", "entity_alias": "player", "pos": [3.5, 6, 0.5] }, + { + "at": 13, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_bush"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:dead_bush"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:dead_bush"} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:dead_bush"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:dead_bush"} }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:dead_bush"} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:dead_bush"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dead_bush/dead_bush_placement_rejected_on_invalid_support.json b/tests/vegetation/dead_bush/dead_bush_placement_rejected_on_invalid_support.json new file mode 100644 index 0000000..fbf2542 --- /dev/null +++ b/tests/vegetation/dead_bush/dead_bush_placement_rejected_on_invalid_support.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_bush_placement_rejected_on_invalid_support", + "description": "Dead bush items used on stone and glazed terracotta do not place a dead bush and are not consumed, because neither block is in the dry vegetation support tag.", + "tags": ["vegetation", "dead_bush", "placement", "player"], + "minecraftIds": ["minecraft:dead_bush", "minecraft:stone", "minecraft:white_glazed_terracotta"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [3, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_bush", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, -1, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [2, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:white_glazed_terracotta"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:white_glazed_terracotta" } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:dead_bush" , "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dead_bush/dead_bush_potted_in_flower_pot.json b/tests/vegetation/dead_bush/dead_bush_potted_in_flower_pot.json new file mode 100644 index 0000000..8189f68 --- /dev/null +++ b/tests/vegetation/dead_bush/dead_bush_potted_in_flower_pot.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_bush_potted_in_flower_pot", + "description": "A dead bush item used on an empty flower pot turns it into a potted dead bush and consumes the item.", + "tags": ["vegetation", "dead_bush", "flower_pot", "player"], + "minecraftIds": ["minecraft:dead_bush", "minecraft:flower_pot", "minecraft:potted_dead_bush"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dead_bush", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, -1, -1], [2, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:flower_pot"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_dead_bush"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dead_bush/dead_bush_rejects_bonemeal.json b/tests/vegetation/dead_bush/dead_bush_rejects_bonemeal.json new file mode 100644 index 0000000..e83d10f --- /dev/null +++ b/tests/vegetation/dead_bush/dead_bush_rejects_bonemeal.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_bush_rejects_bonemeal", + "description": "Bone meal used on a dead bush does nothing: the dead bush stays and the bone meal is not consumed, because the dead bush is not bonemealable.", + "tags": ["vegetation", "dead_bush", "bonemeal", "player"], + "minecraftIds": ["minecraft:dead_bush", "minecraft:sand", "minecraft:bone_meal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, -1, -1], [2, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_bush" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:bone_meal", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dead_bush/dead_bush_replaced_by_block_placement.json b/tests/vegetation/dead_bush/dead_bush_replaced_by_block_placement.json new file mode 100644 index 0000000..aca7d35 --- /dev/null +++ b/tests/vegetation/dead_bush/dead_bush_replaced_by_block_placement.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_bush_replaced_by_block_placement", + "description": "A survival player placing a stone block against a dead bush replaces the dead bush instead of placing next to it, because the dead bush is replaceable.", + "tags": ["vegetation", "dead_bush", "placement", "replaceable", "player"], + "minecraftIds": ["minecraft:dead_bush", "minecraft:sand", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, -1, -1], [2, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:sand"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dead_bush/dead_bush_support_loss.json b/tests/vegetation/dead_bush/dead_bush_support_loss.json new file mode 100644 index 0000000..b7a6293 --- /dev/null +++ b/tests/vegetation/dead_bush/dead_bush_support_loss.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_bush_support_loss", + "description": "A dead bush on sand or terracotta becomes air once the block beneath it is removed.", + "tags": ["vegetation", "dead_bush", "support", "neighbor-update"], + "minecraftIds": ["minecraft:dead_bush", "minecraft:sand", "minecraft:terracotta"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [3, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, -1, -1], [3, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [1, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 4, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:terracotta"} }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { "at": 4, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dead_bush"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:dead_bush"} } + ] + }, + { "at": 5, "do": "remove", "pos": [0, 0, 0] }, + { "at": 5, "do": "remove", "pos": [1, 0, 0] }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dead_bush/dead_bush_support_loss_drops_sticks.json b/tests/vegetation/dead_bush/dead_bush_support_loss_drops_sticks.json new file mode 100644 index 0000000..9bdb323 --- /dev/null +++ b/tests/vegetation/dead_bush/dead_bush_support_loss_drops_sticks.json @@ -0,0 +1,77 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_bush_support_loss_drops_sticks", + "description": "Ten dead bushes that break because their sand support is removed (no shears) drop sticks from the loot table fallback, so at least one stick item appears.", + "tags": ["vegetation", "dead_bush", "support", "drops", "neighbor-update"], + "minecraftIds": ["minecraft:dead_bush", "minecraft:sand", "minecraft:stick", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [10, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, -1, -1], [10, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [9, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { "at": 4, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 4, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { "at": 4, "do": "place", "pos": [2, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 4, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { "at": 4, "do": "place", "pos": [3, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 4, "do": "place", "pos": [3, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { "at": 4, "do": "place", "pos": [4, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 4, "do": "place", "pos": [4, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { "at": 4, "do": "place", "pos": [5, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 4, "do": "place", "pos": [5, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { "at": 4, "do": "place", "pos": [6, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 4, "do": "place", "pos": [6, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { "at": 4, "do": "place", "pos": [7, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 4, "do": "place", "pos": [7, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { "at": 4, "do": "place", "pos": [8, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 4, "do": "place", "pos": [8, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { "at": 4, "do": "place", "pos": [9, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 4, "do": "place", "pos": [9, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { "at": 5, "do": "remove", "pos": [0, 0, 0] }, + { "at": 5, "do": "remove", "pos": [1, 0, 0] }, + { "at": 5, "do": "remove", "pos": [2, 0, 0] }, + { "at": 5, "do": "remove", "pos": [3, 0, 0] }, + { "at": 5, "do": "remove", "pos": [4, 0, 0] }, + { "at": 5, "do": "remove", "pos": [5, 0, 0] }, + { "at": 5, "do": "remove", "pos": [6, 0, 0] }, + { "at": 5, "do": "remove", "pos": [7, 0, 0] }, + { "at": 5, "do": "remove", "pos": [8, 0, 0] }, + { "at": 5, "do": "remove", "pos": [9, 0, 0] }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [7, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [8, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [9, 1, 0], "is": {"id": "minecraft:air"} }, + { "is": "minecraft:item" , "exists": true, "Item.id": "\"minecraft:stick\"" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/dead_bush/dead_bush_washed_away_by_water.json b/tests/vegetation/dead_bush/dead_bush_washed_away_by_water.json new file mode 100644 index 0000000..6ef2955 --- /dev/null +++ b/tests/vegetation/dead_bush/dead_bush_washed_away_by_water.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dead_bush_washed_away_by_water", + "description": "Water flowing sideways along a stone channel into the space of a dead bush replaces the dead bush with water, since the dead bush has no collision and is replaceable.", + "tags": ["vegetation", "dead_bush", "fluid", "water", "neighbor-update"], + "minecraftIds": ["minecraft:dead_bush", "minecraft:water", "minecraft:sand", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [4, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [4, 1, -1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, 1], [4, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [2, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 0, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:dead_bush"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:dead_bush"} } + ] + }, + { "at": 2, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:water"} } + ] + } + ], + "breakpoints": [] +} + From 5f96d0b247bd5a8f0f55636c865215cfc8522b8c Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Fri, 30 Oct 2026 04:33:55 +0100 Subject: [PATCH 39/85] Add Flint tests for deepslate (1 blocks) --- ...ate_explosion_drops_cobbled_deepslate.json | 51 +++++++++++++++++++ .../deepslate_note_block_basedrum.json | 35 +++++++++++++ ...epslate_note_block_instrument_updates.json | 42 +++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 tests/decoration/deepslate/deepslate_explosion_drops_cobbled_deepslate.json create mode 100644 tests/decoration/deepslate/deepslate_note_block_basedrum.json create mode 100644 tests/decoration/deepslate/deepslate_note_block_instrument_updates.json diff --git a/tests/decoration/deepslate/deepslate_explosion_drops_cobbled_deepslate.json b/tests/decoration/deepslate/deepslate_explosion_drops_cobbled_deepslate.json new file mode 100644 index 0000000..c4105d2 --- /dev/null +++ b/tests/decoration/deepslate/deepslate_explosion_drops_cobbled_deepslate.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "deepslate_explosion_drops_cobbled_deepslate", + "description": "A deepslate block destroyed by an explosion becomes air and drops a single cobbled deepslate item rather than deepslate.", + "tags": ["decoration", "deepslate", "drops", "explosion", "item"], + "minecraftIds": ["minecraft:deepslate", "minecraft:cobbled_deepslate", "minecraft:tnt", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -4], [4, 10, 4] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs" : false, + "minecraft:advance_time" : false, + "minecraft:advance_weather" : false, + "minecraft:tnt_explosion_drop_decay": false + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 8, 0], "block": {"id": "minecraft:deepslate"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 8, 0], "is": {"id": "minecraft:deepslate"} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [0.5, 9, 0.5], + "fuse": 1 + }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 8, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "count": 1, "Item.id": "minecraft:cobbled_deepslate", "Item.count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/deepslate/deepslate_note_block_basedrum.json b/tests/decoration/deepslate/deepslate_note_block_basedrum.json new file mode 100644 index 0000000..5724245 --- /dev/null +++ b/tests/decoration/deepslate/deepslate_note_block_basedrum.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "deepslate_note_block_basedrum", + "description": "A note block placed on top of deepslate gets the basedrum instrument, while one placed on top of air keeps the harp instrument.", + "tags": ["decoration", "deepslate", "note-block", "instrument", "block-state"], + "minecraftIds": ["minecraft:deepslate", "minecraft:note_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 8, 1] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 5, 0], "block": {"id": "minecraft:deepslate"} }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 6, 0], "block": {"id": "minecraft:note_block"} }, + { "pos": [2, 6, 0], "block": {"id": "minecraft:note_block"} } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 6, 0], "is": {"id": "minecraft:note_block", "instrument": "basedrum"} }, + { "pos": [2, 6, 0], "is": {"id": "minecraft:note_block", "instrument": "harp" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/deepslate/deepslate_note_block_instrument_updates.json b/tests/decoration/deepslate/deepslate_note_block_instrument_updates.json new file mode 100644 index 0000000..fb87e56 --- /dev/null +++ b/tests/decoration/deepslate/deepslate_note_block_instrument_updates.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "deepslate_note_block_instrument_updates", + "description": "A harp note block switches to basedrum when deepslate is placed beneath it and back to harp when that deepslate is removed.", + "tags": ["decoration", "deepslate", "note-block", "instrument", "block-state", "neighbor-update"], + "minecraftIds": ["minecraft:deepslate", "minecraft:note_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 8, 1] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 6, 0], "block": {"id": "minecraft:note_block"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 6, 0], "is": {"id": "minecraft:note_block", "instrument": "harp"} } + ] + }, + { "at": 2, "do": "place", "pos": [0, 5, 0], "block": {"id": "minecraft:deepslate"} }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 6, 0], "is": {"id": "minecraft:note_block", "instrument": "basedrum"} } + ] + }, + { "at": 5, "do": "remove", "pos": [0, 5, 0] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 6, 0], "is": {"id": "minecraft:note_block", "instrument": "harp"} } + ] + } + ], + "breakpoints": [] +} + From 22ba9b44ad85cb2bb6cecc586aa5d150655844e4 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Fri, 30 Oct 2026 04:36:41 +0100 Subject: [PATCH 40/85] Add Flint tests for diamond_ores (2 blocks) --- .../diamond_ore_ignores_pickaxe_interact.json | 35 +++++++++++ .../diamond_ore_item_places_block.json | 33 ++++++++++ .../diamond_ore_pulled_by_sticky_piston.json | 45 ++++++++++++++ .../diamond_ore_pushed_by_piston.json | 36 +++++++++++ ...mond_ore_stable_with_neighbor_updates.json | 53 ++++++++++++++++ ...amond_ore_tnt_explosion_drops_diamond.json | 62 +++++++++++++++++++ 6 files changed, 264 insertions(+) create mode 100644 tests/world/diamond_ore/diamond_ore_ignores_pickaxe_interact.json create mode 100644 tests/world/diamond_ore/diamond_ore_item_places_block.json create mode 100644 tests/world/diamond_ore/diamond_ore_pulled_by_sticky_piston.json create mode 100644 tests/world/diamond_ore/diamond_ore_pushed_by_piston.json create mode 100644 tests/world/diamond_ore/diamond_ore_stable_with_neighbor_updates.json create mode 100644 tests/world/diamond_ore/diamond_ore_tnt_explosion_drops_diamond.json diff --git a/tests/world/diamond_ore/diamond_ore_ignores_pickaxe_interact.json b/tests/world/diamond_ore/diamond_ore_ignores_pickaxe_interact.json new file mode 100644 index 0000000..0e38b04 --- /dev/null +++ b/tests/world/diamond_ore/diamond_ore_ignores_pickaxe_interact.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "diamond_ore_ignores_pickaxe_interact", + "description": "A survival player using an iron pickaxe on a diamond ore block does not break it, drops nothing and keeps the pickaxe.", + "tags": ["world", "ore", "diamond-ore", "player", "drops"], + "minecraftIds": ["minecraft:diamond_ore", "minecraft:iron_pickaxe", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:iron_pickaxe", "count": 1} } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:diamond_ore"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:diamond_ore"} } , + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} } , + { "slot": "hotbar1", "is": {"id": "minecraft:iron_pickaxe", "count": 1} }, + {"is": "minecraft:item", "exists": false} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/diamond_ore/diamond_ore_item_places_block.json b/tests/world/diamond_ore/diamond_ore_item_places_block.json new file mode 100644 index 0000000..07e0ce2 --- /dev/null +++ b/tests/world/diamond_ore/diamond_ore_item_places_block.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "diamond_ore_item_places_block", + "description": "A survival player using the diamond ore item on top of stone places a diamond ore block and consumes the item.", + "tags": ["world", "ore", "diamond-ore", "placement", "player"], + "minecraftIds": ["minecraft:diamond_ore", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:diamond_ore", "count": 1} } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:diamond_ore"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/diamond_ore/diamond_ore_pulled_by_sticky_piston.json b/tests/world/diamond_ore/diamond_ore_pulled_by_sticky_piston.json new file mode 100644 index 0000000..9ddfa56 --- /dev/null +++ b/tests/world/diamond_ore/diamond_ore_pulled_by_sticky_piston.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "diamond_ore_pulled_by_sticky_piston", + "description": "A sticky piston pushes a diamond ore block forward and pulls it back intact when it retracts.", + "tags": ["world", "ore", "diamond-ore", "piston", "sticky-piston", "push-reaction"], + "minecraftIds": ["minecraft:diamond_ore", "minecraft:sticky_piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:sticky_piston", "facing": "east"} }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:diamond_ore" } } + ] + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:piston_head"} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:diamond_ore"} } + ] + }, + { "at": 9, "do": "remove", "pos": [0, 1, 0] }, + { + "at": 16, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:sticky_piston", "extended": false} }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:diamond_ore" } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/diamond_ore/diamond_ore_pushed_by_piston.json b/tests/world/diamond_ore/diamond_ore_pushed_by_piston.json new file mode 100644 index 0000000..c8106a3 --- /dev/null +++ b/tests/world/diamond_ore/diamond_ore_pushed_by_piston.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "diamond_ore_pushed_by_piston", + "description": "A piston pushes a diamond ore block one block intact and no item is dropped.", + "tags": ["world", "ore", "diamond-ore", "piston", "push-reaction"], + "minecraftIds": ["minecraft:diamond_ore", "minecraft:piston", "minecraft:redstone_block", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:piston" , "facing": "east"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:diamond_ore" } } + ] + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:piston_head"} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:diamond_ore"} }, + { "is": "minecraft:item" , "exists": false } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/diamond_ore/diamond_ore_stable_with_neighbor_updates.json b/tests/world/diamond_ore/diamond_ore_stable_with_neighbor_updates.json new file mode 100644 index 0000000..34e2b93 --- /dev/null +++ b/tests/world/diamond_ore/diamond_ore_stable_with_neighbor_updates.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "diamond_ore_stable_with_neighbor_updates", + "description": "A placed diamond ore stays diamond ore after random ticks and after neighbouring blocks are placed and removed around it.", + "tags": ["world", "ore", "diamond-ore", "neighbor-update"], + "minecraftIds": ["minecraft:diamond_ore", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 3 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:diamond_ore"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:diamond_ore"} } + ] + }, + { + "at": 2, + "do": "place_each", + "blocks": [ + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 4, "do": "remove", "pos": [1, 1, 0] }, + { "at": 4, "do": "remove", "pos": [0, 0, 0] }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:diamond_ore"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/diamond_ore/diamond_ore_tnt_explosion_drops_diamond.json b/tests/world/diamond_ore/diamond_ore_tnt_explosion_drops_diamond.json new file mode 100644 index 0000000..74c05f4 --- /dev/null +++ b/tests/world/diamond_ore/diamond_ore_tnt_explosion_drops_diamond.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "diamond_ore_tnt_explosion_drops_diamond", + "description": "A TNT explosion destroys an adjacent diamond ore block and it drops a diamond item, not a diamond ore item.", + "tags": ["world", "ore", "diamond-ore", "explosion", "drops"], + "minecraftIds": [ + "minecraft:diamond_ore", "minecraft:obsidian" , "minecraft:tnt" , "minecraft:item" , + "minecraft:diamond" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [12, 3, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0, + "minecraft:tnt_explosion_drop_decay": false + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [10, 0, 0], [12, 0, 0] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 0, "do": "place", "pos": [11, 1, 0], "block": {"id": "minecraft:diamond_ore"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5] }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [11, 1, 0], "is": {"id": "minecraft:diamond_ore"} } + ] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [12.5, 1, 0.5], + "fuse": "1s" + }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [11, 1, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1} , + {"is": "minecraft:item", "exists": true, "Item.id": "minecraft:diamond"} + ] + } + ], + "breakpoints": [] +} + From 05635dfcae160e886864aebf8eaaebabeeb39189 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Fri, 30 Oct 2026 04:40:49 +0100 Subject: [PATCH 41/85] Add Flint tests for emerald_ores (2 blocks) --- .../emerald_ore_item_placement.json | 35 ++++++++++++ ...merald_ore_pickaxe_interact_no_effect.json | 35 ++++++++++++ .../emerald_ore_piston_push_pull.json | 48 +++++++++++++++++ .../emerald_ore_tnt_drops_emerald.json | 54 +++++++++++++++++++ .../emerald_ore_tnt_drops_no_experience.json | 43 +++++++++++++++ 5 files changed, 215 insertions(+) create mode 100644 tests/world/emerald_ore/emerald_ore_item_placement.json create mode 100644 tests/world/emerald_ore/emerald_ore_pickaxe_interact_no_effect.json create mode 100644 tests/world/emerald_ore/emerald_ore_piston_push_pull.json create mode 100644 tests/world/emerald_ore/emerald_ore_tnt_drops_emerald.json create mode 100644 tests/world/emerald_ore/emerald_ore_tnt_drops_no_experience.json diff --git a/tests/world/emerald_ore/emerald_ore_item_placement.json b/tests/world/emerald_ore/emerald_ore_item_placement.json new file mode 100644 index 0000000..b6f1765 --- /dev/null +++ b/tests/world/emerald_ore/emerald_ore_item_placement.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "emerald_ore_item_placement", + "description": "Survival placement on top of a stone block creates emerald ore above it and consumes the item.", + "tags": ["world", "emerald-ore", "placement", "player"], + "minecraftIds": ["minecraft:emerald_ore", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:emerald_ore", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:emerald_ore" } }, + { "is": {"id": "minecraft:air" , "count": 0}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/emerald_ore/emerald_ore_pickaxe_interact_no_effect.json b/tests/world/emerald_ore/emerald_ore_pickaxe_interact_no_effect.json new file mode 100644 index 0000000..413c061 --- /dev/null +++ b/tests/world/emerald_ore/emerald_ore_pickaxe_interact_no_effect.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "emerald_ore_pickaxe_interact_no_effect", + "description": "Using an iron pickaxe on the top of an emerald ore does nothing: the ore stays, no item drops and the pickaxe stays in the slot.", + "tags": ["world", "emerald-ore", "interaction", "player"], + "minecraftIds": ["minecraft:emerald_ore", "minecraft:iron_pickaxe", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_pickaxe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:emerald_ore"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:emerald_ore"} } , + { "is": {"id": "minecraft:iron_pickaxe", "count": 1}, "slot": "hotbar1" }, + {"is": "minecraft:item", "exists": false} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/emerald_ore/emerald_ore_piston_push_pull.json b/tests/world/emerald_ore/emerald_ore_piston_push_pull.json new file mode 100644 index 0000000..dd84fa4 --- /dev/null +++ b/tests/world/emerald_ore/emerald_ore_piston_push_pull.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "emerald_ore_piston_push_pull", + "description": "An emerald ore is pushed one block by a sticky piston and pulled back, staying emerald ore without dropping an item. This mostly exercises generic piston behaviour (ores are not destroyed by pistons); it only confirms the ore has no special push reaction.", + "tags": ["world", "emerald-ore", "piston"], + "minecraftIds": ["minecraft:emerald_ore", "minecraft:sticky_piston", "minecraft:redstone_block", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [0, 1, 0], + "block": {"id": "minecraft:sticky_piston", "facing": "east", "extended": "false"} + }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:emerald_ore"} } + ] + }, + { "at": 1, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:emerald_ore"} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { "at": 7, "do": "remove", "pos": [0, 0, 0] }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:emerald_ore"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} }, + { "is": "minecraft:item" , "exists": false } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/emerald_ore/emerald_ore_tnt_drops_emerald.json b/tests/world/emerald_ore/emerald_ore_tnt_drops_emerald.json new file mode 100644 index 0000000..37fd9eb --- /dev/null +++ b/tests/world/emerald_ore/emerald_ore_tnt_drops_emerald.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "emerald_ore_tnt_drops_emerald", + "description": "An emerald ore destroyed by a TNT explosion drops exactly one emerald item (never the ore block). The TNT is only a trigger for the ore's loot table; the floor is obsidian so it survives the blast.", + "tags": ["world", "emerald-ore", "drops", "explosion"], + "minecraftIds": [ + "minecraft:emerald_ore", "minecraft:obsidian" , "minecraft:tnt" , "minecraft:item" , + "minecraft:emerald" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:emerald_ore"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-1.5, 3, 0.5] }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:emerald_ore"} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { + "at": 3, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [2.5, 1, 0.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} }, + {"is": "minecraft:item", "exists": true, "count": 1}, + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:emerald", "Item.count": "1"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/emerald_ore/emerald_ore_tnt_drops_no_experience.json b/tests/world/emerald_ore/emerald_ore_tnt_drops_no_experience.json new file mode 100644 index 0000000..e88ad44 --- /dev/null +++ b/tests/world/emerald_ore/emerald_ore_tnt_drops_no_experience.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "emerald_ore_tnt_drops_no_experience", + "description": "An emerald ore destroyed by an explosion with no player as the source gives no experience orbs: the ore only drops experience when a player causes the break.", + "tags": ["world", "emerald-ore", "experience", "explosion"], + "minecraftIds": ["minecraft:emerald_ore", "minecraft:obsidian", "minecraft:tnt", "minecraft:experience_orb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:emerald_ore"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-1.5, 3, 0.5] }, + { + "at": 3, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [2.5, 1, 0.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "Item.id": "minecraft:emerald"}, + {"is": "minecraft:experience_orb", "exists": false} + ] + } + ], + "breakpoints": [] +} + From 202b099f5d90d8af62ef31e7218cde5ee58b98b1 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Fri, 30 Oct 2026 04:43:05 +0100 Subject: [PATCH 42/85] Add Flint tests for gold_ores (3 blocks) --- .../gold_ore_explosion_drops_raw_gold.json | 42 +++++++++++++++++++ .../gold_ores/gold_ore_place_from_item.json | 34 +++++++++++++++ .../gold_ore_stable_without_support.json | 33 +++++++++++++++ ..._gold_ore_explosion_drops_gold_nugget.json | 41 ++++++++++++++++++ ...ether_gold_ore_stable_without_support.json | 33 +++++++++++++++ 5 files changed, 183 insertions(+) create mode 100644 tests/world/gold_ores/gold_ore_explosion_drops_raw_gold.json create mode 100644 tests/world/gold_ores/gold_ore_place_from_item.json create mode 100644 tests/world/gold_ores/gold_ore_stable_without_support.json create mode 100644 tests/world/gold_ores/nether_gold_ore_explosion_drops_gold_nugget.json create mode 100644 tests/world/gold_ores/nether_gold_ore_stable_without_support.json diff --git a/tests/world/gold_ores/gold_ore_explosion_drops_raw_gold.json b/tests/world/gold_ores/gold_ore_explosion_drops_raw_gold.json new file mode 100644 index 0000000..17827f7 --- /dev/null +++ b/tests/world/gold_ores/gold_ore_explosion_drops_raw_gold.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "gold_ore_explosion_drops_raw_gold", + "description": "An exploded gold ore (no tool) drops exactly one raw gold item and no gold ore item; DropExperienceBlock gives 0 experience.", + "tags": ["ore", "gold", "drops", "explosion"], + "minecraftIds": ["minecraft:gold_ore", "minecraft:raw_gold"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:gold_ore"} }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [2.5, 1, 0.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:raw_gold", "Item.count": 1}, + {"is": "minecraft:experience_orb", "exists": false} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/gold_ores/gold_ore_place_from_item.json b/tests/world/gold_ores/gold_ore_place_from_item.json new file mode 100644 index 0000000..84c1471 --- /dev/null +++ b/tests/world/gold_ores/gold_ore_place_from_item.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "gold_ore_place_from_item", + "description": "A survival player holding gold ore places it on top of a stone block and the stack shrinks by one.", + "tags": ["ore", "gold", "placement", "player"], + "minecraftIds": ["minecraft:gold_ore"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 3, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:gold_ore", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:gold_ore" } }, + { "is": {"id": "minecraft:gold_ore", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/gold_ores/gold_ore_stable_without_support.json b/tests/world/gold_ores/gold_ore_stable_without_support.json new file mode 100644 index 0000000..c92eeeb --- /dev/null +++ b/tests/world/gold_ores/gold_ore_stable_without_support.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "gold_ore_stable_without_support", + "description": "Gold ore is a plain block with no ticking or support requirements: placed in mid-air with no neighbours it stays unchanged after 100 ticks.", + "tags": ["ore", "gold", "block"], + "minecraftIds": ["minecraft:gold_ore"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:gold_ore"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:gold_ore"} } + ] + }, + { + "at": 100, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:gold_ore"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/gold_ores/nether_gold_ore_explosion_drops_gold_nugget.json b/tests/world/gold_ores/nether_gold_ore_explosion_drops_gold_nugget.json new file mode 100644 index 0000000..e6cb5d4 --- /dev/null +++ b/tests/world/gold_ores/nether_gold_ore_explosion_drops_gold_nugget.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "nether_gold_ore_explosion_drops_gold_nugget", + "description": "An exploded nether gold ore drops a single stack of gold nuggets (count is random 2-6, so only the id is checked) and no raw gold or ore item.", + "tags": ["ore", "gold", "drops", "explosion"], + "minecraftIds": ["minecraft:nether_gold_ore", "minecraft:gold_nugget"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:nether_gold_ore"} }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [2.5, 1, 0.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:gold_nugget"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/gold_ores/nether_gold_ore_stable_without_support.json b/tests/world/gold_ores/nether_gold_ore_stable_without_support.json new file mode 100644 index 0000000..be31ad5 --- /dev/null +++ b/tests/world/gold_ores/nether_gold_ore_stable_without_support.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "nether_gold_ore_stable_without_support", + "description": "Nether gold ore is a plain block with no ticking or support requirements: placed in mid-air with no neighbours it stays unchanged after 100 ticks.", + "tags": ["ore", "gold", "block"], + "minecraftIds": ["minecraft:nether_gold_ore"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:nether_gold_ore"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:nether_gold_ore"} } + ] + }, + { + "at": 100, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:nether_gold_ore"} } + ] + } + ], + "breakpoints": [] +} + From 04380698411220cf58d494208df5b6eb64b87393 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Fri, 30 Oct 2026 04:46:41 +0100 Subject: [PATCH 43/85] Add Flint tests for iron_ores (2 blocks) --- .../iron_ore/iron_ore_persists_in_place.json | 37 +++++++++++++ .../iron_ore/iron_ore_place_on_block.json | 30 +++++++++++ .../iron_ore_pulled_by_sticky_piston.json | 45 ++++++++++++++++ .../iron_ore/iron_ore_pushed_by_piston.json | 36 +++++++++++++ .../iron_ore/iron_ore_tnt_drops_raw_iron.json | 54 +++++++++++++++++++ 5 files changed, 202 insertions(+) create mode 100644 tests/world/iron_ore/iron_ore_persists_in_place.json create mode 100644 tests/world/iron_ore/iron_ore_place_on_block.json create mode 100644 tests/world/iron_ore/iron_ore_pulled_by_sticky_piston.json create mode 100644 tests/world/iron_ore/iron_ore_pushed_by_piston.json create mode 100644 tests/world/iron_ore/iron_ore_tnt_drops_raw_iron.json diff --git a/tests/world/iron_ore/iron_ore_persists_in_place.json b/tests/world/iron_ore/iron_ore_persists_in_place.json new file mode 100644 index 0000000..12ca535 --- /dev/null +++ b/tests/world/iron_ore/iron_ore_persists_in_place.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "iron_ore_persists_in_place", + "description": "An iron ore block placed without properties has no block state, does not fall while unsupported, and is unchanged after neighbouring blocks are placed and removed. Representative of iron ore; deepslate iron ore shares its class and XP range.", + "tags": ["ore", "iron-ore", "block-state"], + "minecraftIds": ["minecraft:iron_ore", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:iron_ore"} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:iron_ore"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } } + ] + }, + { "at": 6, "do": "place", "pos": [1, 2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 7, "do": "remove", "pos": [1, 2, 0] }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:iron_ore"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/iron_ore/iron_ore_place_on_block.json b/tests/world/iron_ore/iron_ore_place_on_block.json new file mode 100644 index 0000000..90a1ff8 --- /dev/null +++ b/tests/world/iron_ore/iron_ore_place_on_block.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "iron_ore_place_on_block", + "description": "A survival player using an iron ore item on the top face of a stone block places an iron ore block above it and consumes the item.", + "tags": ["ore", "iron-ore", "placement"], + "minecraftIds": ["minecraft:iron_ore", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"gamemode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:iron_ore"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:iron_ore"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/iron_ore/iron_ore_pulled_by_sticky_piston.json b/tests/world/iron_ore/iron_ore_pulled_by_sticky_piston.json new file mode 100644 index 0000000..42d2253 --- /dev/null +++ b/tests/world/iron_ore/iron_ore_pulled_by_sticky_piston.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "iron_ore_pulled_by_sticky_piston", + "description": "An iron ore block pushed one block by a sticky piston is pulled back again when the piston retracts, and is iron ore at both positions.", + "tags": ["ore", "iron-ore", "piston", "push-reaction"], + "minecraftIds": ["minecraft:iron_ore", "minecraft:sticky_piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:sticky_piston", "facing": "east", "extended": false} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:iron_ore" } } + ] + }, + { "at": 2, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "type": "sticky"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:iron_ore" } } + ] + }, + { "at": 11, "do": "remove", "pos": [0, 0, 0] }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:sticky_piston", "extended": false} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:iron_ore" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/iron_ore/iron_ore_pushed_by_piston.json b/tests/world/iron_ore/iron_ore_pushed_by_piston.json new file mode 100644 index 0000000..c869989 --- /dev/null +++ b/tests/world/iron_ore/iron_ore_pushed_by_piston.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "iron_ore_pushed_by_piston", + "description": "A piston powered by a redstone block pushes an iron ore block one block forward (normal push reaction) and its head takes the ore's old position.", + "tags": ["ore", "iron-ore", "piston", "push-reaction"], + "minecraftIds": ["minecraft:iron_ore", "minecraft:piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston" , "facing": "east", "extended": false} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:iron_ore" } } + ] + }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": true} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east", "type": "normal"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:iron_ore"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/iron_ore/iron_ore_tnt_drops_raw_iron.json b/tests/world/iron_ore/iron_ore_tnt_drops_raw_iron.json new file mode 100644 index 0000000..309f12a --- /dev/null +++ b/tests/world/iron_ore/iron_ore_tnt_drops_raw_iron.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "iron_ore_tnt_drops_raw_iron", + "description": "Iron ore destroyed by a TNT explosion (drop decay off, no tool) drops exactly one raw iron and no experience orb: the loot table gives raw iron without silk touch, and the explosion path (no player source) produces no experience orb.", + "tags": ["ore", "iron-ore", "drops", "explosion"], + "minecraftIds": [ + "minecraft:iron_ore" , "minecraft:obsidian" , "minecraft:tnt" , "minecraft:item" , + "minecraft:raw_iron" , "minecraft:experience_orb" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs" : false, + "minecraft:advance_time" : false, + "minecraft:advance_weather" : false, + "minecraft:tnt_explosion_drop_decay": false + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:iron_ore"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 12, 0.5] }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [2.5, 1, 0.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:raw_iron", "Item.count": 1}, + {"is": "minecraft:experience_orb", "exists": false} + ] + } + ], + "breakpoints": [] +} + From 1c37b05bd5a8cc0016e81522879b9fed6035da9a Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Fri, 30 Oct 2026 04:50:18 +0100 Subject: [PATCH 44/85] Add Flint tests for lapis_ores (2 blocks) --- .../lapis_ore_blasts_in_blast_furnace.json | 68 +++++++++++++++++++ ...apis_ore_explosion_drops_lapis_lazuli.json | 41 +++++++++++ ...pis_ore_explosion_drops_no_experience.json | 41 +++++++++++ .../lapis_ore_pushed_by_piston.json | 36 ++++++++++ .../lapis_ore_smelts_in_furnace.json | 68 +++++++++++++++++++ .../lapis_ore_survival_placement.json | 34 ++++++++++ 6 files changed, 288 insertions(+) create mode 100644 tests/world/lapis_ores/lapis_ore_blasts_in_blast_furnace.json create mode 100644 tests/world/lapis_ores/lapis_ore_explosion_drops_lapis_lazuli.json create mode 100644 tests/world/lapis_ores/lapis_ore_explosion_drops_no_experience.json create mode 100644 tests/world/lapis_ores/lapis_ore_pushed_by_piston.json create mode 100644 tests/world/lapis_ores/lapis_ore_smelts_in_furnace.json create mode 100644 tests/world/lapis_ores/lapis_ore_survival_placement.json diff --git a/tests/world/lapis_ores/lapis_ore_blasts_in_blast_furnace.json b/tests/world/lapis_ores/lapis_ore_blasts_in_blast_furnace.json new file mode 100644 index 0000000..da484e6 --- /dev/null +++ b/tests/world/lapis_ores/lapis_ore_blasts_in_blast_furnace.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lapis_ore_blasts_in_blast_furnace", + "description": "Lapis ore fed into a blast furnace by a hopper is still cooking at tick 90 and has produced one lapis lazuli by tick 115 (100 tick recipe).", + "tags": ["lapis-ore", "ore", "blast_furnace", "smelting", "block-entity", "hopper"], + "minecraftIds": ["minecraft:lapis_ore", "minecraft:blast_furnace", "minecraft:hopper", "minecraft:coal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:blast_furnace"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:hopper", + "facing": "down", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:lapis_ore\"}]"} + } + }, + { + "pos": [1, 0, 0], + "block": { + "id": "minecraft:hopper", + "facing": "west", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:coal\"}]"} + } + } + ] + }, + { + "at": 90, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:blast_furnace", + "lit": "true", + "nbt": {"Items[0].id": "\"minecraft:lapis_ore\""} + } + } + ] + }, + { + "at": 115, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:blast_furnace", + "nbt": {"Items[0].id": "\"minecraft:lapis_lazuli\"", "Items[0].count": "1"} + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/lapis_ores/lapis_ore_explosion_drops_lapis_lazuli.json b/tests/world/lapis_ores/lapis_ore_explosion_drops_lapis_lazuli.json new file mode 100644 index 0000000..b7e66bb --- /dev/null +++ b/tests/world/lapis_ores/lapis_ore_explosion_drops_lapis_lazuli.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "lapis_ore_explosion_drops_lapis_lazuli", + "description": "Lapis ore destroyed by an explosion drops one lapis lazuli item stack, not the ore block.", + "tags": ["lapis-ore", "ore", "explosion", "drops"], + "minecraftIds": ["minecraft:lapis_ore", "minecraft:obsidian", "minecraft:tnt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [14, 2, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [9, 0, 0], [13, 0, 2] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 0, "do": "place", "pos": [11, 1, 1], "block": {"id": "minecraft:lapis_ore"} }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [12.5, 1, 1.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [11, 1, 1], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:lapis_lazuli"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/lapis_ores/lapis_ore_explosion_drops_no_experience.json b/tests/world/lapis_ores/lapis_ore_explosion_drops_no_experience.json new file mode 100644 index 0000000..b405388 --- /dev/null +++ b/tests/world/lapis_ores/lapis_ore_explosion_drops_no_experience.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "lapis_ore_explosion_drops_no_experience", + "description": "Lapis ore destroyed by TNT with no player source drops no experience orb.", + "tags": ["lapis-ore", "ore", "explosion", "experience"], + "minecraftIds": ["minecraft:lapis_ore", "minecraft:obsidian", "minecraft:tnt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [14, 2, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [9, 0, 0], [13, 0, 2] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 0, "do": "place", "pos": [11, 1, 1], "block": {"id": "minecraft:lapis_ore"} }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [12.5, 1, 1.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [11, 1, 1], "is": {"id": "minecraft:air"} }, + { "is": "minecraft:experience_orb", "exists": false } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/lapis_ores/lapis_ore_pushed_by_piston.json b/tests/world/lapis_ores/lapis_ore_pushed_by_piston.json new file mode 100644 index 0000000..0b34bbe --- /dev/null +++ b/tests/world/lapis_ores/lapis_ore_pushed_by_piston.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "lapis_ore_pushed_by_piston", + "description": "A piston pushes lapis ore one block forward without breaking it.", + "tags": ["lapis-ore", "ore", "piston", "push-reaction"], + "minecraftIds": ["minecraft:lapis_ore", "minecraft:piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:piston" , "facing": "east"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:lapis_ore" } } + ] + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:piston" , "extended": true} }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:piston_head" } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:lapis_ore" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/lapis_ores/lapis_ore_smelts_in_furnace.json b/tests/world/lapis_ores/lapis_ore_smelts_in_furnace.json new file mode 100644 index 0000000..1446416 --- /dev/null +++ b/tests/world/lapis_ores/lapis_ore_smelts_in_furnace.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "lapis_ore_smelts_in_furnace", + "description": "Lapis ore fed into a furnace by a hopper is still cooking at tick 190 and has produced one lapis lazuli by tick 215 (200 tick recipe).", + "tags": ["lapis-ore", "ore", "furnace", "smelting", "block-entity", "hopper"], + "minecraftIds": ["minecraft:lapis_ore", "minecraft:furnace", "minecraft:hopper", "minecraft:coal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:furnace"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:hopper", + "facing": "down", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:lapis_ore\"}]"} + } + }, + { + "pos": [1, 0, 0], + "block": { + "id": "minecraft:hopper", + "facing": "west", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:coal\"}]"} + } + } + ] + }, + { + "at": 190, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "true", + "nbt": {"Items[0].id": "\"minecraft:lapis_ore\""} + } + } + ] + }, + { + "at": 215, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "nbt": {"Items[0].id": "\"minecraft:lapis_lazuli\"", "Items[0].count": "1"} + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/lapis_ores/lapis_ore_survival_placement.json b/tests/world/lapis_ores/lapis_ore_survival_placement.json new file mode 100644 index 0000000..9a6cae9 --- /dev/null +++ b/tests/world/lapis_ores/lapis_ore_survival_placement.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "lapis_ore_survival_placement", + "description": "Survival placement on top of stone creates a plain lapis ore block and consumes the item.", + "tags": ["lapis-ore", "ore", "placement", "player"], + "minecraftIds": ["minecraft:lapis_ore", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:lapis_ore", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:lapis_ore"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + From 78de2409207a6e688b248606e0dbb9a53fb716da Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Fri, 30 Oct 2026 04:59:17 +0100 Subject: [PATCH 45/85] Add Flint tests for dirt_path (1 blocks) --- .../dirt_path_carpet_above_keeps_path.json | 42 ++++++++++++++ ...path_dirt_stays_after_support_removed.json | 50 +++++++++++++++++ .../dirt_path_explosion_drops_dirt.json | 56 +++++++++++++++++++ ...dirt_path_fence_gate_above_keeps_path.json | 42 ++++++++++++++ .../dirt_path_hoe_blocked_by_carpet.json | 49 ++++++++++++++++ .../dirt_path_hoe_tills_to_farmland.json | 47 ++++++++++++++++ ...rt_path_ignores_side_neighbor_changes.json | 46 +++++++++++++++ .../dirt_path/dirt_path_item_placement.json | 39 +++++++++++++ ...irt_path_item_under_solid_places_dirt.json | 48 ++++++++++++++++ .../dirt_path_shovel_flattens_grass.json | 33 +++++++++++ .../dirt_path_solid_above_turns_to_dirt.json | 49 ++++++++++++++++ 11 files changed, 501 insertions(+) create mode 100644 tests/world/dirt_path/dirt_path_carpet_above_keeps_path.json create mode 100644 tests/world/dirt_path/dirt_path_dirt_stays_after_support_removed.json create mode 100644 tests/world/dirt_path/dirt_path_explosion_drops_dirt.json create mode 100644 tests/world/dirt_path/dirt_path_fence_gate_above_keeps_path.json create mode 100644 tests/world/dirt_path/dirt_path_hoe_blocked_by_carpet.json create mode 100644 tests/world/dirt_path/dirt_path_hoe_tills_to_farmland.json create mode 100644 tests/world/dirt_path/dirt_path_ignores_side_neighbor_changes.json create mode 100644 tests/world/dirt_path/dirt_path_item_placement.json create mode 100644 tests/world/dirt_path/dirt_path_item_under_solid_places_dirt.json create mode 100644 tests/world/dirt_path/dirt_path_shovel_flattens_grass.json create mode 100644 tests/world/dirt_path/dirt_path_solid_above_turns_to_dirt.json diff --git a/tests/world/dirt_path/dirt_path_carpet_above_keeps_path.json b/tests/world/dirt_path/dirt_path_carpet_above_keeps_path.json new file mode 100644 index 0000000..bcf3c5c --- /dev/null +++ b/tests/world/dirt_path/dirt_path_carpet_above_keeps_path.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dirt_path_carpet_above_keeps_path", + "description": "A carpet placed on top of a dirt path does not turn it into dirt because carpet is not solid.", + "tags": ["world", "dirt_path", "carpet"], + "minecraftIds": ["minecraft:dirt_path", "minecraft:white_carpet"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt_path"} }, + { "at": 3, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:white_carpet"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt_path" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:white_carpet"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/dirt_path/dirt_path_dirt_stays_after_support_removed.json b/tests/world/dirt_path/dirt_path_dirt_stays_after_support_removed.json new file mode 100644 index 0000000..a6658bb --- /dev/null +++ b/tests/world/dirt_path/dirt_path_dirt_stays_after_support_removed.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dirt_path_dirt_stays_after_support_removed", + "description": "After a path turned into dirt under a stone block, removing the stone does not bring the path back.", + "tags": ["world", "dirt_path", "neighbor-update"], + "minecraftIds": ["minecraft:dirt_path", "minecraft:dirt", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt_path"} }, + { "at": 3, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt"} } + ] + }, + { "at": 9, "do": "remove", "pos": [0, 2, 0] }, + { + "at": 14, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/dirt_path/dirt_path_explosion_drops_dirt.json b/tests/world/dirt_path/dirt_path_explosion_drops_dirt.json new file mode 100644 index 0000000..5b01b6f --- /dev/null +++ b/tests/world/dirt_path/dirt_path_explosion_drops_dirt.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dirt_path_explosion_drops_dirt", + "description": "A dirt path destroyed by a TNT explosion drops exactly one dirt item and no dirt path item.", + "tags": ["world", "dirt_path", "drops", "explosion"], + "minecraftIds": ["minecraft:dirt_path", "minecraft:dirt", "minecraft:tnt", "minecraft:obsidian", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 1, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:dirt_path"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 12, 0.5] }, + { + "at": 2, + "do": "assert", + "checks": [ {"is": "minecraft:item", "exists": false} ] + }, + { + "at": 3, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [2.5, 1, 0.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1} , + {"is": "minecraft:item", "exists": true, "Item.id": "minecraft:dirt"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/dirt_path/dirt_path_fence_gate_above_keeps_path.json b/tests/world/dirt_path/dirt_path_fence_gate_above_keeps_path.json new file mode 100644 index 0000000..caf982c --- /dev/null +++ b/tests/world/dirt_path/dirt_path_fence_gate_above_keeps_path.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dirt_path_fence_gate_above_keeps_path", + "description": "A fence gate placed on top of a dirt path does not turn it into dirt.", + "tags": ["world", "dirt_path", "fence_gate"], + "minecraftIds": ["minecraft:dirt_path", "minecraft:oak_fence_gate"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt_path"} }, + { "at": 3, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:oak_fence_gate", "facing": "north"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt_path" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:oak_fence_gate"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/dirt_path/dirt_path_hoe_blocked_by_carpet.json b/tests/world/dirt_path/dirt_path_hoe_blocked_by_carpet.json new file mode 100644 index 0000000..585d9d1 --- /dev/null +++ b/tests/world/dirt_path/dirt_path_hoe_blocked_by_carpet.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dirt_path_hoe_blocked_by_carpet", + "description": "A hoe used on the side of a dirt path that has a carpet on top does nothing because the block above is not air.", + "tags": ["world", "dirt_path", "hoe", "player"], + "minecraftIds": ["minecraft:dirt_path", "minecraft:white_carpet", "minecraft:iron_hoe"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt_path"} }, + { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:white_carpet"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 20] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt_path" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:white_carpet"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/dirt_path/dirt_path_hoe_tills_to_farmland.json b/tests/world/dirt_path/dirt_path_hoe_tills_to_farmland.json new file mode 100644 index 0000000..cf4b073 --- /dev/null +++ b/tests/world/dirt_path/dirt_path_hoe_tills_to_farmland.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dirt_path_hoe_tills_to_farmland", + "description": "A survival player using a hoe on the top of a dirt path with air above turns it into farmland.", + "tags": ["world", "dirt_path", "hoe", "player"], + "minecraftIds": ["minecraft:dirt_path", "minecraft:farmland", "minecraft:iron_hoe"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt_path"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:farmland"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/dirt_path/dirt_path_ignores_side_neighbor_changes.json b/tests/world/dirt_path/dirt_path_ignores_side_neighbor_changes.json new file mode 100644 index 0000000..30adedb --- /dev/null +++ b/tests/world/dirt_path/dirt_path_ignores_side_neighbor_changes.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dirt_path_ignores_side_neighbor_changes", + "description": "Solid blocks placed beside a dirt path and the removal of the block below it do not turn the path into dirt, because only a change above is checked.", + "tags": ["world", "dirt_path", "neighbor-update"], + "minecraftIds": ["minecraft:dirt_path", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt_path"} }, + { "at": 3, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 3, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 3, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:stone"} }, + { "at": 3, "do": "place", "pos": [0, 1, -1], "block": {"id": "minecraft:stone"} }, + { "at": 4, "do": "remove", "pos": [0, 0, 0] }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt_path"} }, + { "pos": [0, 0, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/dirt_path/dirt_path_item_placement.json b/tests/world/dirt_path/dirt_path_item_placement.json new file mode 100644 index 0000000..928e75e --- /dev/null +++ b/tests/world/dirt_path/dirt_path_item_placement.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dirt_path_item_placement", + "description": "A survival player placing a dirt path item on a floor with air above gets a dirt path block, and the item is used up.", + "tags": ["world", "dirt_path", "placement", "player"], + "minecraftIds": ["minecraft:dirt_path", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dirt_path", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt_path" } }, + { "is": {"id": "minecraft:air" , "count": 0}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/dirt_path/dirt_path_item_under_solid_places_dirt.json b/tests/world/dirt_path/dirt_path_item_under_solid_places_dirt.json new file mode 100644 index 0000000..88227b8 --- /dev/null +++ b/tests/world/dirt_path/dirt_path_item_under_solid_places_dirt.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dirt_path_item_under_solid_places_dirt", + "description": "A survival player placing a dirt path item in a spot with a solid block directly above gets plain dirt instead of a path.", + "tags": ["world", "dirt_path", "placement", "player"], + "minecraftIds": ["minecraft:dirt_path", "minecraft:dirt", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dirt_path", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 28] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/dirt_path/dirt_path_shovel_flattens_grass.json b/tests/world/dirt_path/dirt_path_shovel_flattens_grass.json new file mode 100644 index 0000000..59b55c1 --- /dev/null +++ b/tests/world/dirt_path/dirt_path_shovel_flattens_grass.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dirt_path_shovel_flattens_grass", + "description": "A survival player using a shovel on the top of a grass block with air above turns it into a dirt path.", + "tags": ["world", "dirt_path", "shovel", "player"], + "minecraftIds": ["minecraft:dirt_path", "minecraft:grass_block", "minecraft:iron_shovel"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt_path"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/dirt_path/dirt_path_solid_above_turns_to_dirt.json b/tests/world/dirt_path/dirt_path_solid_above_turns_to_dirt.json new file mode 100644 index 0000000..7b3faa2 --- /dev/null +++ b/tests/world/dirt_path/dirt_path_solid_above_turns_to_dirt.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "dirt_path_solid_above_turns_to_dirt", + "description": "Placing a stone block directly on top of a dirt path turns the path into dirt a tick later.", + "tags": ["world", "dirt_path", "neighbor-update"], + "minecraftIds": ["minecraft:dirt_path", "minecraft:dirt", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt_path"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt_path"} } + ] + }, + { "at": 3, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone"} } + ] + } + ], + "breakpoints": [] +} + From 189da3ba58e8e17ee6650205d2c2c788b7fb6cba Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Fri, 30 Oct 2026 05:11:03 +0100 Subject: [PATCH 46/85] Add Flint tests for dragon_egg (1 blocks) --- ...agon_egg_explosion_destroys_and_drops.json | 48 ++++++++++++++++++ ...ragon_egg_falls_into_torch_and_breaks.json | 45 +++++++++++++++++ .../dragon_egg/dragon_egg_falls_over_air.json | 36 +++++++++++++ .../dragon_egg/dragon_egg_item_placement.json | 46 +++++++++++++++++ .../dragon_egg_piston_destroys_and_drops.json | 50 +++++++++++++++++++ .../dragon_egg_right_click_teleports.json | 42 ++++++++++++++++ ...on_egg_right_click_with_block_in_hand.json | 40 +++++++++++++++ .../dragon_egg_supported_stays.json | 28 +++++++++++ 8 files changed, 335 insertions(+) create mode 100644 tests/gravity/dragon_egg/dragon_egg_explosion_destroys_and_drops.json create mode 100644 tests/gravity/dragon_egg/dragon_egg_falls_into_torch_and_breaks.json create mode 100644 tests/gravity/dragon_egg/dragon_egg_falls_over_air.json create mode 100644 tests/gravity/dragon_egg/dragon_egg_item_placement.json create mode 100644 tests/gravity/dragon_egg/dragon_egg_piston_destroys_and_drops.json create mode 100644 tests/gravity/dragon_egg/dragon_egg_right_click_teleports.json create mode 100644 tests/gravity/dragon_egg/dragon_egg_right_click_with_block_in_hand.json create mode 100644 tests/gravity/dragon_egg/dragon_egg_supported_stays.json diff --git a/tests/gravity/dragon_egg/dragon_egg_explosion_destroys_and_drops.json b/tests/gravity/dragon_egg/dragon_egg_explosion_destroys_and_drops.json new file mode 100644 index 0000000..145ad42 --- /dev/null +++ b/tests/gravity/dragon_egg/dragon_egg_explosion_destroys_and_drops.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dragon_egg_explosion_destroys_and_drops", + "description": "TNT exploding next to a dragon egg on an obsidian floor destroys the egg, and because the egg is in the explosion-resistant loot list it drops exactly one dragon egg item.", + "tags": ["gravity", "dragon-egg", "explosion", "drops"], + "minecraftIds": ["minecraft:dragon_egg", "minecraft:obsidian", "minecraft:tnt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, -3], [6, 4, 5] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-3, 0, -3], [6, 0, 5] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 0, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:dragon_egg"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:dragon_egg"} } + ] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [2.5, 1, 1.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air"} }, + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:dragon_egg", "Item.count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/dragon_egg/dragon_egg_falls_into_torch_and_breaks.json b/tests/gravity/dragon_egg/dragon_egg_falls_into_torch_and_breaks.json new file mode 100644 index 0000000..9e0270d --- /dev/null +++ b/tests/gravity/dragon_egg/dragon_egg_falls_into_torch_and_breaks.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dragon_egg_falls_into_torch_and_breaks", + "description": "A falling dragon egg passes through the collisionless torch (Blocks.TORCH is noCollision) and reaches the obsidian floor inside the torch's cell. FallingBlockEntity then finds that the torch cannot be replaced, so the egg does not become a block: it is discarded and drops one dragon egg item. The torch stays. The floor is wide so the dropped item (random sideways velocity) cannot slide off it.", + "tags": ["gravity", "dragon-egg", "falling", "torch", "drops"], + "minecraftIds": ["minecraft:dragon_egg", "minecraft:torch", "minecraft:obsidian"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, -3], [3, 4, 3] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs" : false, + "minecraft:advance_time" : false, + "minecraft:advance_weather": false, + "minecraft:entity_drops" : true + } + } + }, + "timeline": [ + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [10.5, 1, 10.5] }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 0, -3], [3, 0, 3] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:torch"} }, + { "at": 1, "do": "place", "pos": [0, 3, 0], "block": {"id": "minecraft:dragon_egg"} }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:torch"} } , + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} } , + { "pos": [0, 3, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:dragon_egg"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/dragon_egg/dragon_egg_falls_over_air.json b/tests/gravity/dragon_egg/dragon_egg_falls_over_air.json new file mode 100644 index 0000000..779b21c --- /dev/null +++ b/tests/gravity/dragon_egg/dragon_egg_falls_over_air.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dragon_egg_falls_over_air", + "description": "A dragon egg placed over air stays for its 5-tick placement delay, then falls and lands on the floor as a dragon egg block.", + "tags": ["gravity", "dragon-egg", "falling"], + "minecraftIds": ["minecraft:dragon_egg", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 4, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "place", "pos": [0, 3, 0], "block": {"id": "minecraft:dragon_egg"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 3, 0], "is": {"id": "minecraft:dragon_egg"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } } + ] + }, + { + "at": 25, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dragon_egg"} }, + { "pos": [0, 3, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/dragon_egg/dragon_egg_item_placement.json b/tests/gravity/dragon_egg/dragon_egg_item_placement.json new file mode 100644 index 0000000..6cfb7d3 --- /dev/null +++ b/tests/gravity/dragon_egg/dragon_egg_item_placement.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dragon_egg_item_placement", + "description": "A survival player placing the dragon egg item on stone gets a dragon egg block on the clicked face, and the item is consumed.", + "tags": ["gravity", "dragon-egg", "placement", "player"], + "minecraftIds": ["minecraft:dragon_egg", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:dragon_egg", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dragon_egg" } }, + { "is": {"id": "minecraft:air" , "count": 0}, "slot": "hotbar1" } + ] + }, + { + "at": 15, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dragon_egg"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/dragon_egg/dragon_egg_piston_destroys_and_drops.json b/tests/gravity/dragon_egg/dragon_egg_piston_destroys_and_drops.json new file mode 100644 index 0000000..894bdd4 --- /dev/null +++ b/tests/gravity/dragon_egg/dragon_egg_piston_destroys_and_drops.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dragon_egg_piston_destroys_and_drops", + "description": "A piston pushing a dragon egg destroys it (PushReaction.DESTROY) instead of moving it, and the egg drops exactly one dragon egg item.", + "tags": ["gravity", "dragon-egg", "piston", "drops"], + "minecraftIds": ["minecraft:dragon_egg", "minecraft:piston", "minecraft:redstone_block", "minecraft:obsidian"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, -3], [4, 4, 3] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-3, 0, -3], [4, 0, 3] ], + "with": {"id": "minecraft:obsidian"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston" , "facing": "up", "extended": "false"} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:dragon_egg" } } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:dragon_egg"} } + ] + }, + { "at": 3, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "extended": "true"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:piston_head"} }, + { "pos": [0, 3, 0], "is": {"id": "minecraft:air"} }, + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:dragon_egg", "Item.count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/dragon_egg/dragon_egg_right_click_teleports.json b/tests/gravity/dragon_egg/dragon_egg_right_click_teleports.json new file mode 100644 index 0000000..8bc2cd1 --- /dev/null +++ b/tests/gravity/dragon_egg/dragon_egg_right_click_teleports.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dragon_egg_right_click_teleports", + "description": "Right-clicking a dragon egg with an empty hand teleports it (DragonEggBlock.useWithoutItem). This test only asserts that the original position becomes air; flint cannot search for the destination, so it does not check where the egg landed or that exactly one egg exists.", + "tags": ["gravity", "dragon-egg", "interaction", "teleport", "player"], + "minecraftIds": ["minecraft:dragon_egg", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-7, 0, -7], [7, 4, 7] ] + }, + "player": {"selected_hotbar": 1, "game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-7, 0, -7], [7, 0, 7] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dragon_egg"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dragon_egg"} } + ] + }, + {"at": 3, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/dragon_egg/dragon_egg_right_click_with_block_in_hand.json b/tests/gravity/dragon_egg/dragon_egg_right_click_with_block_in_hand.json new file mode 100644 index 0000000..1dbc540 --- /dev/null +++ b/tests/gravity/dragon_egg/dragon_egg_right_click_with_block_in_hand.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dragon_egg_right_click_with_block_in_hand", + "description": "Right-clicking a dragon egg while holding stone still teleports the egg (the block passes the click to useWithoutItem), and the stone is neither placed nor consumed. Like the empty-hand test it only asserts that the original position becomes air; it does not locate the destination.", + "tags": ["gravity", "dragon-egg", "interaction", "teleport", "player"], + "minecraftIds": ["minecraft:dragon_egg", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-7, 0, -7], [7, 4, 7] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-7, 0, -7], [7, 0, 7] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dragon_egg"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:stone", "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/dragon_egg/dragon_egg_supported_stays.json b/tests/gravity/dragon_egg/dragon_egg_supported_stays.json new file mode 100644 index 0000000..b32896a --- /dev/null +++ b/tests/gravity/dragon_egg/dragon_egg_supported_stays.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "dragon_egg_supported_stays", + "description": "A dragon egg placed on a solid block stays a dragon egg and does not fall.", + "tags": ["gravity", "dragon-egg", "placement"], + "minecraftIds": ["minecraft:dragon_egg", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dragon_egg"} }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dragon_egg"} }, + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone" } } + ] + } + ], + "breakpoints": [] +} + From 76c5717a1dd05e91baa11a39843a76b0348443cf Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Fri, 30 Oct 2026 05:16:13 +0100 Subject: [PATCH 47/85] Add Flint tests for end_gateway (1 blocks) --- ...d_gateway_block_entity_nbt_round_trip.json | 44 +++++++++++++++ .../end_gateway_blocks_piston.json | 45 ++++++++++++++++ .../end_gateway_not_replaced_by_lava.json | 53 ++++++++++++++++++ .../end_gateway_not_replaced_by_water.json | 53 ++++++++++++++++++ .../end_gateway_placement_persists.json | 32 +++++++++++ .../end_gateway_survives_tnt_explosion.json | 54 +++++++++++++++++++ 6 files changed, 281 insertions(+) create mode 100644 tests/portal/end_gateway/end_gateway_block_entity_nbt_round_trip.json create mode 100644 tests/portal/end_gateway/end_gateway_blocks_piston.json create mode 100644 tests/portal/end_gateway/end_gateway_not_replaced_by_lava.json create mode 100644 tests/portal/end_gateway/end_gateway_not_replaced_by_water.json create mode 100644 tests/portal/end_gateway/end_gateway_placement_persists.json create mode 100644 tests/portal/end_gateway/end_gateway_survives_tnt_explosion.json diff --git a/tests/portal/end_gateway/end_gateway_block_entity_nbt_round_trip.json b/tests/portal/end_gateway/end_gateway_block_entity_nbt_round_trip.json new file mode 100644 index 0000000..df03136 --- /dev/null +++ b/tests/portal/end_gateway/end_gateway_block_entity_nbt_round_trip.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:end_gateway"], + "name": "End Gateway Block Entity NBT Round Trip", + "description": "An end gateway set with exit_portal and ExactTeleport block-entity data keeps both values when its NBT is read back.", + "tags": ["portal", "end_gateway", "block-entity", "nbt"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:obsidian"} }, + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:end_gateway", + "nbt": {"exit_portal": "[I; 10, 70, -20]", "ExactTeleport": "1b"} + } + }, + { + "at": 1, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:end_gateway", + "nbt": { + "exit_portal[0]": 10, + "exit_portal[1]": 70, + "exit_portal[2]": -20, + "ExactTeleport": "1b" + } + } + } + ] + } + ] +} + diff --git a/tests/portal/end_gateway/end_gateway_blocks_piston.json b/tests/portal/end_gateway/end_gateway_blocks_piston.json new file mode 100644 index 0000000..ba0946b --- /dev/null +++ b/tests/portal/end_gateway/end_gateway_blocks_piston.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:end_gateway", "minecraft:piston", "minecraft:redstone_block"], + "name": "End Gateway Blocks Piston", + "description": "A powered piston does not extend into an end gateway (push reaction BLOCK), while the same setup with stone extends and pushes it.", + "tags": ["portal", "end_gateway", "piston", "push-reaction"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 0, 3] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:piston" , "facing": "east"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:end_gateway" } }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:piston" , "facing": "east"} }, + { "pos": [1, 0, 2], "block": {"id": "minecraft:stone" } } + ] + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 1], "block": {"id": "minecraft:redstone_block"} }, + { "pos": [0, 0, 3], "block": {"id": "minecraft:redstone_block"} } + ] + }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:piston" , "extended": false} }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:end_gateway" } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:air" } }, + { "pos": [0, 0, 2], "is": {"id": "minecraft:piston" , "extended": true } }, + { "pos": [2, 0, 2], "is": {"id": "minecraft:stone" } } + ] + } + ] +} + diff --git a/tests/portal/end_gateway/end_gateway_not_replaced_by_lava.json b/tests/portal/end_gateway/end_gateway_not_replaced_by_lava.json new file mode 100644 index 0000000..6d51014 --- /dev/null +++ b/tests/portal/end_gateway/end_gateway_not_replaced_by_lava.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:end_gateway", "minecraft:lava"], + "name": "End Gateway Not Replaced By Lava", + "description": "In a walled corridor, a lava source flows into the open cell on one side but does not replace the end gateway on the other side.", + "tags": ["portal", "end_gateway", "fluid", "lava"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [4, 1, 0] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 1, 2], [4, 1, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 1, 1], "block": {"id": "minecraft:end_gateway"} } + ] + }, + { "at": 1, "do": "place", "pos": [2, 1, 1], "block": {"id": "minecraft:lava"} }, + { + "at": 60, + "do": "assert", + "checks": [ + { "pos": [2, 1, 1], "is": {"id": "minecraft:lava" , "level": 0} }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:lava" , "level": 2} }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:end_gateway" } } + ] + } + ] +} + diff --git a/tests/portal/end_gateway/end_gateway_not_replaced_by_water.json b/tests/portal/end_gateway/end_gateway_not_replaced_by_water.json new file mode 100644 index 0000000..cc1a4df --- /dev/null +++ b/tests/portal/end_gateway/end_gateway_not_replaced_by_water.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:end_gateway", "minecraft:water"], + "name": "End Gateway Not Replaced By Water", + "description": "In a walled corridor, a water source flows into the open cell on one side but does not replace the end gateway on the other side.", + "tags": ["portal", "end_gateway", "fluid", "water"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [4, 1, 0] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 1, 2], [4, 1, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 1, 1], "block": {"id": "minecraft:end_gateway"} } + ] + }, + { "at": 1, "do": "place", "pos": [2, 1, 1], "block": {"id": "minecraft:water"} }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [2, 1, 1], "is": {"id": "minecraft:water" , "level": 0} }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:water" , "level": 1} }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:end_gateway" } } + ] + } + ] +} + diff --git a/tests/portal/end_gateway/end_gateway_placement_persists.json b/tests/portal/end_gateway/end_gateway_placement_persists.json new file mode 100644 index 0000000..279cd7e --- /dev/null +++ b/tests/portal/end_gateway/end_gateway_placement_persists.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:end_gateway"], + "name": "End Gateway Placement Persists", + "description": "An end gateway set by command exists immediately and is still there 40 ticks later.", + "tags": ["portal", "end_gateway", "placement"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:obsidian"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:end_gateway"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:end_gateway"} } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:end_gateway"} } + ] + } + ] +} + diff --git a/tests/portal/end_gateway/end_gateway_survives_tnt_explosion.json b/tests/portal/end_gateway/end_gateway_survives_tnt_explosion.json new file mode 100644 index 0000000..e2c5af9 --- /dev/null +++ b/tests/portal/end_gateway/end_gateway_survives_tnt_explosion.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:end_gateway", "minecraft:dirt", "minecraft:tnt"], + "name": "End Gateway Survives TNT Explosion", + "description": "A TNT explosion between an end gateway and a dirt block destroys the dirt, but the gateway (explosion resistance 3600000) stays in place.", + "tags": ["portal", "end_gateway", "explosion", "blast-resistance"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 2] ], + "with": {"id": "minecraft:obsidian"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 1, 1], "block": {"id": "minecraft:end_gateway"} }, + { "pos": [3, 1, 1], "block": {"id": "minecraft:dirt" } } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:end_gateway"} }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:dirt" } } + ] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [2.5, 1, 1.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:end_gateway"} }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:air" } } + ] + } + ] +} + From dfd0279002ce09655d1a99baa7d6b625320b2056 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Fri, 30 Oct 2026 05:20:20 +0100 Subject: [PATCH 48/85] Add Flint tests for end_portal (1 blocks) --- .../end_portal_blocks_lava_flow.json | 60 ++++++++++ .../end_portal_blocks_water_flow.json | 60 ++++++++++ .../end_portal_created_by_last_eye.json | 101 +++++++++++++++++ ...tal_not_created_by_wrong_facing_frame.json | 96 ++++++++++++++++ ...nd_portal_not_pulled_by_sticky_piston.json | 45 ++++++++ .../end_portal_not_pushed_by_piston.json | 35 ++++++ .../end_portal_replaces_interior_blocks.json | 96 ++++++++++++++++ .../end_portal_stays_in_midair.json | 34 ++++++ .../end_portal_survives_explosion.json | 74 +++++++++++++ ...nder_eye_on_filled_frame_does_nothing.json | 103 ++++++++++++++++++ 10 files changed, 704 insertions(+) create mode 100644 tests/portal/end_portal/end_portal_blocks_lava_flow.json create mode 100644 tests/portal/end_portal/end_portal_blocks_water_flow.json create mode 100644 tests/portal/end_portal/end_portal_created_by_last_eye.json create mode 100644 tests/portal/end_portal/end_portal_not_created_by_wrong_facing_frame.json create mode 100644 tests/portal/end_portal/end_portal_not_pulled_by_sticky_piston.json create mode 100644 tests/portal/end_portal/end_portal_not_pushed_by_piston.json create mode 100644 tests/portal/end_portal/end_portal_replaces_interior_blocks.json create mode 100644 tests/portal/end_portal/end_portal_stays_in_midair.json create mode 100644 tests/portal/end_portal/end_portal_survives_explosion.json create mode 100644 tests/portal/end_portal/ender_eye_on_filled_frame_does_nothing.json diff --git a/tests/portal/end_portal/end_portal_blocks_lava_flow.json b/tests/portal/end_portal/end_portal_blocks_lava_flow.json new file mode 100644 index 0000000..dac5545 --- /dev/null +++ b/tests/portal/end_portal/end_portal_blocks_lava_flow.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_blocks_lava_flow", + "description": "Lava next to an end portal in an enclosed corridor does not flow into or replace the portal.", + "tags": ["portal", "end_portal", "fluid"], + "minecraftIds": ["minecraft:end_portal", "minecraft:lava"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 2, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 1, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 1, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 1, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 1, 1], "block": {"id": "minecraft:end_portal"} } + ] + }, + { "at": 1, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:lava", "level": 0} }, + { + "at": 120, + "do": "assert", + "checks": [ + { "pos": [2, 1, 1], "is": {"id": "minecraft:end_portal"} }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:obsidian" } } + ] + } + ] +} + diff --git a/tests/portal/end_portal/end_portal_blocks_water_flow.json b/tests/portal/end_portal/end_portal_blocks_water_flow.json new file mode 100644 index 0000000..4f93856 --- /dev/null +++ b/tests/portal/end_portal/end_portal_blocks_water_flow.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_blocks_water_flow", + "description": "Water next to an end portal in an enclosed corridor does not flow into or replace the portal.", + "tags": ["portal", "end_portal", "fluid"], + "minecraftIds": ["minecraft:end_portal", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 2, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 1, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 1, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 1, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 1, 1], "block": {"id": "minecraft:end_portal"} } + ] + }, + { "at": 1, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:water", "level": 0} }, + { + "at": 60, + "do": "assert", + "checks": [ + { "pos": [2, 1, 1], "is": {"id": "minecraft:end_portal"} }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:obsidian" } } + ] + } + ] +} + diff --git a/tests/portal/end_portal/end_portal_created_by_last_eye.json b/tests/portal/end_portal/end_portal_created_by_last_eye.json new file mode 100644 index 0000000..3f6fa2f --- /dev/null +++ b/tests/portal/end_portal/end_portal_created_by_last_eye.json @@ -0,0 +1,101 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_created_by_last_eye", + "description": "Placing the last eye of ender into a complete, inward-facing frame ring turns the 3x3 interior into end portal blocks.", + "tags": ["portal", "end_portal", "end_portal_frame", "ender_eye"], + "minecraftIds": ["minecraft:end_portal", "minecraft:end_portal_frame", "minecraft:ender_eye"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -2], [4, 3, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": false} }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [3, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } } + ] + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -2], [4, 0, -1] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 1, -1.5], "rot": [0, 22] }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air"} } + ] + }, + {"at": 3, "do": "interact", "item": "minecraft:ender_eye"}, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [1, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [3, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [3, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} } + ] + }, + { + "at": 10, + "do": "assert", + "checks": [ {"slot": "hotbar1", "is": "empty"} ] + } + ] +} + diff --git a/tests/portal/end_portal/end_portal_not_created_by_wrong_facing_frame.json b/tests/portal/end_portal/end_portal_not_created_by_wrong_facing_frame.json new file mode 100644 index 0000000..bb6b691 --- /dev/null +++ b/tests/portal/end_portal/end_portal_not_created_by_wrong_facing_frame.json @@ -0,0 +1,96 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_not_created_by_wrong_facing_frame", + "description": "Completing a frame ring that contains one frame facing the wrong way does not create an end portal.", + "tags": ["portal", "end_portal", "end_portal_frame", "ender_eye"], + "minecraftIds": ["minecraft:end_portal", "minecraft:end_portal_frame", "minecraft:ender_eye"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -2], [4, 3, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": false} }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [3, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } } + ] + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -2], [4, 0, -1] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 1, -1.5], "rot": [0, 22] }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air"} } + ] + }, + {"at": 3, "do": "interact", "item": "minecraft:ender_eye"}, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} } + ] + } + ] +} + diff --git a/tests/portal/end_portal/end_portal_not_pulled_by_sticky_piston.json b/tests/portal/end_portal/end_portal_not_pulled_by_sticky_piston.json new file mode 100644 index 0000000..78d31ac --- /dev/null +++ b/tests/portal/end_portal/end_portal_not_pulled_by_sticky_piston.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_not_pulled_by_sticky_piston", + "description": "A sticky piston extending and retracting next to an end portal never pulls it: the portal stays in place.", + "tags": ["portal", "end_portal", "sticky-piston", "push-reaction"], + "minecraftIds": ["minecraft:end_portal", "minecraft:sticky_piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:sticky_piston", "facing": "east", "extended": false} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:end_portal" } } + ] + }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:sticky_piston", "facing": "east", "extended": true} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east", "type": "sticky"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:end_portal"} } + ] + }, + { "at": 14, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:air"} }, + { + "at": 26, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:sticky_piston", "facing": "east", "extended": false} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:end_portal" } } + ] + } + ] +} + diff --git a/tests/portal/end_portal/end_portal_not_pushed_by_piston.json b/tests/portal/end_portal/end_portal_not_pushed_by_piston.json new file mode 100644 index 0000000..46c391e --- /dev/null +++ b/tests/portal/end_portal/end_portal_not_pushed_by_piston.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_not_pushed_by_piston", + "description": "A powered piston facing an end portal cannot push it: the portal stays and the piston does not extend.", + "tags": ["portal", "end_portal", "piston", "push-reaction"], + "minecraftIds": ["minecraft:end_portal", "minecraft:piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston" , "facing": "east", "extended": false} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_portal" } } + ] + }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston" , "facing": "east", "extended": false} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ] +} + diff --git a/tests/portal/end_portal/end_portal_replaces_interior_blocks.json b/tests/portal/end_portal/end_portal_replaces_interior_blocks.json new file mode 100644 index 0000000..7e83b4a --- /dev/null +++ b/tests/portal/end_portal/end_portal_replaces_interior_blocks.json @@ -0,0 +1,96 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_replaces_interior_blocks", + "description": "When the frame ring is completed, a non-air block inside the 3x3 interior is replaced by an end portal.", + "tags": ["portal", "end_portal", "end_portal_frame", "ender_eye"], + "minecraftIds": ["minecraft:end_portal", "minecraft:end_portal_frame", "minecraft:ender_eye", "minecraft:glass"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -2], [4, 3, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": false} }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [3, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [2, 1, 2], "block": {"id": "minecraft:glass" } } + ] + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -2], [4, 0, -1] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 1, -1.5], "rot": [0, 22] }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air"} } + ] + }, + {"at": 3, "do": "interact", "item": "minecraft:ender_eye"}, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:end_portal"} }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:end_portal"} }, + { "pos": [1, 1, 3], "is": {"id": "minecraft:end_portal"} }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:end_portal"} }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:end_portal"} }, + { "pos": [2, 1, 3], "is": {"id": "minecraft:end_portal"} }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:end_portal"} }, + { "pos": [3, 1, 2], "is": {"id": "minecraft:end_portal"} }, + { "pos": [3, 1, 3], "is": {"id": "minecraft:end_portal"} } + ] + } + ] +} + diff --git a/tests/portal/end_portal/end_portal_stays_in_midair.json b/tests/portal/end_portal/end_portal_stays_in_midair.json new file mode 100644 index 0000000..41c5900 --- /dev/null +++ b/tests/portal/end_portal/end_portal_stays_in_midair.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_stays_in_midair", + "description": "An end portal block placed in mid-air with no support stays an end portal and is not removed by block updates.", + "tags": ["portal", "end_portal"], + "minecraftIds": ["minecraft:end_portal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 2, 2] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:end_portal"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:end_portal"} } + ] + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:end_portal"} }, + { "pos": [1, 0, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 2, 1], "is": {"id": "minecraft:air" } } + ] + } + ] +} + diff --git a/tests/portal/end_portal/end_portal_survives_explosion.json b/tests/portal/end_portal/end_portal_survives_explosion.json new file mode 100644 index 0000000..aac309d --- /dev/null +++ b/tests/portal/end_portal/end_portal_survives_explosion.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_survives_explosion", + "description": "A TNT explosion next to an end portal destroys nearby glass but the end portal survives.", + "tags": ["portal", "end_portal", "explosion"], + "minecraftIds": ["minecraft:end_portal", "minecraft:tnt", "minecraft:obsidian", "minecraft:glass"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 2, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 1, 2], "block": {"id": "minecraft:end_portal"} }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:glass" } } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [2, 1, 2], "is": {"id": "minecraft:end_portal"} }, + { "pos": [0, 1, 2], "is": {"id": "minecraft:glass" } } + ] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [1.5, 1, 2.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [2, 1, 2], "is": {"id": "minecraft:end_portal"} }, + { "pos": [0, 1, 2], "is": {"id": "minecraft:air" } } + ] + } + ] +} + diff --git a/tests/portal/end_portal/ender_eye_on_filled_frame_does_nothing.json b/tests/portal/end_portal/ender_eye_on_filled_frame_does_nothing.json new file mode 100644 index 0000000..0dc9175 --- /dev/null +++ b/tests/portal/end_portal/ender_eye_on_filled_frame_does_nothing.json @@ -0,0 +1,103 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ender_eye_on_filled_frame_does_nothing", + "description": "Using an eye of ender on a frame that already has an eye does nothing: no portal forms and the eye is not consumed.", + "tags": ["portal", "end_portal", "end_portal_frame", "ender_eye"], + "minecraftIds": ["minecraft:end_portal", "minecraft:end_portal_frame", "minecraft:ender_eye"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -2], [4, 3, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [0, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [2, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [3, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 1], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 2], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 3], "block": {"id": "minecraft:obsidian" } }, + { "pos": [4, 0, 4], "block": {"id": "minecraft:obsidian" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [3, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [4, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} } + ] + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -2], [4, 0, -1] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 1, -1.5], "rot": [0, 22] }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air"} } + ] + }, + {"at": 3, "do": "interact", "item": "minecraft:ender_eye"}, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} } + ] + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:ender_eye", "count": 1} } + ] + } + ] +} + From e04bc2577c999d0c0754262d6cc60e6428ba844b Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Fri, 30 Oct 2026 05:27:20 +0100 Subject: [PATCH 49/85] Add Flint tests for end_portal_frame (1 blocks) --- .../end_portal_frame_comparator_output.json | 84 ++++++++++++ .../end_portal_frame_explosion_resistant.json | 51 +++++++ .../end_portal_frame_eye_already_filled.json | 41 ++++++ .../end/end_portal_frame_eye_insertion.json | 41 ++++++ ...d_portal_frame_eye_insertion_creative.json | 41 ++++++ .../end_portal_frame_piston_immovable.json | 47 +++++++ .../end_portal_frame_placement_facing.json | 47 +++++++ ...al_frame_ring_activates_from_any_side.json | 127 ++++++++++++++++++ ...nd_portal_frame_ring_activates_portal.json | 81 +++++++++++ ...rtal_frame_ring_missing_eye_no_portal.json | 76 +++++++++++ ...d_portal_frame_ring_replaces_interior.json | 85 ++++++++++++ ...tal_frame_ring_wrong_facing_no_portal.json | 76 +++++++++++ 12 files changed, 797 insertions(+) create mode 100644 tests/portal/end/end_portal_frame_comparator_output.json create mode 100644 tests/portal/end/end_portal_frame_explosion_resistant.json create mode 100644 tests/portal/end/end_portal_frame_eye_already_filled.json create mode 100644 tests/portal/end/end_portal_frame_eye_insertion.json create mode 100644 tests/portal/end/end_portal_frame_eye_insertion_creative.json create mode 100644 tests/portal/end/end_portal_frame_piston_immovable.json create mode 100644 tests/portal/end/end_portal_frame_placement_facing.json create mode 100644 tests/portal/end/end_portal_frame_ring_activates_from_any_side.json create mode 100644 tests/portal/end/end_portal_frame_ring_activates_portal.json create mode 100644 tests/portal/end/end_portal_frame_ring_missing_eye_no_portal.json create mode 100644 tests/portal/end/end_portal_frame_ring_replaces_interior.json create mode 100644 tests/portal/end/end_portal_frame_ring_wrong_facing_no_portal.json diff --git a/tests/portal/end/end_portal_frame_comparator_output.json b/tests/portal/end/end_portal_frame_comparator_output.json new file mode 100644 index 0000000..f434312 --- /dev/null +++ b/tests/portal/end/end_portal_frame_comparator_output.json @@ -0,0 +1,84 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_frame_comparator_output", + "description": "A comparator reads 0 from an empty end portal frame and 15 from one with an eye; inserting an eye updates the comparator (updateNeighbourForOutputSignal) from 0 to 15.", + "tags": ["portal", "end_portal_frame", "ender_eye", "comparator", "redstone", "player"], + "minecraftIds": [ + "minecraft:end_portal_frame", "minecraft:ender_eye" , "minecraft:comparator" , + "minecraft:redstone_wire" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 1, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [2, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [1, 1, 0], + "block": {"id": "minecraft:comparator", "facing": "west", "mode": "compare", "powered": false} + }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:redstone_wire"} }, + { + "pos": [1, 1, 2], + "block": {"id": "minecraft:comparator", "facing": "west", "mode": "compare", "powered": false} + }, + { "pos": [2, 1, 2], "block": {"id": "minecraft:redstone_wire"} } + ] + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": false} }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:comparator" , "powered": false } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:redstone_wire", "power": 0} }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:comparator" , "powered": true } }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:redstone_wire", "power": 15} } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "slot": "hotbar1", "is": {"id": "minecraft:ender_eye", "count": 1} } + ] + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:comparator" , "powered": true } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:redstone_wire", "power": 15} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/portal/end/end_portal_frame_explosion_resistant.json b/tests/portal/end/end_portal_frame_explosion_resistant.json new file mode 100644 index 0000000..5217703 --- /dev/null +++ b/tests/portal/end/end_portal_frame_explosion_resistant.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_frame_explosion_resistant", + "description": "End portal frames (blast resistance 3600000) survive a TNT explosion right next to them with their facing and eye state unchanged, while glass next to the TNT is destroyed.", + "tags": ["portal", "end_portal_frame", "explosion", "tnt"], + "minecraftIds": ["minecraft:end_portal_frame", "minecraft:tnt", "minecraft:glass", "minecraft:obsidian"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 2, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 2] ], + "with": {"id": "minecraft:obsidian"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east", "eye": false} }, + { "pos": [3, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west", "eye": true } }, + { "pos": [2, 1, 2], "block": {"id": "minecraft:glass" } } + ] + }, + { + "at": 1, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [2.5, 1, 1.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:end_portal_frame", "facing": "east", "eye": false} }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:end_portal_frame", "facing": "west", "eye": true } }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [2, 0, 1], "is": {"id": "minecraft:obsidian" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/portal/end/end_portal_frame_eye_already_filled.json b/tests/portal/end/end_portal_frame_eye_already_filled.json new file mode 100644 index 0000000..f3c2f22 --- /dev/null +++ b/tests/portal/end/end_portal_frame_eye_already_filled.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_frame_eye_already_filled", + "description": "Using an ender eye on a frame that already has an eye passes: the state is unchanged and the survival player keeps both eyes.", + "tags": ["portal", "end_portal_frame", "ender_eye", "block-state", "player"], + "minecraftIds": ["minecraft:end_portal_frame", "minecraft:ender_eye"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "west", "eye": true} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "west", "eye": true} }, + { "slot": "hotbar1", "is": {"id": "minecraft:ender_eye", "count": 2} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/portal/end/end_portal_frame_eye_insertion.json b/tests/portal/end/end_portal_frame_eye_insertion.json new file mode 100644 index 0000000..ff4d8e7 --- /dev/null +++ b/tests/portal/end/end_portal_frame_eye_insertion.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_frame_eye_insertion", + "description": "Using an ender eye on an empty end portal frame (EnderEyeItem.useOn) sets eye=true, keeps facing, and consumes one eye from a survival stack of 2.", + "tags": ["portal", "end_portal_frame", "ender_eye", "block-state", "player"], + "minecraftIds": ["minecraft:end_portal_frame", "minecraft:ender_eye"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "west", "eye": false} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "west", "eye": true} }, + { "slot": "hotbar1", "is": {"id": "minecraft:ender_eye", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/portal/end/end_portal_frame_eye_insertion_creative.json b/tests/portal/end/end_portal_frame_eye_insertion_creative.json new file mode 100644 index 0000000..2cc5643 --- /dev/null +++ b/tests/portal/end/end_portal_frame_eye_insertion_creative.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_frame_eye_insertion_creative", + "description": "A creative player inserting an ender eye sets eye=true but keeps the eye (creative use does not shrink the stack).", + "tags": ["portal", "end_portal_frame", "ender_eye", "block-state", "player"], + "minecraftIds": ["minecraft:end_portal_frame", "minecraft:ender_eye"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "west", "eye": false} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "west", "eye": true} }, + { "slot": "hotbar1", "is": {"id": "minecraft:ender_eye", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/portal/end/end_portal_frame_piston_immovable.json b/tests/portal/end/end_portal_frame_piston_immovable.json new file mode 100644 index 0000000..5d72ff9 --- /dev/null +++ b/tests/portal/end/end_portal_frame_piston_immovable.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_frame_piston_immovable", + "description": "An end portal frame (destroy speed -1) cannot be pushed: a powered piston facing it does not extend and the frame keeps its position and state, while a control piston powered by the same redstone block pushes stone.", + "tags": ["portal", "end_portal_frame", "piston", "redstone"], + "minecraftIds": ["minecraft:end_portal_frame", "minecraft:piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 1, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [2, 0, 2] ], + "with": {"id": "minecraft:obsidian"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston", "facing": "east", "extended": false} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:piston", "facing": "east", "extended": false} }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": false} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [0, 1, 2], "is": {"id": "minecraft:piston", "facing": "east", "extended": true} }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:piston_head", "facing": "east"} }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:stone"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/portal/end/end_portal_frame_placement_facing.json b/tests/portal/end/end_portal_frame_placement_facing.json new file mode 100644 index 0000000..b866199 --- /dev/null +++ b/tests/portal/end/end_portal_frame_placement_facing.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_frame_placement_facing", + "description": "A survival player placing an end portal frame gets eye=false and facing opposite to the player's horizontal direction (yaw 0 = south -> north, yaw 90 = west -> east); the item is consumed.", + "tags": ["portal", "end_portal_frame", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:end_portal_frame"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, 0], [1, 1, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-1, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 1, 0, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:end_portal_frame"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [-1, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": false} }, + {"slot": "hotbar1", "is": "empty"} + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [1.5, 3, 0.5], "rot": [90, 90] }, + {"at": 2, "do": "interact", "item": "minecraft:end_portal_frame"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "east", "eye": false} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/portal/end/end_portal_frame_ring_activates_from_any_side.json b/tests/portal/end/end_portal_frame_ring_activates_from_any_side.json new file mode 100644 index 0000000..48274f7 --- /dev/null +++ b/tests/portal/end/end_portal_frame_ring_activates_from_any_side.json @@ -0,0 +1,127 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_frame_ring_activates_from_any_side", + "description": "The portal forms whichever ring side receives the last eye (east side, south side), and the four corner positions may hold any block (stone, obsidian or air).", + "tags": ["portal", "end_portal_frame", "end_portal", "ender_eye", "player"], + "minecraftIds": [ + "minecraft:end_portal_frame", "minecraft:ender_eye" , "minecraft:end_portal" , + "minecraft:stone" , "minecraft:obsidian" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [10, 1, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [10, 0, 4] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [ 1, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [ 0, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [ 4, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [ 2, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [ 2, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [ 0, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [ 4, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": false} }, + { "pos": [ 3, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [ 3, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [ 0, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [ 4, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 4, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [ 4, 1, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [ 7, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [ 7, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [ 6, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [10, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [ 8, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [ 8, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": false} }, + { "pos": [ 6, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [10, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [ 9, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [ 9, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [ 6, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [10, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [ 6, 1, 0], "block": {"id": "minecraft:obsidian" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [4.5, 4, 2.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [8.5, 4, 4.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [ 1, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [ 1, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [ 0, 1, 1], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [ 4, 1, 1], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} }, + { "pos": [ 2, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [ 2, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [ 0, 1, 2], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [ 4, 1, 2], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} }, + { "pos": [ 3, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [ 3, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [ 0, 1, 3], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [ 4, 1, 3], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} }, + { "pos": [ 7, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [ 7, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [ 6, 1, 1], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [10, 1, 1], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} }, + { "pos": [ 8, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [ 8, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [ 6, 1, 2], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [10, 1, 2], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} }, + { "pos": [ 9, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [ 9, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [ 6, 1, 3], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [10, 1, 3], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} }, + { "pos": [ 1, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 1, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 1, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 2, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 2, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 2, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 3, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 3, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 3, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 7, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 7, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 7, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 8, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 8, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 8, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 9, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 9, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 9, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [ 4, 1, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, 4], "is": {"id": "minecraft:stone" } }, + { "pos": [ 4, 1, 4], "is": {"id": "minecraft:stone" } }, + { "pos": [ 6, 1, 0], "is": {"id": "minecraft:obsidian" } }, + { "pos": [10, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [ 6, 1, 4], "is": {"id": "minecraft:air" } }, + { "pos": [10, 1, 4], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/portal/end/end_portal_frame_ring_activates_portal.json b/tests/portal/end/end_portal_frame_ring_activates_portal.json new file mode 100644 index 0000000..930ed7d --- /dev/null +++ b/tests/portal/end/end_portal_frame_ring_activates_portal.json @@ -0,0 +1,81 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_frame_ring_activates_portal", + "description": "Inserting the 12th eye into a 5x5 ring of inward-facing end portal frames fills the 3x3 interior with end_portal at frame height; frames keep their state and the survival player's eye is consumed.", + "tags": ["portal", "end_portal_frame", "end_portal", "ender_eye", "player"], + "minecraftIds": ["minecraft:end_portal_frame", "minecraft:ender_eye", "minecraft:end_portal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 4] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": false} }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [3, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [1, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:end_portal_frame", "facing": "east", "eye": true} } , + { "pos": [4, 1, 1], "is": {"id": "minecraft:end_portal_frame", "facing": "west", "eye": true} } , + { "pos": [2, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [2, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [0, 1, 2], "is": {"id": "minecraft:end_portal_frame", "facing": "east", "eye": true} } , + { "pos": [4, 1, 2], "is": {"id": "minecraft:end_portal_frame", "facing": "west", "eye": true} } , + { "pos": [3, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [3, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [0, 1, 3], "is": {"id": "minecraft:end_portal_frame", "facing": "east", "eye": true} } , + { "pos": [4, 1, 3], "is": {"id": "minecraft:end_portal_frame", "facing": "west", "eye": true} } , + { "pos": [1, 1, 1], "is": {"id": "minecraft:end_portal"} } , + { "pos": [1, 1, 2], "is": {"id": "minecraft:end_portal"} } , + { "pos": [1, 1, 3], "is": {"id": "minecraft:end_portal"} } , + { "pos": [2, 1, 1], "is": {"id": "minecraft:end_portal"} } , + { "pos": [2, 1, 2], "is": {"id": "minecraft:end_portal"} } , + { "pos": [2, 1, 3], "is": {"id": "minecraft:end_portal"} } , + { "pos": [3, 1, 1], "is": {"id": "minecraft:end_portal"} } , + { "pos": [3, 1, 2], "is": {"id": "minecraft:end_portal"} } , + { "pos": [3, 1, 3], "is": {"id": "minecraft:end_portal"} } , + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} } , + { "pos": [4, 1, 0], "is": {"id": "minecraft:air"} } , + { "pos": [0, 1, 4], "is": {"id": "minecraft:air"} } , + { "pos": [4, 1, 4], "is": {"id": "minecraft:air"} } , + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/portal/end/end_portal_frame_ring_missing_eye_no_portal.json b/tests/portal/end/end_portal_frame_ring_missing_eye_no_portal.json new file mode 100644 index 0000000..50ce811 --- /dev/null +++ b/tests/portal/end/end_portal_frame_ring_missing_eye_no_portal.json @@ -0,0 +1,76 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_frame_ring_missing_eye_no_portal", + "description": "With one of the 12 frames still empty, inserting an eye into another frame does not create an end portal; the interior stays air.", + "tags": ["portal", "end_portal_frame", "end_portal", "ender_eye", "player"], + "minecraftIds": ["minecraft:end_portal_frame", "minecraft:ender_eye", "minecraft:end_portal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 4] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": false} }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [3, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": false} }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [1, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 1], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [2, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 2], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 2], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [3, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": false} }, + { "pos": [0, 1, 3], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 3], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 3], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/portal/end/end_portal_frame_ring_replaces_interior.json b/tests/portal/end/end_portal_frame_ring_replaces_interior.json new file mode 100644 index 0000000..fef4dcc --- /dev/null +++ b/tests/portal/end/end_portal_frame_ring_replaces_interior.json @@ -0,0 +1,85 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_frame_ring_replaces_interior", + "description": "Solid blocks inside a completed frame ring are destroyed and replaced by end_portal when the last eye is inserted.", + "tags": ["portal", "end_portal_frame", "end_portal", "ender_eye", "player"], + "minecraftIds": ["minecraft:end_portal_frame", "minecraft:ender_eye", "minecraft:end_portal", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 4] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": false} }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [3, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [1, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 1, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 1, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 1, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 1, 3], "block": {"id": "minecraft:stone" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [1, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [4, 1, 1], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [2, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [0, 1, 2], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [4, 1, 2], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [3, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [0, 1, 3], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [4, 1, 3], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [1, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [3, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [3, 1, 3], "is": {"id": "minecraft:end_portal" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/portal/end/end_portal_frame_ring_wrong_facing_no_portal.json b/tests/portal/end/end_portal_frame_ring_wrong_facing_no_portal.json new file mode 100644 index 0000000..34462ba --- /dev/null +++ b/tests/portal/end/end_portal_frame_ring_wrong_facing_no_portal.json @@ -0,0 +1,76 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "end_portal_frame_ring_wrong_facing_no_portal", + "description": "If one frame of the ring faces outward instead of toward the centre, inserting the 12th eye fills that frame but no end_portal forms.", + "tags": ["portal", "end_portal_frame", "end_portal", "ender_eye", "player"], + "minecraftIds": ["minecraft:end_portal_frame", "minecraft:ender_eye", "minecraft:end_portal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 4] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": false} }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true } }, + { "pos": [3, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true } }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true } }, + { "pos": [4, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [1, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [4, 1, 1], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [2, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [0, 1, 2], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [4, 1, 2], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": true} }, + { "pos": [3, 1, 4], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": true} }, + { "pos": [0, 1, 3], "is": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": true} }, + { "pos": [4, 1, 3], "is": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": true} }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 3], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + From 9beec1976fbe5cb66b41f32441e5c8739b5ad4ae Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sat, 31 Oct 2026 05:05:21 +0100 Subject: [PATCH 50/85] Add Flint tests for end_rod (1 blocks) --- .../end_rod_base_click_not_reversed.json | 56 +++++++++++++++ .../end_rod_explosion_drops_itself.json | 59 ++++++++++++++++ .../end_rods/end_rod_pushed_by_piston.json | 60 ++++++++++++++++ .../end_rod_side_click_not_reversed.json | 66 +++++++++++++++++ .../end_rod_washed_away_by_water.json | 70 +++++++++++++++++++ 5 files changed, 311 insertions(+) create mode 100644 tests/decoration/end_rods/end_rod_base_click_not_reversed.json create mode 100644 tests/decoration/end_rods/end_rod_explosion_drops_itself.json create mode 100644 tests/decoration/end_rods/end_rod_pushed_by_piston.json create mode 100644 tests/decoration/end_rods/end_rod_side_click_not_reversed.json create mode 100644 tests/decoration/end_rods/end_rod_washed_away_by_water.json diff --git a/tests/decoration/end_rods/end_rod_base_click_not_reversed.json b/tests/decoration/end_rods/end_rod_base_click_not_reversed.json new file mode 100644 index 0000000..12c35de --- /dev/null +++ b/tests/decoration/end_rods/end_rod_base_click_not_reversed.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "end_rod_base_click_not_reversed", + "description": "Clicking the base end of an end rod (the face opposite its facing) places a new rod facing the clicked face, so the two rods point away from each other.", + "tags": ["decoration", "end-rod", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:end_rod"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 2, 1] ] + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:end_rod", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:end_rod", "facing": "up" } }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:end_rod", "facing": "down"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, -2, 0.5], "rot": [0, -90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 4, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:end_rod", "facing": "down"} }, + { "pos": [4, 2, 0], "is": {"id": "minecraft:end_rod", "facing": "up"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:end_rod", "facing": "up"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:end_rod", "facing": "down"} }, + { "is": {"id": "minecraft:air", "count": 0} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/end_rods/end_rod_explosion_drops_itself.json b/tests/decoration/end_rods/end_rod_explosion_drops_itself.json new file mode 100644 index 0000000..44df096 --- /dev/null +++ b/tests/decoration/end_rods/end_rod_explosion_drops_itself.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "end_rod_explosion_drops_itself", + "description": "An exploding TNT next to an end rod destroys it and the loot table drops exactly one end rod item.", + "tags": ["decoration", "end-rod", "explosion", "drops", "loot-table"], + "minecraftIds": ["minecraft:end_rod", "minecraft:tnt", "minecraft:obsidian", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -2], [4, 3, 2] ] + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -2], [4, 0, 2] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:end_rod", "facing": "up"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:end_rod", "facing": "up"} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { + "at": 1, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [2.5, 1, 0.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "count": 1, "Item.id": "minecraft:end_rod", "Item.count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/end_rods/end_rod_pushed_by_piston.json b/tests/decoration/end_rods/end_rod_pushed_by_piston.json new file mode 100644 index 0000000..6b032bf --- /dev/null +++ b/tests/decoration/end_rods/end_rod_pushed_by_piston.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "end_rod_pushed_by_piston", + "description": "A piston pushes an end rod one block forward (normal push reaction) and the rod keeps its facing, whether it lies across or along the push axis.", + "tags": ["decoration", "end-rod", "piston", "push-reaction"], + "minecraftIds": ["minecraft:end_rod", "minecraft:piston", "minecraft:redstone_block", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 2, 2] ] + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston" , "facing": "east" , "extended": false} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_rod", "facing": "north" } }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:piston" , "facing": "east" , "extended": false} }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:end_rod", "facing": "east" } } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:end_rod", "facing": "north"} }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:end_rod", "facing": "east" } } + ] + }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { "at": 2, "do": "place", "pos": [0, 2, 2], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": true} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east"} } , + { "pos": [2, 1, 0], "is": {"id": "minecraft:end_rod", "facing": "north"} } , + { "pos": [1, 1, 2], "is": {"id": "minecraft:piston_head", "facing": "east"} } , + { "pos": [2, 1, 2], "is": {"id": "minecraft:end_rod", "facing": "east"} } , + {"is": "minecraft:item", "exists": false} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/end_rods/end_rod_side_click_not_reversed.json b/tests/decoration/end_rods/end_rod_side_click_not_reversed.json new file mode 100644 index 0000000..dbbf3a2 --- /dev/null +++ b/tests/decoration/end_rods/end_rod_side_click_not_reversed.json @@ -0,0 +1,66 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "end_rod_side_click_not_reversed", + "description": "Clicking a face of an end rod perpendicular to its axis places a new rod facing the clicked face; the reversal only applies when the existing rod faces the clicked face.", + "tags": ["decoration", "end-rod", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:end_rod"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 2, 9] ] + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:end_rod", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:end_rod", "facing": "up" } }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:end_rod", "facing": "up" } }, + { "pos": [0, 1, 8], "block": {"id": "minecraft:end_rod", "facing": "east" } }, + { "pos": [8, 1, 8], "block": {"id": "minecraft:end_rod", "facing": "north"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, -3.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [11.5, 0, 0.5], "rot": [90, 0] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 8.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [8.5, -2, 8.5], "rot": [0, -90] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, -1], "is": {"id": "minecraft:end_rod", "facing": "north"} }, + { "pos": [9, 1, 0] , "is": {"id": "minecraft:end_rod", "facing": "east"} }, + { "pos": [0, 2, 8] , "is": {"id": "minecraft:end_rod", "facing": "up"} }, + { "pos": [8, 0, 8] , "is": {"id": "minecraft:end_rod", "facing": "down"} }, + { "pos": [0, 1, 0] , "is": {"id": "minecraft:end_rod", "facing": "up"} }, + { "pos": [8, 1, 0] , "is": {"id": "minecraft:end_rod", "facing": "up"} }, + { "pos": [0, 1, 8] , "is": {"id": "minecraft:end_rod", "facing": "east"} }, + { "pos": [8, 1, 8] , "is": {"id": "minecraft:end_rod", "facing": "north"} }, + { "is": {"id": "minecraft:air", "count": 0} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/end_rods/end_rod_washed_away_by_water.json b/tests/decoration/end_rods/end_rod_washed_away_by_water.json new file mode 100644 index 0000000..6d79877 --- /dev/null +++ b/tests/decoration/end_rods/end_rod_washed_away_by_water.json @@ -0,0 +1,70 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "end_rod_washed_away_by_water", + "description": "Flowing water replaces an end rod because the rod is registered non-solid (forceSolidOff), dropping it as one end rod item.", + "tags": ["decoration", "end-rod", "fluid", "water", "drops"], + "minecraftIds": ["minecraft:end_rod", "minecraft:water", "minecraft:stone", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-1, 1, -1], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 1, -1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 2, 1, -1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 2, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 3, 1, -1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 3, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 3, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:end_rod", "facing": "up"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:end_rod", "facing": "up"} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { + "at": 15, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:water", "level": 1} } , + {"is": "minecraft:item", "count": 1, "Item.id": "minecraft:end_rod", "Item.count": 1} + ] + } + ], + "breakpoints": [] +} + From 86501d403c674c49b776f2ced521781f1ee15814 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sat, 31 Oct 2026 05:10:52 +0100 Subject: [PATCH 51/85] Add Flint tests for ender_chest (1 blocks) --- .../ender_chest_comparator_signal_zero.json | 61 ++++++++++++++ .../ender_chest_hopper_does_not_insert.json | 79 ++++++++++++++++++ .../ender_chest_not_pushed_by_piston.json | 42 ++++++++++ ...r_chest_placement_facing_looking_east.json | 31 +++++++ ..._chest_placement_facing_looking_north.json | 31 +++++++ ..._chest_placement_facing_looking_south.json | 31 +++++++ ...r_chest_placement_facing_looking_west.json | 31 +++++++ ...nder_chest_placement_in_flowing_water.json | 64 +++++++++++++++ ...ender_chest_placement_in_water_source.json | 32 ++++++++ .../ender_chest_survives_tnt_explosion.json | 52 ++++++++++++ ...ender_chest_waterlogged_spreads_water.json | 80 +++++++++++++++++++ 11 files changed, 534 insertions(+) create mode 100644 tests/container/ender_chests/ender_chest_comparator_signal_zero.json create mode 100644 tests/container/ender_chests/ender_chest_hopper_does_not_insert.json create mode 100644 tests/container/ender_chests/ender_chest_not_pushed_by_piston.json create mode 100644 tests/container/ender_chests/ender_chest_placement_facing_looking_east.json create mode 100644 tests/container/ender_chests/ender_chest_placement_facing_looking_north.json create mode 100644 tests/container/ender_chests/ender_chest_placement_facing_looking_south.json create mode 100644 tests/container/ender_chests/ender_chest_placement_facing_looking_west.json create mode 100644 tests/container/ender_chests/ender_chest_placement_in_flowing_water.json create mode 100644 tests/container/ender_chests/ender_chest_placement_in_water_source.json create mode 100644 tests/container/ender_chests/ender_chest_survives_tnt_explosion.json create mode 100644 tests/container/ender_chests/ender_chest_waterlogged_spreads_water.json diff --git a/tests/container/ender_chests/ender_chest_comparator_signal_zero.json b/tests/container/ender_chests/ender_chest_comparator_signal_zero.json new file mode 100644 index 0000000..c580f29 --- /dev/null +++ b/tests/container/ender_chests/ender_chest_comparator_signal_zero.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ender_chest_comparator_signal_zero", + "description": "A comparator reading an ender chest outputs 0 because it has no container to measure, while one reading a chest holding an item outputs 1.", + "tags": ["container", "ender-chest", "comparator", "redstone", "block-entity"], + "minecraftIds": ["minecraft:ender_chest", "minecraft:comparator", "minecraft:chest", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [1, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [1, 1, 0], "block": {"id": "minecraft:comparator", "facing": "west"} }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:comparator", "facing": "west"} } + ] + }, + { + "at": 2, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:ender_chest", "facing": "east", "waterlogged": false} }, + { + "pos": [0, 1, 2], + "block": { + "id": "minecraft:chest", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:stone\"}]"} + } + } + ] + }, + { + "at": 6, + "do": "assert", + "checks": [ + { + "pos": [1, 1, 0], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 0} } + }, + { + "pos": [1, 1, 2], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 1} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/ender_chests/ender_chest_hopper_does_not_insert.json b/tests/container/ender_chests/ender_chest_hopper_does_not_insert.json new file mode 100644 index 0000000..57e489c --- /dev/null +++ b/tests/container/ender_chests/ender_chest_hopper_does_not_insert.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ender_chest_hopper_does_not_insert", + "description": "A hopper pointing into an ender chest keeps all its items because the ender chest is not a container, while an identical hopper feeding a normal chest transfers an item.", + "tags": ["container", "ender-chest", "hopper", "block-entity", "redstone"], + "minecraftIds": ["minecraft:ender_chest", "minecraft:hopper", "minecraft:chest", "minecraft:cobblestone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [1, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [1, 1, 0], "block": {"id": "minecraft:ender_chest", "facing": "west", "waterlogged": false} }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:chest", "facing": "west"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:hopper", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 4, id: \"minecraft:cobblestone\"}]", "TransferCooldown": 0} + } + }, + { + "pos": [0, 1, 2], + "block": { + "id": "minecraft:hopper", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 4, id: \"minecraft:cobblestone\"}]", "TransferCooldown": 0} + } + } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [1, 1, 2], + "is": { + "id": "minecraft:chest", + "nbt": {"Items[0].id": "minecraft:cobblestone", "Items[0].count": 1} + } + }, + { + "pos": [0, 1, 2], + "is": { "id": "minecraft:hopper", "nbt": {"Items[0].count": 3} } + } + ] + }, + { + "at": 30, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:hopper", + "nbt": {"Items[0].id": "minecraft:cobblestone", "Items[0].count": 4} + } + }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:ender_chest"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/ender_chests/ender_chest_not_pushed_by_piston.json b/tests/container/ender_chests/ender_chest_not_pushed_by_piston.json new file mode 100644 index 0000000..3e15550 --- /dev/null +++ b/tests/container/ender_chests/ender_chest_not_pushed_by_piston.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ender_chest_not_pushed_by_piston", + "description": "A powered piston facing an ender chest cannot push it because it has a block entity, so the piston stays retracted and the chest is unchanged.", + "tags": ["container", "ender-chest", "piston", "push-reaction", "redstone"], + "minecraftIds": ["minecraft:ender_chest", "minecraft:piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 1, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston", "facing": "east", "extended": false} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:ender_chest", "facing": "south", "waterlogged": false} } + ] + }, + { "at": 3, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": false} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:ender_chest", "facing": "south", "waterlogged": false} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/ender_chests/ender_chest_placement_facing_looking_east.json b/tests/container/ender_chests/ender_chest_placement_facing_looking_east.json new file mode 100644 index 0000000..9b97754 --- /dev/null +++ b/tests/container/ender_chests/ender_chest_placement_facing_looking_east.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ender_chest_placement_facing_looking_east", + "description": "A survival player looking looking_east (yaw -90) who places an ender chest gets a chest facing west, not waterlogged, and the held chest is consumed.", + "tags": ["container", "ender-chest", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:ender_chest", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:ender_chest"}, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [-90, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:ender_chest", "facing": "west", "waterlogged": false} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/ender_chests/ender_chest_placement_facing_looking_north.json b/tests/container/ender_chests/ender_chest_placement_facing_looking_north.json new file mode 100644 index 0000000..3e3296c --- /dev/null +++ b/tests/container/ender_chests/ender_chest_placement_facing_looking_north.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ender_chest_placement_facing_looking_north", + "description": "A survival player looking looking_north (yaw 180) who places an ender chest gets a chest facing south, not waterlogged, and the held chest is consumed.", + "tags": ["container", "ender-chest", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:ender_chest", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:ender_chest"}, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [180, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:ender_chest", "facing": "south", "waterlogged": false} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/ender_chests/ender_chest_placement_facing_looking_south.json b/tests/container/ender_chests/ender_chest_placement_facing_looking_south.json new file mode 100644 index 0000000..61a413b --- /dev/null +++ b/tests/container/ender_chests/ender_chest_placement_facing_looking_south.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ender_chest_placement_facing_looking_south", + "description": "A survival player looking looking_south (yaw 0) who places an ender chest gets a chest facing north, not waterlogged, and the held chest is consumed.", + "tags": ["container", "ender-chest", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:ender_chest", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:ender_chest"}, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:ender_chest", "facing": "north", "waterlogged": false} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/ender_chests/ender_chest_placement_facing_looking_west.json b/tests/container/ender_chests/ender_chest_placement_facing_looking_west.json new file mode 100644 index 0000000..17c7320 --- /dev/null +++ b/tests/container/ender_chests/ender_chest_placement_facing_looking_west.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ender_chest_placement_facing_looking_west", + "description": "A survival player looking looking_west (yaw 90) who places an ender chest gets a chest facing east, not waterlogged, and the held chest is consumed.", + "tags": ["container", "ender-chest", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:ender_chest", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:ender_chest"}, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [90, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:ender_chest", "facing": "east", "waterlogged": false} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/ender_chests/ender_chest_placement_in_flowing_water.json b/tests/container/ender_chests/ender_chest_placement_in_flowing_water.json new file mode 100644 index 0000000..3af08df --- /dev/null +++ b/tests/container/ender_chests/ender_chest_placement_in_flowing_water.json @@ -0,0 +1,64 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ender_chest_placement_in_flowing_water", + "description": "Placing an ender chest into flowing (non-source) water does not waterlog it, because only water source blocks count.", + "tags": ["container", "ender-chest", "placement", "waterlogged", "player"], + "minecraftIds": ["minecraft:ender_chest", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [2, 1, 1] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [2, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [2, 1, -1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, 1], [2, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 2, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:water"} }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 1} } + ] + }, + {"at": 13, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:ender_chest"}, + { "at": 13, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 14, "do": "interact"}, + { + "at": 16, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:ender_chest", "waterlogged": false} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/ender_chests/ender_chest_placement_in_water_source.json b/tests/container/ender_chests/ender_chest_placement_in_water_source.json new file mode 100644 index 0000000..1e3eb3f --- /dev/null +++ b/tests/container/ender_chests/ender_chest_placement_in_water_source.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ender_chest_placement_in_water_source", + "description": "Placing an ender chest into a water source block gives a waterlogged chest.", + "tags": ["container", "ender-chest", "placement", "waterlogged", "player"], + "minecraftIds": ["minecraft:ender_chest", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:water"} }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:ender_chest"}, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:ender_chest", "facing": "north", "waterlogged": true} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/ender_chests/ender_chest_survives_tnt_explosion.json b/tests/container/ender_chests/ender_chest_survives_tnt_explosion.json new file mode 100644 index 0000000..4c55a20 --- /dev/null +++ b/tests/container/ender_chests/ender_chest_survives_tnt_explosion.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ender_chest_survives_tnt_explosion", + "description": "An ender chest (blast resistance 600) next to a TNT explosion stays in place and drops nothing, while a glass block in the same blast is destroyed.", + "tags": ["container", "ender-chest", "tnt", "explosion", "blast-resistance"], + "minecraftIds": ["minecraft:ender_chest", "minecraft:tnt", "minecraft:obsidian", "minecraft:glass"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [6, 3, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [6, 0, 4] ], + "with": {"id": "minecraft:obsidian"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { + "pos": [2, 1, 2], + "block": {"id": "minecraft:ender_chest", "facing": "north", "waterlogged": false} + }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:glass"} } + ] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [3.5, 1, 2.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [2, 1, 2], "is": {"id": "minecraft:ender_chest", "facing": "north", "waterlogged": false} }, + { "pos": [4, 1, 2], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": false} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/ender_chests/ender_chest_waterlogged_spreads_water.json b/tests/container/ender_chests/ender_chest_waterlogged_spreads_water.json new file mode 100644 index 0000000..25f99f9 --- /dev/null +++ b/tests/container/ender_chests/ender_chest_waterlogged_spreads_water.json @@ -0,0 +1,80 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ender_chest_waterlogged_spreads_water", + "description": "A waterlogged ender chest acts as a water source and floods the air beside it inside a walled corridor, while a dry ender chest does not.", + "tags": ["container", "ender-chest", "waterlogged", "fluid"], + "minecraftIds": ["minecraft:ender_chest", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 1, 6] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [3, 0, 6] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [3, 1, 0] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 1, 2], [3, 1, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 1, 4], [3, 1, 4] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 1, 6], [3, 1, 6] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 5], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 1, 5], "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 1, + "do": "place", + "pos": [1, 1, 1], + "block": {"id": "minecraft:ender_chest", "facing": "north", "waterlogged": true} + }, + { + "at": 1, + "do": "place", + "pos": [1, 1, 5], + "block": {"id": "minecraft:ender_chest", "facing": "north", "waterlogged": false} + }, + { + "at": 15, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:ender_chest", "waterlogged": true } }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:water" , "level": 1} }, + { "pos": [1, 1, 5], "is": {"id": "minecraft:ender_chest", "waterlogged": false } }, + { "pos": [2, 1, 5], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + From 5035f9d0c2917913ad0ab96b7210d73c1962137b Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sat, 31 Oct 2026 05:14:29 +0100 Subject: [PATCH 52/85] Add Flint tests for ender_eye (1 blocks) --- .../ender_eye/ender_eye_completes_portal.json | 82 ++++++++++++++++++ .../ender_eye_creative_not_consumed.json | 38 +++++++++ .../ender_eye_filled_frame_unchanged.json | 38 +++++++++ .../ender_eye_fills_empty_frame.json | 38 +++++++++ .../ender_eye_frame_comparator_output.json | 57 +++++++++++++ .../ender_eye_incomplete_ring_no_portal.json | 82 ++++++++++++++++++ .../ender_eye_portal_replaces_block.json | 83 +++++++++++++++++++ .../ender_eye_wrong_facing_no_portal.json | 82 ++++++++++++++++++ 8 files changed, 500 insertions(+) create mode 100644 tests/items/ender_eye/ender_eye_completes_portal.json create mode 100644 tests/items/ender_eye/ender_eye_creative_not_consumed.json create mode 100644 tests/items/ender_eye/ender_eye_filled_frame_unchanged.json create mode 100644 tests/items/ender_eye/ender_eye_fills_empty_frame.json create mode 100644 tests/items/ender_eye/ender_eye_frame_comparator_output.json create mode 100644 tests/items/ender_eye/ender_eye_incomplete_ring_no_portal.json create mode 100644 tests/items/ender_eye/ender_eye_portal_replaces_block.json create mode 100644 tests/items/ender_eye/ender_eye_wrong_facing_no_portal.json diff --git a/tests/items/ender_eye/ender_eye_completes_portal.json b/tests/items/ender_eye/ender_eye_completes_portal.json new file mode 100644 index 0000000..d7e2b43 --- /dev/null +++ b/tests/items/ender_eye/ender_eye_completes_portal.json @@ -0,0 +1,82 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ender_eye", "minecraft:end_portal_frame", "minecraft:end_portal"], + "name": "ender_eye_completes_portal", + "description": "Placing the last of twelve inward-facing eyes in the end portal frame ring turns the 3x3 middle into end_portal blocks.", + "tags": ["item", "ender_eye", "end_portal_frame", "end_portal", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": "true" } }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "true" } }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": "true" } }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": "true" } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": "true" } }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "false"} }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": "true" } }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": "true" } }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": "true" } }, + { "pos": [3, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "true" } }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": "true" } }, + { "pos": [4, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": "true" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 3, 4.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [1, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [3, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [3, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 4], "is": {"id": "minecraft:end_portal_frame", "eye": "true"} } + ] + } + ] +} + diff --git a/tests/items/ender_eye/ender_eye_creative_not_consumed.json b/tests/items/ender_eye/ender_eye_creative_not_consumed.json new file mode 100644 index 0000000..72c95cd --- /dev/null +++ b/tests/items/ender_eye/ender_eye_creative_not_consumed.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ender_eye", "minecraft:end_portal_frame"], + "name": "ender_eye_creative_not_consumed", + "description": "In creative mode, using an ender eye on an empty end portal frame fills it but the stack is not reduced.", + "tags": ["item", "ender_eye", "end_portal_frame", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "false"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "true"} }, + { "slot": "hotbar1", "is": {"id": "minecraft:ender_eye", "count": 2} } + ] + } + ] +} + diff --git a/tests/items/ender_eye/ender_eye_filled_frame_unchanged.json b/tests/items/ender_eye/ender_eye_filled_frame_unchanged.json new file mode 100644 index 0000000..5ff6189 --- /dev/null +++ b/tests/items/ender_eye/ender_eye_filled_frame_unchanged.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ender_eye", "minecraft:end_portal_frame"], + "name": "ender_eye_filled_frame_unchanged", + "description": "Using an ender eye on a frame that already holds an eye changes nothing and the eye is not consumed.", + "tags": ["item", "ender_eye", "end_portal_frame", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "true"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "true"} }, + { "slot": "hotbar1", "is": {"id": "minecraft:ender_eye", "count": 2} } + ] + } + ] +} + diff --git a/tests/items/ender_eye/ender_eye_fills_empty_frame.json b/tests/items/ender_eye/ender_eye_fills_empty_frame.json new file mode 100644 index 0000000..1b02c31 --- /dev/null +++ b/tests/items/ender_eye/ender_eye_fills_empty_frame.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ender_eye", "minecraft:end_portal_frame"], + "name": "ender_eye_fills_empty_frame", + "description": "Using an ender eye on an empty end portal frame sets has_eye to true, keeps the facing, and consumes one eye from the stack.", + "tags": ["item", "ender_eye", "end_portal_frame", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "false"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "true"} }, + { "slot": "hotbar1", "is": {"id": "minecraft:ender_eye", "count": 1} } + ] + } + ] +} + diff --git a/tests/items/ender_eye/ender_eye_frame_comparator_output.json b/tests/items/ender_eye/ender_eye_frame_comparator_output.json new file mode 100644 index 0000000..76a1f1d --- /dev/null +++ b/tests/items/ender_eye/ender_eye_frame_comparator_output.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": [ + "minecraft:ender_eye" , "minecraft:end_portal_frame", "minecraft:comparator" , + "minecraft:redstone_lamp" + ], + "name": "ender_eye_frame_comparator_output", + "description": "A comparator reading an end portal frame outputs 0 while it is empty and 15 once an ender eye fills it, so the lamp behind the comparator lights up.", + "tags": ["item", "ender_eye", "end_portal_frame", "comparator", "redstone", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 0, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "false"} }, + { + "pos": [0, 1, 1], + "block": {"id": "minecraft:comparator", "facing": "north", "mode": "compare", "powered": "false"} + }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:redstone_lamp", "lit": "false"} } + ] + }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 2], "is": {"id": "minecraft:redstone_lamp", "lit": "false"} } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:end_portal_frame", "eye": "true"} }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:comparator", "powered": "true"} }, + { "pos": [0, 1, 2], "is": {"id": "minecraft:redstone_lamp", "lit": "true"} } + ] + } + ] +} + diff --git a/tests/items/ender_eye/ender_eye_incomplete_ring_no_portal.json b/tests/items/ender_eye/ender_eye_incomplete_ring_no_portal.json new file mode 100644 index 0000000..e9ba08f --- /dev/null +++ b/tests/items/ender_eye/ender_eye_incomplete_ring_no_portal.json @@ -0,0 +1,82 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ender_eye", "minecraft:end_portal_frame", "minecraft:end_portal"], + "name": "ender_eye_incomplete_ring_no_portal", + "description": "With two frames still empty, filling one frame adds the eye but no end portal forms.", + "tags": ["item", "ender_eye", "end_portal_frame", "end_portal", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": "true" } }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "true" } }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": "true" } }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": "true" } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": "true" } }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "false"} }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": "false"} }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": "true" } }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": "true" } }, + { "pos": [3, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "true" } }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": "true" } }, + { "pos": [4, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": "true" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 3, 4.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 4], "is": {"id": "minecraft:end_portal_frame", "eye": "true"} } + ] + } + ] +} + diff --git a/tests/items/ender_eye/ender_eye_portal_replaces_block.json b/tests/items/ender_eye/ender_eye_portal_replaces_block.json new file mode 100644 index 0000000..fb092de --- /dev/null +++ b/tests/items/ender_eye/ender_eye_portal_replaces_block.json @@ -0,0 +1,83 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ender_eye", "minecraft:end_portal_frame", "minecraft:end_portal", "minecraft:stone"], + "name": "ender_eye_portal_replaces_block", + "description": "When the ring is completed, a stone block in the middle area is replaced by an end portal block.", + "tags": ["item", "ender_eye", "end_portal_frame", "end_portal", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": "true" } }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "true" } }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": "true" } }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": "true" } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": "true" } }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "false"} }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": "true" } }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": "true" } }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": "true" } }, + { "pos": [3, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "true" } }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": "true" } }, + { "pos": [4, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": "true" } }, + { "pos": [2, 1, 2], "block": {"id": "minecraft:stone" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 3, 4.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [1, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:end_portal" } }, + { "pos": [3, 1, 2], "is": {"id": "minecraft:end_portal" } }, + { "pos": [3, 1, 3], "is": {"id": "minecraft:end_portal" } }, + { "pos": [2, 1, 4], "is": {"id": "minecraft:end_portal_frame", "eye": "true"} } + ] + } + ] +} + diff --git a/tests/items/ender_eye/ender_eye_wrong_facing_no_portal.json b/tests/items/ender_eye/ender_eye_wrong_facing_no_portal.json new file mode 100644 index 0000000..5425374 --- /dev/null +++ b/tests/items/ender_eye/ender_eye_wrong_facing_no_portal.json @@ -0,0 +1,82 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ender_eye", "minecraft:end_portal_frame", "minecraft:end_portal"], + "name": "ender_eye_wrong_facing_no_portal", + "description": "If one frame in an otherwise complete ring faces the wrong way, filling the last frame adds the eye but no end portal forms.", + "tags": ["item", "ender_eye", "end_portal_frame", "end_portal", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 4] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_eye", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [3, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [4, 0, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": "true" } }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "true" } }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": "true" } }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": "true" } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": "true" } }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "false"} }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "true" } }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": "true" } }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:end_portal_frame", "facing": "south", "eye": "true" } }, + { "pos": [3, 1, 4], "block": {"id": "minecraft:end_portal_frame", "facing": "north", "eye": "true" } }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "east" , "eye": "true" } }, + { "pos": [4, 1, 3], "block": {"id": "minecraft:end_portal_frame", "facing": "west" , "eye": "true" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 3, 4.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 2], "is": {"id": "minecraft:air" } }, + { "pos": [3, 1, 3], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 4], "is": {"id": "minecraft:end_portal_frame", "eye": "true"} } + ] + } + ] +} + From 76e9ba527772d4acac09a69505cce42be394795d Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sat, 31 Oct 2026 05:20:04 +0100 Subject: [PATCH 53/85] Add Flint tests for ender_pearl (1 blocks) --- ...earl_second_throw_blocked_by_cooldown.json | 47 +++++++++++++++++++ ...nder_pearl_throw_again_after_cooldown.json | 37 +++++++++++++++ ...nder_pearl_throw_creative_keeps_stack.json | 38 +++++++++++++++ .../ender_pearl_throw_from_partial_stack.json | 31 ++++++++++++ 4 files changed, 153 insertions(+) create mode 100644 tests/items/ender_pearl/ender_pearl_second_throw_blocked_by_cooldown.json create mode 100644 tests/items/ender_pearl/ender_pearl_throw_again_after_cooldown.json create mode 100644 tests/items/ender_pearl/ender_pearl_throw_creative_keeps_stack.json create mode 100644 tests/items/ender_pearl/ender_pearl_throw_from_partial_stack.json diff --git a/tests/items/ender_pearl/ender_pearl_second_throw_blocked_by_cooldown.json b/tests/items/ender_pearl/ender_pearl_second_throw_blocked_by_cooldown.json new file mode 100644 index 0000000..7ecf758 --- /dev/null +++ b/tests/items/ender_pearl/ender_pearl_second_throw_blocked_by_cooldown.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ender_pearl"], + "name": "ender_pearl_second_throw_blocked_by_cooldown", + "description": "After throwing one ender pearl the item is on a 20 tick cooldown (1.0 s use cooldown), so a second throw 5 ticks later is ignored; the stack stays at 2 until the cooldown has expired and the next throw takes it to 1.", + "tags": ["item", "ender-pearl", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 3, 5] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_pearl", "count": 3} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:ender_pearl", "count": 2} } + ] + }, + {"at": 6, "do": "interact"}, + { + "at": 8, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:ender_pearl", "count": 2} } + ] + }, + {"at": 30, "do": "interact"}, + { + "at": 32, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:ender_pearl", "count": 1} } + ] + } + ] +} + diff --git a/tests/items/ender_pearl/ender_pearl_throw_again_after_cooldown.json b/tests/items/ender_pearl/ender_pearl_throw_again_after_cooldown.json new file mode 100644 index 0000000..9029540 --- /dev/null +++ b/tests/items/ender_pearl/ender_pearl_throw_again_after_cooldown.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ender_pearl"], + "name": "ender_pearl_throw_again_after_cooldown", + "description": "Once the 20 tick cooldown has expired a second ender pearl can be thrown, so both pearls of a stack of two are consumed.", + "tags": ["item", "ender-pearl", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 3, 5] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_pearl", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:ender_pearl", "count": 1} } + ] + }, + {"at": 30, "do": "interact"}, + { + "at": 32, + "do": "assert", + "checks": [ {"slot": "hotbar1", "is": "empty"} ] + } + ] +} + diff --git a/tests/items/ender_pearl/ender_pearl_throw_creative_keeps_stack.json b/tests/items/ender_pearl/ender_pearl_throw_creative_keeps_stack.json new file mode 100644 index 0000000..2b6491e --- /dev/null +++ b/tests/items/ender_pearl/ender_pearl_throw_creative_keeps_stack.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ender_pearl"], + "name": "ender_pearl_throw_creative_keeps_stack", + "description": "A creative player throwing an ender pearl keeps the item (ItemStack.consume does nothing with infinite materials), while the pearl is still thrown: a pearl entity appears ahead of the player.", + "tags": ["item", "ender-pearl", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 3, 5] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_pearl", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:ender_pearl", "count": 1} }, + { + "is": "minecraft:ender_pearl", + "exists": true, + "count": 1, + "pos": [0.5, 1.5, 3.5], + "position_tolerance": 1 + } + ] + } + ] +} + diff --git a/tests/items/ender_pearl/ender_pearl_throw_from_partial_stack.json b/tests/items/ender_pearl/ender_pearl_throw_from_partial_stack.json new file mode 100644 index 0000000..fb678c5 --- /dev/null +++ b/tests/items/ender_pearl/ender_pearl_throw_from_partial_stack.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ender_pearl"], + "name": "ender_pearl_throw_from_partial_stack", + "description": "A survival player throwing from a stack of 16 ender pearls consumes exactly one, leaving 15 in the same slot.", + "tags": ["item", "ender-pearl", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 3, 5] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ender_pearl", "count": 16} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:ender_pearl", "count": 15} } + ] + } + ] +} + From c231f4850403ec5ebf095e6e8aca0ffcdf0d5976 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sat, 31 Oct 2026 05:29:52 +0100 Subject: [PATCH 54/85] Add Flint tests for lightning_rods (8 blocks) --- .../exposed_lightning_rod_axe_scrapes.json | 76 ++++++++++++ ...exposed_lightning_rod_honeycomb_waxes.json | 90 +++++++++++++++ ...sed_lightning_rod_struck_by_lightning.json | 82 +++++++++++++ .../waxed_lightning_rod_axe_removes_wax.json | 68 +++++++++++ ...ed_lightning_rod_explosion_drops_self.json | 59 ++++++++++ ..._lightning_rod_honeycomb_does_nothing.json | 57 +++++++++ .../waxed_lightning_rod_place_in_water.json | 60 ++++++++++ .../waxed_lightning_rod_power_output.json | 72 ++++++++++++ ...d_lightning_rod_powered_pulse_expires.json | 59 ++++++++++ ...ghtning_rod_removal_updates_neighbors.json | 51 +++++++++ ...axed_lightning_rod_six_face_placement.json | 108 ++++++++++++++++++ ...xed_lightning_rod_struck_by_lightning.json | 76 ++++++++++++ .../waxed_lightning_rod_waterlogged_flow.json | 63 ++++++++++ .../exposed_lightning_rod_weathering.json | 91 +++++++++++++++ .../waxed_lightning_rod_no_weathering.json | 52 +++++++++ 15 files changed, 1064 insertions(+) create mode 100644 tests/redstone/lightning_rods/exposed_lightning_rod_axe_scrapes.json create mode 100644 tests/redstone/lightning_rods/exposed_lightning_rod_honeycomb_waxes.json create mode 100644 tests/redstone/lightning_rods/exposed_lightning_rod_struck_by_lightning.json create mode 100644 tests/redstone/lightning_rods/waxed_lightning_rod_axe_removes_wax.json create mode 100644 tests/redstone/lightning_rods/waxed_lightning_rod_explosion_drops_self.json create mode 100644 tests/redstone/lightning_rods/waxed_lightning_rod_honeycomb_does_nothing.json create mode 100644 tests/redstone/lightning_rods/waxed_lightning_rod_place_in_water.json create mode 100644 tests/redstone/lightning_rods/waxed_lightning_rod_power_output.json create mode 100644 tests/redstone/lightning_rods/waxed_lightning_rod_powered_pulse_expires.json create mode 100644 tests/redstone/lightning_rods/waxed_lightning_rod_removal_updates_neighbors.json create mode 100644 tests/redstone/lightning_rods/waxed_lightning_rod_six_face_placement.json create mode 100644 tests/redstone/lightning_rods/waxed_lightning_rod_struck_by_lightning.json create mode 100644 tests/redstone/lightning_rods/waxed_lightning_rod_waterlogged_flow.json create mode 100644 tests/redstone/lightning_rods_gamerule/exposed_lightning_rod_weathering.json create mode 100644 tests/redstone/lightning_rods_gamerule/waxed_lightning_rod_no_weathering.json diff --git a/tests/redstone/lightning_rods/exposed_lightning_rod_axe_scrapes.json b/tests/redstone/lightning_rods/exposed_lightning_rod_axe_scrapes.json new file mode 100644 index 0000000..c2dca60 --- /dev/null +++ b/tests/redstone/lightning_rods/exposed_lightning_rod_axe_scrapes.json @@ -0,0 +1,76 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "exposed_lightning_rod_axe_scrapes", + "description": "Using an axe on an exposed lightning rod scrapes it back one stage to lightning_rod, keeping facing, powered and waterlogged state.", + "tags": ["redstone", "lightning-rod", "exposed", "axe", "scrape", "player"], + "minecraftIds": ["minecraft:exposed_lightning_rod", "minecraft:lightning_rod", "minecraft:stone_axe"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id" : "minecraft:exposed_lightning_rod", + "facing" : "up" , + "powered" : "false" , + "waterlogged": "false" + } + }, + { + "pos": [4, 1, 0], + "block": { + "id" : "minecraft:exposed_lightning_rod", + "facing" : "east" , + "powered" : "false" , + "waterlogged": "true" + } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:lightning_rod", "facing": "up", "powered": "false", "waterlogged": "false"} + }, + { + "pos": [4, 1, 0], + "is": {"id": "minecraft:lightning_rod", "facing": "east", "powered": "false", "waterlogged": "true"} + }, + { "slot": "hotbar1", "is": {"id": "minecraft:stone_axe", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/lightning_rods/exposed_lightning_rod_honeycomb_waxes.json b/tests/redstone/lightning_rods/exposed_lightning_rod_honeycomb_waxes.json new file mode 100644 index 0000000..0c9dd38 --- /dev/null +++ b/tests/redstone/lightning_rods/exposed_lightning_rod_honeycomb_waxes.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "exposed_lightning_rod_honeycomb_waxes", + "description": "Using honeycomb on an exposed lightning rod waxes it to waxed_exposed_lightning_rod, keeping facing, powered and waterlogged state, and consumes one honeycomb.", + "tags": ["redstone", "lightning-rod", "exposed", "honeycomb", "waxing", "player"], + "minecraftIds": [ + "minecraft:exposed_lightning_rod" , + "minecraft:waxed_exposed_lightning_rod", + "minecraft:honeycomb" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id" : "minecraft:exposed_lightning_rod", + "facing" : "up" , + "powered" : "false" , + "waterlogged": "false" + } + }, + { + "pos": [4, 1, 0], + "block": { + "id" : "minecraft:exposed_lightning_rod", + "facing" : "east" , + "powered" : "false" , + "waterlogged": "true" + } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id" : "minecraft:waxed_exposed_lightning_rod", + "facing" : "up" , + "powered" : "false" , + "waterlogged": "false" + } + }, + { + "pos": [4, 1, 0], + "is": { + "id" : "minecraft:waxed_exposed_lightning_rod", + "facing" : "east" , + "powered" : "false" , + "waterlogged": "true" + } + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/lightning_rods/exposed_lightning_rod_struck_by_lightning.json b/tests/redstone/lightning_rods/exposed_lightning_rod_struck_by_lightning.json new file mode 100644 index 0000000..70ae73f --- /dev/null +++ b/tests/redstone/lightning_rods/exposed_lightning_rod_struck_by_lightning.json @@ -0,0 +1,82 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "exposed_lightning_rod_struck_by_lightning", + "description": "A lightning bolt striking an exposed lightning rod resets it to plain lightning_rod (keeping facing), powers it and a lamp beside it, and the replacement rod still turns unpowered after about 8 ticks because placing it schedules a new reset tick.", + "tags": ["redstone", "lightning-rod", "exposed", "lightning", "weathering-reset", "powered", "scheduled-tick"], + "minecraftIds": [ + "minecraft:exposed_lightning_rod", "minecraft:lightning_rod" , "minecraft:lightning_bolt" , + "minecraft:redstone_lamp" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 0, 0], "block": {"id": "minecraft:redstone_lamp"} }, + { + "pos": [0, 0, 0], + "block": { + "id": "minecraft:exposed_lightning_rod", + "facing": "up", + "powered": false, + "waterlogged": false + } + } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:exposed_lightning_rod", "powered": false } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": false} } + ] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "bolt", + "entity_type": "minecraft:lightning_bolt", + "pos": [0.5, 1, 0.5] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": {"id": "minecraft:lightning_rod", "facing": "up", "powered": true, "waterlogged": false} + }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp", "lit": true} } + ] + }, + { + "at": 25, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": {"id": "minecraft:lightning_rod", "facing": "up", "powered": false, "waterlogged": false} + }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/lightning_rods/waxed_lightning_rod_axe_removes_wax.json b/tests/redstone/lightning_rods/waxed_lightning_rod_axe_removes_wax.json new file mode 100644 index 0000000..2800434 --- /dev/null +++ b/tests/redstone/lightning_rods/waxed_lightning_rod_axe_removes_wax.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_lightning_rod_axe_removes_wax", + "description": "Using an axe on a waxed lightning rod removes the wax: the rod becomes the unwaxed lightning_rod and keeps its facing and waterlogged state.", + "tags": ["redstone", "lightning-rod", "waxed", "axe", "wax-off", "player"], + "minecraftIds": ["minecraft:waxed_lightning_rod", "minecraft:lightning_rod", "minecraft:stone_axe"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone_axe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:waxed_lightning_rod", + "facing": "up", + "powered": false, + "waterlogged": false + } + }, + { + "pos": [4, 1, 0], + "block": { + "id": "minecraft:waxed_lightning_rod", + "facing": "east", + "powered": false, + "waterlogged": true + } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:lightning_rod", "facing": "up", "powered": false, "waterlogged": false} + }, + { + "pos": [4, 1, 0], + "is": {"id": "minecraft:lightning_rod", "facing": "east", "powered": false, "waterlogged": true} + }, + { "slot": "hotbar1", "is": {"id": "minecraft:stone_axe", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/lightning_rods/waxed_lightning_rod_explosion_drops_self.json b/tests/redstone/lightning_rods/waxed_lightning_rod_explosion_drops_self.json new file mode 100644 index 0000000..d8a2afa --- /dev/null +++ b/tests/redstone/lightning_rods/waxed_lightning_rod_explosion_drops_self.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_lightning_rod_explosion_drops_self", + "description": "A lightning rod destroyed by an explosion (no tool involved) drops exactly one waxed_lightning_rod item, because its loot table drops itself unconditionally.", + "tags": ["redstone", "lightning-rod", "waxed", "drops", "explosion", "loot-table"], + "minecraftIds": ["minecraft:waxed_lightning_rod", "minecraft:tnt", "minecraft:obsidian"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [12, 3, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [8, 0, 0], [12, 0, 2] ], + "with": {"id": "minecraft:obsidian"} + }, + { + "at": 0, + "do": "place", + "pos": [10, 1, 1], + "block": {"id": "minecraft:waxed_lightning_rod", "facing": "up", "powered": false, "waterlogged": false} + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [10, 1, 1], "is": {"id": "minecraft:waxed_lightning_rod"} } + ] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [10.5, 1, 0.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [10, 1, 1], "is": {"id": "minecraft:air"} }, + { + "is": "minecraft:item", + "exists": true, + "count": 1, + "Item.id": "minecraft:waxed_lightning_rod", + "Item.count": 1 + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/lightning_rods/waxed_lightning_rod_honeycomb_does_nothing.json b/tests/redstone/lightning_rods/waxed_lightning_rod_honeycomb_does_nothing.json new file mode 100644 index 0000000..9e4d845 --- /dev/null +++ b/tests/redstone/lightning_rods/waxed_lightning_rod_honeycomb_does_nothing.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_lightning_rod_honeycomb_does_nothing", + "description": "Using honeycomb on an already waxed lightning rod does nothing: the rod is unchanged and the honeycomb is not consumed.", + "tags": ["redstone", "lightning-rod", "waxed", "honeycomb", "player"], + "minecraftIds": ["minecraft:waxed_lightning_rod", "minecraft:honeycomb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:waxed_lightning_rod", + "facing": "up", + "powered": false, + "waterlogged": false + } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:waxed_lightning_rod", + "facing": "up", + "powered": false, + "waterlogged": false + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/lightning_rods/waxed_lightning_rod_place_in_water.json b/tests/redstone/lightning_rods/waxed_lightning_rod_place_in_water.json new file mode 100644 index 0000000..a667f3e --- /dev/null +++ b/tests/redstone/lightning_rods/waxed_lightning_rod_place_in_water.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_lightning_rod_place_in_water", + "description": "Placing a lightning rod into a water source block gives a waterlogged rod, while placing it into air gives a dry one. Both rods face the clicked face.", + "tags": ["redstone", "lightning-rod", "waxed", "waterlogged", "placement", "player"], + "minecraftIds": ["minecraft:waxed_lightning_rod", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 2, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:waxed_lightning_rod", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 4, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:water", "level": 0} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:waxed_lightning_rod", "facing": "up", "powered": false, "waterlogged": true} + }, + { + "pos": [4, 1, 0], + "is": { + "id": "minecraft:waxed_lightning_rod", + "facing": "up", + "powered": false, + "waterlogged": false + } + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/lightning_rods/waxed_lightning_rod_power_output.json b/tests/redstone/lightning_rods/waxed_lightning_rod_power_output.json new file mode 100644 index 0000000..9f61768 --- /dev/null +++ b/tests/redstone/lightning_rods/waxed_lightning_rod_power_output.json @@ -0,0 +1,72 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_lightning_rod_power_output", + "description": "A powered upward lightning rod weakly powers a lamp beside it and above it, and strongly powers the block it stands on, which lights lamps below and beside that block (the stone is placed after the rod, because a rod placed powered does not update the block behind it). An unpowered rod powers nothing. After the pulse expires all lamps go out.", + "tags": ["redstone", "lightning-rod", "waxed", "signal", "strong-power"], + "minecraftIds": ["minecraft:waxed_lightning_rod", "minecraft:redstone_lamp", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [6, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 1, 0], "block": {"id": "minecraft:redstone_lamp"} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_lamp"} }, + { "pos": [0, -1, 0], "block": {"id": "minecraft:redstone_lamp"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:redstone_lamp"} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [5, 1, 0], "block": {"id": "minecraft:redstone_lamp"} }, + { "pos": [4, 2, 0], "block": {"id": "minecraft:redstone_lamp"} }, + { "pos": [4, -1, 0], "block": {"id": "minecraft:redstone_lamp"} }, + { + "pos": [4, 1, 0], + "block": { + "id": "minecraft:waxed_lightning_rod", + "facing": "up", + "powered": false, + "waterlogged": false + } + } + ] + }, + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:waxed_lightning_rod", "facing": "up", "powered": true, "waterlogged": false} + }, + { "at": 1, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": true } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:redstone_lamp", "lit": true } }, + { "pos": [0, -1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": true } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp", "lit": true } }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} }, + { "pos": [4, 2, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} }, + { "pos": [4, -1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} } + ] + }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_lightning_rod", "powered": false } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": false} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": false} }, + { "pos": [0, -1, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": false} }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/lightning_rods/waxed_lightning_rod_powered_pulse_expires.json b/tests/redstone/lightning_rods/waxed_lightning_rod_powered_pulse_expires.json new file mode 100644 index 0000000..12cbe3c --- /dev/null +++ b/tests/redstone/lightning_rods/waxed_lightning_rod_powered_pulse_expires.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_lightning_rod_powered_pulse_expires", + "description": "A lightning rod placed already powered schedules its own reset: it stays powered for the 8 tick activation delay, then turns unpowered and keeps its facing and waxed variant.", + "tags": ["redstone", "lightning-rod", "waxed", "powered", "scheduled-tick"], + "minecraftIds": ["minecraft:waxed_lightning_rod"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:waxed_lightning_rod", + "facing": "up", + "powered": true, + "waterlogged": false + } + } + ] + }, + { + "at": [1, 4, 7], + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:waxed_lightning_rod", "facing": "up", "powered": true, "waterlogged": false} + } + ] + }, + { + "at": [10, 14], + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:waxed_lightning_rod", + "facing": "up", + "powered": false, + "waterlogged": false + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/lightning_rods/waxed_lightning_rod_removal_updates_neighbors.json b/tests/redstone/lightning_rods/waxed_lightning_rod_removal_updates_neighbors.json new file mode 100644 index 0000000..233663a --- /dev/null +++ b/tests/redstone/lightning_rods/waxed_lightning_rod_removal_updates_neighbors.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_lightning_rod_removal_updates_neighbors", + "description": "Removing a powered lightning rod updates the block it stood on: a lamp that only touches that block, and was lit through the rod's strong power, goes out after the lamp's 4 tick delay. Nothing else would update the lamp, because the cancelled reset tick never runs.", + "tags": ["redstone", "lightning-rod", "waxed", "signal", "strong-power", "removal"], + "minecraftIds": ["minecraft:waxed_lightning_rod", "minecraft:redstone_lamp", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [0, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, -1, 0], "block": {"id": "minecraft:redstone_lamp"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:waxed_lightning_rod", + "facing": "up", + "powered": true, + "waterlogged": false + } + } + ] + }, + { "at": 1, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, -1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": true} } + ] + }, + { "at": 3, "do": "remove", "pos": [0, 1, 0] }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [0, -1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/lightning_rods/waxed_lightning_rod_six_face_placement.json b/tests/redstone/lightning_rods/waxed_lightning_rod_six_face_placement.json new file mode 100644 index 0000000..8ca8caa --- /dev/null +++ b/tests/redstone/lightning_rods/waxed_lightning_rod_six_face_placement.json @@ -0,0 +1,108 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_lightning_rod_six_face_placement", + "description": "Survival placement against each clicked face gives a waxed lightning rod that face's direction, unpowered and dry, and consumes all six items.", + "tags": ["redstone", "lightning-rod", "waxed", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:waxed_lightning_rod"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 2, 9] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:waxed_lightning_rod", "count": 6} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 8], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 4], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, -2, 0.5], "rot": [0, -90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [8.5, 0, -3.5], "rot": [0, 0] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 11.5], "rot": [180, 0] }, + {"at": 4, "do": "interact"}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [3.5, 0, 4.5], "rot": [90, 0] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [4.5, 0, 4.5], "rot": [-90, 0] }, + {"at": 6, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:waxed_lightning_rod", + "facing": "up", + "powered": false, + "waterlogged": false + } + }, + { + "pos": [4, 0, 0], + "is": { + "id": "minecraft:waxed_lightning_rod", + "facing": "down", + "powered": false, + "waterlogged": false + } + }, + { + "pos": [8, 1, -1], + "is": { + "id": "minecraft:waxed_lightning_rod", + "facing": "north", + "powered": false, + "waterlogged": false + } + }, + { + "pos": [0, 1, 9], + "is": { + "id": "minecraft:waxed_lightning_rod", + "facing": "south", + "powered": false, + "waterlogged": false + } + }, + { + "pos": [1, 1, 4], + "is": { + "id": "minecraft:waxed_lightning_rod", + "facing": "east", + "powered": false, + "waterlogged": false + } + }, + { + "pos": [7, 1, 4], + "is": { + "id": "minecraft:waxed_lightning_rod", + "facing": "west", + "powered": false, + "waterlogged": false + } + }, + { "is": {"id": "minecraft:air", "count": 0}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/lightning_rods/waxed_lightning_rod_struck_by_lightning.json b/tests/redstone/lightning_rods/waxed_lightning_rod_struck_by_lightning.json new file mode 100644 index 0000000..9094407 --- /dev/null +++ b/tests/redstone/lightning_rods/waxed_lightning_rod_struck_by_lightning.json @@ -0,0 +1,76 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_lightning_rod_struck_by_lightning", + "description": "A lightning bolt striking a waxed lightning rod powers it and powers a lamp beside it, the rod stays waxed (waxed copper is not reset by lightning), and the rod turns unpowered again after the 8 tick pulse.", + "tags": ["redstone", "lightning-rod", "waxed", "lightning", "powered", "scheduled-tick"], + "minecraftIds": ["minecraft:waxed_lightning_rod", "minecraft:lightning_bolt", "minecraft:redstone_lamp"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 0, 0], "block": {"id": "minecraft:redstone_lamp"} }, + { + "pos": [0, 0, 0], + "block": { + "id": "minecraft:waxed_lightning_rod", + "facing": "up", + "powered": false, + "waterlogged": false + } + } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:waxed_lightning_rod", "powered": false } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": false} } + ] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "bolt", + "entity_type": "minecraft:lightning_bolt", + "pos": [0.5, 1, 0.5] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": {"id": "minecraft:waxed_lightning_rod", "facing": "up", "powered": true, "waterlogged": false} + }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp", "lit": true} } + ] + }, + { + "at": 25, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:waxed_lightning_rod", + "facing": "up", + "powered": false, + "waterlogged": false + } + }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/lightning_rods/waxed_lightning_rod_waterlogged_flow.json b/tests/redstone/lightning_rods/waxed_lightning_rod_waterlogged_flow.json new file mode 100644 index 0000000..a73ea6c --- /dev/null +++ b/tests/redstone/lightning_rods/waxed_lightning_rod_waterlogged_flow.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_lightning_rod_waterlogged_flow", + "description": "A waterlogged lightning rod acts as a water source: in a walled corridor it spreads flowing water to the open blocks beside it with decreasing level, and the rod itself stays waterlogged.", + "tags": ["redstone", "lightning-rod", "waxed", "waterlogged", "fluid"], + "minecraftIds": ["minecraft:waxed_lightning_rod", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 1, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [3, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:waxed_lightning_rod", "facing": "up", "powered": false, "waterlogged": true} + }, + { + "at": 1, + "do": "fill", + "region": [ [0, 1, -1], [3, 1, -1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [0, 1, 1], [3, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 4, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:waxed_lightning_rod", "facing": "up", "waterlogged": true} + }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water", "level": 1} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:water", "level": 2} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:water", "level": 3} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/lightning_rods_gamerule/exposed_lightning_rod_weathering.json b/tests/redstone/lightning_rods_gamerule/exposed_lightning_rod_weathering.json new file mode 100644 index 0000000..928091c --- /dev/null +++ b/tests/redstone/lightning_rods_gamerule/exposed_lightning_rod_weathering.json @@ -0,0 +1,91 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "exposed_lightning_rod_weathering", + "description": "With a high random tick speed an unwaxed exposed lightning rod weathers only forward along its chain (exposed, weathered, oxidized) and keeps its facing, powered and waterlogged state. Representative of lightning_rod, exposed, weathered and oxidized rods (WeatheringLightningRodBlock). Weathering is random: failing to move at least one stage in 300 ticks has a probability of roughly 2e-6.", + "tags": ["redstone", "lightning-rod", "weathering", "random-tick", "modifies-gamerule"], + "minecraftIds": [ + "minecraft:exposed_lightning_rod" , "minecraft:weathered_lightning_rod", "minecraft:oxidized_lightning_rod" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id" : "minecraft:exposed_lightning_rod", + "facing" : "east" , + "powered" : "false" , + "waterlogged": "false" + } + }, + { + "at": [1, 50, 100, 150, 200, 250], + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": [ + { + "id" : "minecraft:exposed_lightning_rod", + "facing" : "east" , + "powered" : "false" , + "waterlogged": "false" + }, + { + "id" : "minecraft:weathered_lightning_rod", + "facing" : "east" , + "powered" : "false" , + "waterlogged": "false" + }, + { + "id" : "minecraft:oxidized_lightning_rod", + "facing" : "east" , + "powered" : "false" , + "waterlogged": "false" + } + ] + } + ] + }, + { + "at": 300, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": [ + { + "id" : "minecraft:weathered_lightning_rod", + "facing" : "east" , + "powered" : "false" , + "waterlogged": "false" + }, + { + "id" : "minecraft:oxidized_lightning_rod", + "facing" : "east" , + "powered" : "false" , + "waterlogged": "false" + } + ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/lightning_rods_gamerule/waxed_lightning_rod_no_weathering.json b/tests/redstone/lightning_rods_gamerule/waxed_lightning_rod_no_weathering.json new file mode 100644 index 0000000..9eaa6bd --- /dev/null +++ b/tests/redstone/lightning_rods_gamerule/waxed_lightning_rod_no_weathering.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "waxed_lightning_rod_no_weathering", + "description": "A waxed lightning rod never weathers: with a very high random tick speed it stays waxed_lightning_rod with its state unchanged. Note: flintcli does not reset random_tick_speed after the test.", + "tags": ["redstone", "lightning-rod", "waxed", "weathering", "random-tick", "modifies-gamerule"], + "minecraftIds": ["minecraft:waxed_lightning_rod"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id" : "minecraft:waxed_lightning_rod", + "facing" : "east" , + "powered" : "false" , + "waterlogged": "false" + } + }, + { + "at": [1, 100, 200, 300], + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:waxed_lightning_rod", + "facing" : "east" , + "powered" : "false" , + "waterlogged": "false" + } + } + ] + } + ], + "breakpoints": [] +} + From 126e59298eb32bef2d745ed1595690d600fbf89b Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sat, 31 Oct 2026 05:41:12 +0100 Subject: [PATCH 55/85] Add Flint tests for farmland (1 blocks) --- ...ries_without_water_but_not_with_water.json | 55 ++++++++++++++ .../farmland_drops_dirt_when_destroyed.json | 64 ++++++++++++++++ .../farmland/farmland_hoe_tilling.json | 73 +++++++++++++++++++ .../farmland_ignores_water_out_of_range.json | 56 ++++++++++++++ .../farmland/farmland_item_placement.json | 64 ++++++++++++++++ .../farmland_stays_dry_under_fence_gate.json | 56 ++++++++++++++ ...rmland_survives_under_non_solid_block.json | 58 +++++++++++++++ ...mland_turns_to_dirt_under_solid_block.json | 69 ++++++++++++++++++ ...dirt_when_piston_pushes_block_onto_it.json | 72 ++++++++++++++++++ .../farmland_wets_from_nearby_water.json | 56 ++++++++++++++ ...armland_wets_in_rain_when_open_to_sky.json | 56 ++++++++++++++ 11 files changed, 679 insertions(+) create mode 100644 tests/vegetation/farmland/farmland_dries_without_water_but_not_with_water.json create mode 100644 tests/vegetation/farmland/farmland_drops_dirt_when_destroyed.json create mode 100644 tests/vegetation/farmland/farmland_hoe_tilling.json create mode 100644 tests/vegetation/farmland/farmland_ignores_water_out_of_range.json create mode 100644 tests/vegetation/farmland/farmland_item_placement.json create mode 100644 tests/vegetation/farmland/farmland_stays_dry_under_fence_gate.json create mode 100644 tests/vegetation/farmland/farmland_survives_under_non_solid_block.json create mode 100644 tests/vegetation/farmland/farmland_turns_to_dirt_under_solid_block.json create mode 100644 tests/vegetation/farmland/farmland_turns_to_dirt_when_piston_pushes_block_onto_it.json create mode 100644 tests/vegetation/farmland/farmland_wets_from_nearby_water.json create mode 100644 tests/vegetation/farmland/farmland_wets_in_rain_when_open_to_sky.json diff --git a/tests/vegetation/farmland/farmland_dries_without_water_but_not_with_water.json b/tests/vegetation/farmland/farmland_dries_without_water_but_not_with_water.json new file mode 100644 index 0000000..0fca402 --- /dev/null +++ b/tests/vegetation/farmland/farmland_dries_without_water_but_not_with_water.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "farmland_dries_without_water_but_not_with_water", + "description": "Fully moist farmland with no water nearby loses moisture on random ticks until it turns to dirt, while farmland next to a water source keeps moisture 7.", + "tags": ["vegetation", "farmland", "moisture", "drying", "random-tick"], + "minecraftIds": ["minecraft:farmland", "minecraft:dirt", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 3, 9] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 9] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [3, 3, 9] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 7} }, + { "pos": [0, 0, 8], "block": {"id": "minecraft:farmland", "moisture": 7} }, + { "pos": [1, 0, 8], "block": {"id": "minecraft:water" } } + ] + }, + { + "at": 150, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [0, 0, 8], "is": {"id": "minecraft:farmland", "moisture": 7} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/farmland/farmland_drops_dirt_when_destroyed.json b/tests/vegetation/farmland/farmland_drops_dirt_when_destroyed.json new file mode 100644 index 0000000..c71b2d7 --- /dev/null +++ b/tests/vegetation/farmland/farmland_drops_dirt_when_destroyed.json @@ -0,0 +1,64 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "farmland_drops_dirt_when_destroyed", + "description": "Farmland destroyed by a TNT explosion drops exactly one dirt item and no farmland item, because its loot table drops dirt instead of itself.", + "tags": ["vegetation", "farmland", "drops", "explosion", "loot"], + "minecraftIds": ["minecraft:farmland", "minecraft:dirt", "minecraft:obsidian", "minecraft:tnt", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 3, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:obsidian"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [3, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 7} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { + "at": 5, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [1.5, 1, 0.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1} , + {"is": "minecraft:item", "exists": true, "Item.id": "minecraft:dirt", "Item.count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/farmland/farmland_hoe_tilling.json b/tests/vegetation/farmland/farmland_hoe_tilling.json new file mode 100644 index 0000000..b23609a --- /dev/null +++ b/tests/vegetation/farmland/farmland_hoe_tilling.json @@ -0,0 +1,73 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "farmland_hoe_tilling", + "description": "A hoe turns dirt, grass blocks and dirt paths with air above into farmland at moisture 0, but does nothing to dirt that has a solid block directly above it.", + "tags": ["vegetation", "farmland", "hoe", "tilling", "player"], + "minecraftIds": [ + "minecraft:farmland" , "minecraft:dirt" , "minecraft:grass_block", "minecraft:dirt_path" , + "minecraft:stone" , "minecraft:iron_hoe" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [10, 4, 1] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [10, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [-1, 1, -1], [10, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:dirt_path" } }, + { "pos": [7, 1, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [7, 2, 0], "block": {"id": "minecraft:stone" } } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact", "item": "minecraft:iron_hoe"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact", "item": "minecraft:iron_hoe"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 0.5], "rot": [0, 90] }, + {"at": 7, "do": "interact", "item": "minecraft:iron_hoe"}, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [9.5, 1, 0.5], "rot": [90, 37] }, + {"at": 8, "do": "interact", "item": "minecraft:iron_hoe"}, + { "at": 9, "do": "tp", "entity_alias": "player", "pos": [9.5, 5, 0.5] }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [4, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [7, 1, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [7, 2, 0], "is": {"id": "minecraft:stone" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/farmland/farmland_ignores_water_out_of_range.json b/tests/vegetation/farmland/farmland_ignores_water_out_of_range.json new file mode 100644 index 0000000..bcb66d3 --- /dev/null +++ b/tests/vegetation/farmland/farmland_ignores_water_out_of_range.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "farmland_ignores_water_out_of_range", + "description": "Farmland dries out and turns to dirt when its only water is five blocks away sideways or directly below it, because only water within four blocks sideways and one block up counts.", + "tags": ["vegetation", "farmland", "moisture", "water", "random-tick"], + "minecraftIds": ["minecraft:farmland", "minecraft:dirt", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [6, 4, 9] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [6, 1, 9] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 2, -1], [6, 4, 9] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:water" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:farmland", "moisture": 7} }, + { "pos": [5, 1, 8], "block": {"id": "minecraft:water" } }, + { "pos": [0, 1, 8], "block": {"id": "minecraft:farmland", "moisture": 7} } + ] + }, + { + "at": 150, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt"} }, + { "pos": [0, 1, 8], "is": {"id": "minecraft:dirt"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/farmland/farmland_item_placement.json b/tests/vegetation/farmland/farmland_item_placement.json new file mode 100644 index 0000000..075775b --- /dev/null +++ b/tests/vegetation/farmland/farmland_item_placement.json @@ -0,0 +1,64 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "farmland_item_placement", + "description": "The farmland item places farmland at moisture 0 when the space above is free, but places plain dirt instead when a solid block sits directly above the target position.", + "tags": ["vegetation", "farmland", "placement", "player"], + "minecraftIds": ["minecraft:farmland", "minecraft:dirt", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [7, 4, 1] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [7, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [-1, 1, -1], [7, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [3, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 4, "do": "place", "pos": [4, 2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact", "item": "minecraft:farmland"}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 5, 0.5] }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:air" } } + ] + }, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [6.5, 1, 0.5], "rot": [90, 24] }, + {"at": 6, "do": "interact", "item": "minecraft:farmland"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [6.5, 5, 0.5] }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [4, 2, 0], "is": {"id": "minecraft:stone" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/farmland/farmland_stays_dry_under_fence_gate.json b/tests/vegetation/farmland/farmland_stays_dry_under_fence_gate.json new file mode 100644 index 0000000..5cf9c14 --- /dev/null +++ b/tests/vegetation/farmland/farmland_stays_dry_under_fence_gate.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "farmland_stays_dry_under_fence_gate", + "description": "Dry farmland under a closed fence gate, which is solid but in the maintains-farmland tag, stays farmland through random ticks and survives the placement, while bare dry farmland beside it turns to dirt.", + "tags": ["vegetation", "farmland", "fence-gate", "support", "random-tick"], + "minecraftIds": ["minecraft:farmland", "minecraft:dirt", "minecraft:oak_fence_gate", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 3, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [3, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:oak_fence_gate", "open": false, "facing": "north"} }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 0} } + ] + }, + { + "at": 150, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_fence_gate", "open": false, "facing": "north"} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:dirt"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/farmland/farmland_survives_under_non_solid_block.json b/tests/vegetation/farmland/farmland_survives_under_non_solid_block.json new file mode 100644 index 0000000..93f91d0 --- /dev/null +++ b/tests/vegetation/farmland/farmland_survives_under_non_solid_block.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "farmland_survives_under_non_solid_block", + "description": "Placing a block that does not count as solid, such as short grass or a carpet, on top of farmland leaves the farmland unchanged.", + "tags": ["vegetation", "farmland", "support", "neighbor-update", "scheduled-tick"], + "minecraftIds": ["minecraft:farmland", "minecraft:short_grass", "minecraft:white_carpet", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 3, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [3, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 5} }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 5} } + ] + }, + { "at": 6, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:short_grass"} }, + { "at": 6, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:white_carpet"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland" , "moisture": 5} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:short_grass" } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:farmland" , "moisture": 5} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:white_carpet" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/farmland/farmland_turns_to_dirt_under_solid_block.json b/tests/vegetation/farmland/farmland_turns_to_dirt_under_solid_block.json new file mode 100644 index 0000000..738c856 --- /dev/null +++ b/tests/vegetation/farmland/farmland_turns_to_dirt_under_solid_block.json @@ -0,0 +1,69 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "farmland_turns_to_dirt_under_solid_block", + "description": "Placing a solid block, including a bottom slab whose collision box still counts as solid, on top of farmland turns the farmland to dirt after the scheduled tick, while farmland with nothing above stays.", + "tags": ["vegetation", "farmland", "support", "neighbor-update", "scheduled-tick"], + "minecraftIds": ["minecraft:farmland", "minecraft:dirt", "minecraft:stone", "minecraft:oak_slab"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 3, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [5, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 7} }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 7} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 7} } + ] + }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} }, + { "pos": [4, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} } + ] + }, + { "at": 6, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 6, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:oak_slab", "type": "bottom"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:oak_slab", "type": "bottom" } }, + { "pos": [4, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/farmland/farmland_turns_to_dirt_when_piston_pushes_block_onto_it.json b/tests/vegetation/farmland/farmland_turns_to_dirt_when_piston_pushes_block_onto_it.json new file mode 100644 index 0000000..b6f8260 --- /dev/null +++ b/tests/vegetation/farmland/farmland_turns_to_dirt_when_piston_pushes_block_onto_it.json @@ -0,0 +1,72 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "farmland_turns_to_dirt_when_piston_pushes_block_onto_it", + "description": "A piston pushing a stone block down onto farmland turns the farmland to dirt once the push finishes, while farmland nearby with nothing pushed onto it is unchanged.", + "tags": ["vegetation", "farmland", "piston", "support", "neighbor-update"], + "minecraftIds": [ + "minecraft:farmland" , "minecraft:dirt" , "minecraft:stone" , "minecraft:piston" , + "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [4, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [4, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 7} }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 7} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 3, 0], "block": {"id": "minecraft:piston", "facing": "down", "extended": "false"} } + ] + }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone" } } + ] + }, + { "at": 6, "do": "place", "pos": [1, 3, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 16, + "do": "assert", + "checks": [ + { "pos": [0, 3, 0], "is": {"id": "minecraft:piston", "extended": "true"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:piston_head", "facing": "down"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone"} }, + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt"} }, + { "pos": [3, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/farmland/farmland_wets_from_nearby_water.json b/tests/vegetation/farmland/farmland_wets_from_nearby_water.json new file mode 100644 index 0000000..0beb316 --- /dev/null +++ b/tests/vegetation/farmland/farmland_wets_from_nearby_water.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "farmland_wets_from_nearby_water", + "description": "A random tick sets dry farmland straight to moisture 7 when water is exactly four blocks away sideways, both in a straight line and diagonally.", + "tags": ["vegetation", "farmland", "moisture", "water", "random-tick"], + "minecraftIds": ["minecraft:farmland", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 3, 11] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 0, 11] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [5, 3, 11] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:water" } }, + { "pos": [0, 0, 6], "block": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [4, 0, 10], "block": {"id": "minecraft:water" } } + ] + }, + { + "at": 60, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} }, + { "pos": [0, 0, 6], "is": {"id": "minecraft:farmland", "moisture": 7} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/farmland/farmland_wets_in_rain_when_open_to_sky.json b/tests/vegetation/farmland/farmland_wets_in_rain_when_open_to_sky.json new file mode 100644 index 0000000..3033934 --- /dev/null +++ b/tests/vegetation/farmland/farmland_wets_in_rain_when_open_to_sky.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "farmland_wets_in_rain_when_open_to_sky", + "description": "During rain, dry farmland open to the sky is soaked to moisture 7 without any water nearby, while farmland covered by a roof gets no rain and dries out to dirt.", + "tags": ["vegetation", "farmland", "moisture", "rain", "weather", "random-tick"], + "minecraftIds": ["minecraft:farmland", "minecraft:dirt", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 4, 1] ] + }, + "world": { + "weather": "rain", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [5, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 80, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 0} }, + { "pos": [4, 3, 0], "block": {"id": "minecraft:stone" } } + ] + }, + { + "at": 130, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} }, + { "pos": [4, 0, 0], "is": {"id": "minecraft:dirt" } } + ] + } + ], + "breakpoints": [] +} + From da2ef61c4fa9077bdb79050435a7b40627d4f71f Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sat, 31 Oct 2026 05:45:43 +0100 Subject: [PATCH 56/85] Add Flint tests for fern (1 blocks) --- .../fern/fern_bonemeal_blocked_above.json | 49 ++++++++++++ .../fern/fern_bonemeal_grows_large_fern.json | 50 ++++++++++++ .../fern/fern_destroyed_by_piston.json | 53 +++++++++++++ .../fern/fern_explosion_drops_no_fern.json | 49 ++++++++++++ tests/vegetation/fern/fern_flower_pot.json | 44 +++++++++++ .../fern/fern_placement_on_supports.json | 76 +++++++++++++++++++ ...placement_rejected_on_invalid_support.json | 52 +++++++++++++ .../fern_replaced_by_block_placement.json | 50 ++++++++++++ tests/vegetation/fern/fern_support_loss.json | 47 ++++++++++++ .../fern/fern_washed_away_by_water.json | 56 ++++++++++++++ 10 files changed, 526 insertions(+) create mode 100644 tests/vegetation/fern/fern_bonemeal_blocked_above.json create mode 100644 tests/vegetation/fern/fern_bonemeal_grows_large_fern.json create mode 100644 tests/vegetation/fern/fern_destroyed_by_piston.json create mode 100644 tests/vegetation/fern/fern_explosion_drops_no_fern.json create mode 100644 tests/vegetation/fern/fern_flower_pot.json create mode 100644 tests/vegetation/fern/fern_placement_on_supports.json create mode 100644 tests/vegetation/fern/fern_placement_rejected_on_invalid_support.json create mode 100644 tests/vegetation/fern/fern_replaced_by_block_placement.json create mode 100644 tests/vegetation/fern/fern_support_loss.json create mode 100644 tests/vegetation/fern/fern_washed_away_by_water.json diff --git a/tests/vegetation/fern/fern_bonemeal_blocked_above.json b/tests/vegetation/fern/fern_bonemeal_blocked_above.json new file mode 100644 index 0000000..0981755 --- /dev/null +++ b/tests/vegetation/fern/fern_bonemeal_blocked_above.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "fern_bonemeal_blocked_above", + "description": "Bone meal on a fern with a stone block directly above it changes nothing, because a large fern has no room to grow, and the bone meal is not consumed.", + "tags": ["vegetation", "fern", "bone-meal", "large-fern", "player"], + "minecraftIds": ["minecraft:fern", "minecraft:grass_block", "minecraft:stone", "minecraft:bone_meal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:fern"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:fern" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone" } }, + { "is": {"id": "minecraft:bone_meal", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/fern/fern_bonemeal_grows_large_fern.json b/tests/vegetation/fern/fern_bonemeal_grows_large_fern.json new file mode 100644 index 0000000..45e176d --- /dev/null +++ b/tests/vegetation/fern/fern_bonemeal_grows_large_fern.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "fern_bonemeal_grows_large_fern", + "description": "Bone meal on a fern with air above it replaces it with a two-block large fern, lower half in the fern's position and upper half above, and consumes the bone meal.", + "tags": ["vegetation", "fern", "bone-meal", "large-fern", "player"], + "minecraftIds": ["minecraft:fern", "minecraft:large_fern", "minecraft:grass_block", "minecraft:bone_meal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:fern"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:large_fern", "half": "lower"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:large_fern", "half": "upper"} }, + { "pos": [0, 3, 0], "is": {"id": "minecraft:air"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/fern/fern_destroyed_by_piston.json b/tests/vegetation/fern/fern_destroyed_by_piston.json new file mode 100644 index 0000000..c18e8bf --- /dev/null +++ b/tests/vegetation/fern/fern_destroyed_by_piston.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "fern_destroyed_by_piston", + "description": "An extending piston destroys a fern in front of it instead of pushing it, so the fern is gone and nothing sits behind the piston head.", + "tags": ["vegetation", "fern", "piston", "push-reaction", "redstone"], + "minecraftIds": [ + "minecraft:fern" , "minecraft:piston" , "minecraft:piston_head" , "minecraft:redstone_block", + "minecraft:dirt" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 3, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [4, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:dirt"} }, + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:piston", "facing": "east", "extended": false} + }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:fern"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "extended": false} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:fern" } } + ] + }, + { "at": 2, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston" , "extended": true, "facing": "east"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/fern/fern_explosion_drops_no_fern.json b/tests/vegetation/fern/fern_explosion_drops_no_fern.json new file mode 100644 index 0000000..dd0da3a --- /dev/null +++ b/tests/vegetation/fern/fern_explosion_drops_no_fern.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "fern_explosion_drops_no_fern", + "description": "An explosion next to a fern destroys it, but without shears the loot table never drops the fern item itself.", + "tags": ["vegetation", "fern", "explosion", "loot"], + "minecraftIds": ["minecraft:fern", "minecraft:grass_block", "minecraft:obsidian", "minecraft:tnt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [6, 4, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [6, 0, 1] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 0, "do": "place", "pos": [5, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 0, "do": "place", "pos": [5, 1, 0], "block": {"id": "minecraft:fern"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [5, 1, 0], "is": {"id": "minecraft:fern"} } + ] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [6.5, 1, 0.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [5, 1, 0], "is": {"id": "minecraft:air"} }, + { "is": "minecraft:item" , "exists": false, "Item.id": "minecraft:fern" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/fern/fern_flower_pot.json b/tests/vegetation/fern/fern_flower_pot.json new file mode 100644 index 0000000..0de58dd --- /dev/null +++ b/tests/vegetation/fern/fern_flower_pot.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "fern_flower_pot", + "description": "Using a fern on an empty flower pot turns it into a potted fern and consumes one item, while using a second fern on the filled pot changes nothing and keeps the item.", + "tags": ["vegetation", "fern", "flower-pot", "player"], + "minecraftIds": ["minecraft:fern", "minecraft:flower_pot", "minecraft:potted_fern"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [2, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fern", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:flower_pot"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_fern" } }, + { "is": {"id": "minecraft:fern" , "count": 1}, "slot": "hotbar1" } + ] + }, + {"at": 4, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_fern" } }, + { "is": {"id": "minecraft:fern" , "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/fern/fern_placement_on_supports.json b/tests/vegetation/fern/fern_placement_on_supports.json new file mode 100644 index 0000000..9d9975d --- /dev/null +++ b/tests/vegetation/fern/fern_placement_on_supports.json @@ -0,0 +1,76 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "fern_placement_on_supports", + "description": "Fern items placed on grass block, dirt, podzol, mud, moss block and farmland create a fern on each and consume all six items.", + "tags": ["vegetation", "fern", "placement", "supports-vegetation", "player"], + "minecraftIds": [ + "minecraft:fern" , "minecraft:grass_block", "minecraft:dirt" , "minecraft:podzol" , + "minecraft:mud" , "minecraft:moss_block" , "minecraft:farmland" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [6, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fern", "count": 6} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [6, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [5, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:podzol" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:mud" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:moss_block" } }, + { "pos": [5, 0, 0], "block": {"id": "minecraft:farmland" } } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 0.5], "rot": [0, 90] }, + {"at": 8, "do": "interact"}, + { "at": 9, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 0.5], "rot": [0, 90] }, + {"at": 9, "do": "interact"}, + { "at": 10, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 0.5], "rot": [0, 90] }, + {"at": 10, "do": "interact"}, + { "at": 11, "do": "tp", "entity_alias": "player", "pos": [2.5, 6, 0.5] }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:fern"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:fern"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:fern"} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:fern"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:fern"} }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:fern"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/fern/fern_placement_rejected_on_invalid_support.json b/tests/vegetation/fern/fern_placement_rejected_on_invalid_support.json new file mode 100644 index 0000000..998eca5 --- /dev/null +++ b/tests/vegetation/fern/fern_placement_rejected_on_invalid_support.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "fern_placement_rejected_on_invalid_support", + "description": "Fern items used on stone and sand do not place a fern and are not consumed, because neither block supports vegetation.", + "tags": ["vegetation", "fern", "placement", "supports-vegetation", "player"], + "minecraftIds": ["minecraft:fern", "minecraft:stone", "minecraft:sand"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fern", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, -1, -1], [2, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [1, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:sand" } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:fern" , "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/fern/fern_replaced_by_block_placement.json b/tests/vegetation/fern/fern_replaced_by_block_placement.json new file mode 100644 index 0000000..2f1c921 --- /dev/null +++ b/tests/vegetation/fern/fern_replaced_by_block_placement.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "fern_replaced_by_block_placement", + "description": "Because a fern is replaceable, placing a stone block against it replaces the fern in its own position instead of going on top.", + "tags": ["vegetation", "fern", "replaceable", "placement", "player"], + "minecraftIds": ["minecraft:fern", "minecraft:dirt", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:dirt"} }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:fern"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/fern/fern_support_loss.json b/tests/vegetation/fern/fern_support_loss.json new file mode 100644 index 0000000..07b9b7b --- /dev/null +++ b/tests/vegetation/fern/fern_support_loss.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "fern_support_loss", + "description": "A fern breaks into air when the dirt beneath it is removed, while a fern whose dirt stays in place is unaffected.", + "tags": ["vegetation", "fern", "support", "neighbor-update"], + "minecraftIds": ["minecraft:fern", "minecraft:dirt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:dirt"} }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:dirt"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:fern"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:fern"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:fern"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:fern"} } + ] + }, + { "at": 2, "do": "remove", "pos": [0, 0, 0] }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:dirt"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:fern"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/fern/fern_washed_away_by_water.json b/tests/vegetation/fern/fern_washed_away_by_water.json new file mode 100644 index 0000000..f451dee --- /dev/null +++ b/tests/vegetation/fern/fern_washed_away_by_water.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "fern_washed_away_by_water", + "description": "Water flowing sideways along a stone channel into the space of a fern replaces the fern with water, since the fern has no collision and cannot block fluid.", + "tags": ["vegetation", "fern", "fluid", "water", "neighbor-update"], + "minecraftIds": ["minecraft:fern", "minecraft:water", "minecraft:dirt", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [4, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [4, 1, -1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, 1], [4, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [2, 0, 0], "block": {"id": "minecraft:dirt"} }, + { "at": 0, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:fern"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:fern"} } + ] + }, + { "at": 2, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:water"} } + ] + } + ], + "breakpoints": [] +} + From cedcfbabee1bb528375384ad4e0675680436794b Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sat, 31 Oct 2026 06:13:46 +0100 Subject: [PATCH 57/85] Add Flint tests for fire (2 blocks) --- ...out_without_fuel_when_age_above_three.json | 66 ++++++++++++++++ ...oul_fire_when_floor_becomes_soul_sand.json | 71 +++++++++++++++++ ...ppears_when_flammable_support_removed.json | 67 ++++++++++++++++ .../fire_disappears_when_floor_removed.json | 67 ++++++++++++++++ ...s_not_tick_when_spread_radius_is_zero.json | 59 ++++++++++++++ ...d_steel_on_planks_side_sets_side_flag.json | 51 ++++++++++++ ..._and_steel_on_stone_has_default_state.json | 51 ++++++++++++ .../fire_never_burns_out_on_netherrack.json | 59 ++++++++++++++ ...fire_side_flags_update_with_neighbour.json | 78 +++++++++++++++++++ ...ul_fire_disappears_when_base_replaced.json | 35 +++++++++ .../soul_fire_does_not_burn_or_spread.json | 37 +++++++++ ...d_steel_on_soul_sand_places_soul_fire.json | 38 +++++++++ ...d_steel_on_soul_soil_places_soul_fire.json | 38 +++++++++ 13 files changed, 717 insertions(+) create mode 100644 tests/world/fire/fire_burns_out_without_fuel_when_age_above_three.json create mode 100644 tests/world/fire/fire_converts_to_soul_fire_when_floor_becomes_soul_sand.json create mode 100644 tests/world/fire/fire_disappears_when_flammable_support_removed.json create mode 100644 tests/world/fire/fire_disappears_when_floor_removed.json create mode 100644 tests/world/fire/fire_does_not_tick_when_spread_radius_is_zero.json create mode 100644 tests/world/fire/fire_flint_and_steel_on_planks_side_sets_side_flag.json create mode 100644 tests/world/fire/fire_flint_and_steel_on_stone_has_default_state.json create mode 100644 tests/world/fire/fire_never_burns_out_on_netherrack.json create mode 100644 tests/world/fire/fire_side_flags_update_with_neighbour.json create mode 100644 tests/world/fire/soul_fire_disappears_when_base_replaced.json create mode 100644 tests/world/fire/soul_fire_does_not_burn_or_spread.json create mode 100644 tests/world/fire/soul_fire_flint_and_steel_on_soul_sand_places_soul_fire.json create mode 100644 tests/world/fire/soul_fire_flint_and_steel_on_soul_soil_places_soul_fire.json diff --git a/tests/world/fire/fire_burns_out_without_fuel_when_age_above_three.json b/tests/world/fire/fire_burns_out_without_fuel_when_age_above_three.json new file mode 100644 index 0000000..ea47dc5 --- /dev/null +++ b/tests/world/fire/fire_burns_out_without_fuel_when_age_above_three.json @@ -0,0 +1,66 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Fire Burns Out Without Fuel When Age Above Three", + "description": "Fire with age 4 on stone and no flammable neighbours is still there shortly after placement and is gone long after its first scheduled tick (30 to 39 game ticks), because age above 3 on a non-flammable floor burns out.", + "tags": ["fire", "burn-out", "scheduled-tick"], + "minecraftIds": ["minecraft:fire", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:fire_spread_radius_around_player": -1 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:fire", + "age": 4, + "north": false, + "east": false, + "south": false, + "west": false, + "up": false + } + }, + { + "at": 10, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:fire", + "age": 4, + "north": false, + "east": false, + "south": false, + "west": false, + "up": false + } + } + ] + }, + { + "at": 80, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/fire/fire_converts_to_soul_fire_when_floor_becomes_soul_sand.json b/tests/world/fire/fire_converts_to_soul_fire_when_floor_becomes_soul_sand.json new file mode 100644 index 0000000..8ef2b2a --- /dev/null +++ b/tests/world/fire/fire_converts_to_soul_fire_when_floor_becomes_soul_sand.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Fire Converts To Soul Fire When Floor Becomes Soul Sand", + "description": "Fire on stone, with an oak planks neighbour to keep it alive, turns into soul fire when the stone is replaced by soul sand, because FireBlock.updateShape rebuilds the state through BaseFireBlock.getState.", + "tags": ["fire", "soul_fire", "neighbour-update"], + "minecraftIds": [ + "minecraft:fire" , "minecraft:soul_fire" , "minecraft:soul_sand" , "minecraft:oak_planks", + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:fire_spread_radius_around_player": -1 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:oak_planks"} }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:fire", + "age": 0, + "north": false, + "east": false, + "south": false, + "west": false, + "up": false + } + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:fire", + "age": 0, + "north": false, + "east": false, + "south": false, + "west": false, + "up": false + } + } + ] + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:soul_sand"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:soul_fire"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/fire/fire_disappears_when_flammable_support_removed.json b/tests/world/fire/fire_disappears_when_flammable_support_removed.json new file mode 100644 index 0000000..ef20646 --- /dev/null +++ b/tests/world/fire/fire_disappears_when_flammable_support_removed.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Fire Disappears When Flammable Support Removed", + "description": "Floating fire held up only by oak planks on its west side is removed by the neighbour update once the planks are removed.", + "tags": ["fire", "survival", "neighbour-update"], + "minecraftIds": ["minecraft:fire", "minecraft:oak_planks"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:fire_spread_radius_around_player": -1 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_planks"} }, + { + "at": 1, + "do": "place", + "pos": [1, 1, 0], + "block": { + "id": "minecraft:fire", + "age": 0, + "north": false, + "east": false, + "south": false, + "west": true, + "up": false + } + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [1, 1, 0], + "is": { + "id": "minecraft:fire", + "age": 0, + "north": false, + "east": false, + "south": false, + "west": true, + "up": false + } + } + ] + }, + { "at": 4, "do": "remove", "pos": [0, 1, 0] }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/fire/fire_disappears_when_floor_removed.json b/tests/world/fire/fire_disappears_when_floor_removed.json new file mode 100644 index 0000000..3dfa7f5 --- /dev/null +++ b/tests/world/fire/fire_disappears_when_floor_removed.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Fire Disappears When Floor Removed", + "description": "Fire on stone with no flammable neighbours is removed by the neighbour update once the stone is removed.", + "tags": ["fire", "survival", "neighbour-update"], + "minecraftIds": ["minecraft:fire", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:fire_spread_radius_around_player": -1 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:fire", + "age": 0, + "north": false, + "east": false, + "south": false, + "west": false, + "up": false + } + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:fire", + "age": 0, + "north": false, + "east": false, + "south": false, + "west": false, + "up": false + } + } + ] + }, + { "at": 4, "do": "remove", "pos": [0, 0, 0] }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/fire/fire_does_not_tick_when_spread_radius_is_zero.json b/tests/world/fire/fire_does_not_tick_when_spread_radius_is_zero.json new file mode 100644 index 0000000..e5e075a --- /dev/null +++ b/tests/world/fire/fire_does_not_tick_when_spread_radius_is_zero.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Fire Does Not Tick When Spread Radius Is Zero", + "description": "With fire_spread_radius_around_player set to 0 no player is close enough, so fire with age 4 on stone never runs its burn-out and is still there after 60 ticks.", + "tags": ["fire", "gamerule", "scheduled-tick", "modifies-gamerule"], + "minecraftIds": ["minecraft:fire", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:fire_spread_radius_around_player": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:fire", + "age": 4, + "north": false, + "east": false, + "south": false, + "west": false, + "up": false + } + }, + { + "at": 60, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:fire", + "age": 4, + "north": false, + "east": false, + "south": false, + "west": false, + "up": false + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/fire/fire_flint_and_steel_on_planks_side_sets_side_flag.json b/tests/world/fire/fire_flint_and_steel_on_planks_side_sets_side_flag.json new file mode 100644 index 0000000..34b79e4 --- /dev/null +++ b/tests/world/fire/fire_flint_and_steel_on_planks_side_sets_side_flag.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Fire Flint And Steel On Planks Side Sets Side Flag", + "description": "Flint and steel on the east face of floating oak planks places fire in mid-air with only the west flag set, because the fire has no sturdy floor and its only flammable neighbour is to the west.", + "tags": ["fire", "flint-and-steel", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:fire", "minecraft:oak_planks", "minecraft:stone", "minecraft:flint_and_steel"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [2, 1, 0] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:fire_spread_radius_around_player": -1 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [2, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_planks"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 0, 0.5], "rot": [90, 0] }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:flint_and_steel"}, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [1, 1, 0], + "is": { + "id": "minecraft:fire", + "age": 0, + "north": false, + "east": false, + "south": false, + "west": true, + "up": false + } + }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_planks"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/fire/fire_flint_and_steel_on_stone_has_default_state.json b/tests/world/fire/fire_flint_and_steel_on_stone_has_default_state.json new file mode 100644 index 0000000..9b5d07b --- /dev/null +++ b/tests/world/fire/fire_flint_and_steel_on_stone_has_default_state.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Fire Flint And Steel On Stone Has Default State", + "description": "Flint and steel on the top of stone places fire with age 0 and no side flags, even with oak planks beside the fire position, because the sturdy floor wins in BaseFireBlock getState/FireBlock.getStateForPlacement.", + "tags": ["fire", "flint-and-steel", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:fire", "minecraft:stone", "minecraft:oak_planks", "minecraft:flint_and_steel"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 0] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:fire_spread_radius_around_player": -1 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:oak_planks"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:flint_and_steel"}, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:fire", + "age": 0, + "north": false, + "east": false, + "south": false, + "west": false, + "up": false + } + }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:oak_planks"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/fire/fire_never_burns_out_on_netherrack.json b/tests/world/fire/fire_never_burns_out_on_netherrack.json new file mode 100644 index 0000000..cb2f631 --- /dev/null +++ b/tests/world/fire/fire_never_burns_out_on_netherrack.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Fire Never Burns Out On Netherrack", + "description": "Fire with age 15 on netherrack is still there after 120 ticks, because netherrack is in the infiniburn tag, which skips the burn-out checks.", + "tags": ["fire", "infiniburn", "scheduled-tick"], + "minecraftIds": ["minecraft:fire", "minecraft:netherrack"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:fire_spread_radius_around_player": -1 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:netherrack"} }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:fire", + "age": 15, + "north": false, + "east": false, + "south": false, + "west": false, + "up": false + } + }, + { + "at": 120, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:fire", + "age": 15, + "north": false, + "east": false, + "south": false, + "west": false, + "up": false + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/fire/fire_side_flags_update_with_neighbour.json b/tests/world/fire/fire_side_flags_update_with_neighbour.json new file mode 100644 index 0000000..205f2c7 --- /dev/null +++ b/tests/world/fire/fire_side_flags_update_with_neighbour.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Fire Side Flags Update With Neighbour", + "description": "Floating fire with age 5 gains the east flag when a flammable block is placed east of it, keeping its age and west flag (FireBlock.updateShape recomputes the state).", + "tags": ["fire", "block-state", "neighbour-update"], + "minecraftIds": ["minecraft:fire", "minecraft:oak_planks"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 1, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:fire_spread_radius_around_player": -1 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_planks"} }, + { + "at": 1, + "do": "place", + "pos": [1, 1, 0], + "block": { + "id": "minecraft:fire", + "age": 5, + "north": false, + "east": false, + "south": false, + "west": true, + "up": false + } + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [1, 1, 0], + "is": { + "id": "minecraft:fire", + "age": 5, + "north": false, + "east": false, + "south": false, + "west": true, + "up": false + } + } + ] + }, + { "at": 4, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:oak_planks"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { + "pos": [1, 1, 0], + "is": { + "id": "minecraft:fire", + "age": 5, + "north": false, + "east": true, + "south": false, + "west": true, + "up": false + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/fire/soul_fire_disappears_when_base_replaced.json b/tests/world/fire/soul_fire_disappears_when_base_replaced.json new file mode 100644 index 0000000..c314217 --- /dev/null +++ b/tests/world/fire/soul_fire_disappears_when_base_replaced.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Soul Fire Disappears When Base Replaced", + "description": "Soul fire on soul sand is removed by the neighbour update when the soul sand is replaced with stone.", + "tags": ["soul_fire", "survival", "neighbour-update"], + "minecraftIds": ["minecraft:soul_fire", "minecraft:soul_sand", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:soul_sand"} }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:soul_fire"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:soul_fire"} } + ] + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/fire/soul_fire_does_not_burn_or_spread.json b/tests/world/fire/soul_fire_does_not_burn_or_spread.json new file mode 100644 index 0000000..aa10cc3 --- /dev/null +++ b/tests/world/fire/soul_fire_does_not_burn_or_spread.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Soul Fire Does Not Burn Or Spread", + "description": "Soul fire on soul sand next to oak planks is still there after 150 ticks and the planks are intact, because SoulFireBlock has no tick, aging or spread logic.", + "tags": ["soul_fire", "no-spread", "scheduled-tick"], + "minecraftIds": ["minecraft:soul_fire", "minecraft:soul_sand", "minecraft:oak_planks"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:fire_spread_radius_around_player": -1 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:soul_sand"} }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:oak_planks"} }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:soul_fire"} }, + { + "at": 150, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:soul_fire" } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:oak_planks"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/fire/soul_fire_flint_and_steel_on_soul_sand_places_soul_fire.json b/tests/world/fire/soul_fire_flint_and_steel_on_soul_sand_places_soul_fire.json new file mode 100644 index 0000000..77f3c72 --- /dev/null +++ b/tests/world/fire/soul_fire_flint_and_steel_on_soul_sand_places_soul_fire.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Soul Fire Flint And Steel On Soul Sand Places Soul Fire", + "description": "Flint and steel on the top of soul sand places soul fire instead of fire, because BaseFireBlock.getState picks soul fire for blocks in the soul_fire_base_blocks tag.", + "tags": ["soul_fire", "flint-and-steel", "placement", "player"], + "minecraftIds": ["minecraft:soul_fire", "minecraft:soul_sand", "minecraft:flint_and_steel"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 0] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:fire_spread_radius_around_player": -1 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:soul_sand"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:flint_and_steel"}, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:soul_fire"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/world/fire/soul_fire_flint_and_steel_on_soul_soil_places_soul_fire.json b/tests/world/fire/soul_fire_flint_and_steel_on_soul_soil_places_soul_fire.json new file mode 100644 index 0000000..fc999cd --- /dev/null +++ b/tests/world/fire/soul_fire_flint_and_steel_on_soul_soil_places_soul_fire.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Soul Fire Flint And Steel On Soul Soil Places Soul Fire", + "description": "Flint and steel on the top of soul soil places soul fire instead of fire, because BaseFireBlock.getState picks soul fire for blocks in the soul_fire_base_blocks tag.", + "tags": ["soul_fire", "flint-and-steel", "placement", "player"], + "minecraftIds": ["minecraft:soul_fire", "minecraft:soul_soil", "minecraft:flint_and_steel"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 0] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:fire_spread_radius_around_player": -1 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:soul_soil"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:flint_and_steel"}, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:soul_fire"} } + ] + } + ], + "breakpoints": [] +} + From ae7c8f3faa78f404c3ed2cb17b8875ae6ded7e90 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sat, 31 Oct 2026 06:23:03 +0100 Subject: [PATCH 58/85] Add Flint tests for fire_charge (1 blocks) --- .../fire_charge_creative_keeps_stack.json | 34 +++++++++++ ...harge_dispenser_shoots_small_fireball.json | 49 +++++++++++++++ .../fire_charge_lights_candle.json | 48 +++++++++++++++ .../fire_charge_lights_candle_cake.json | 42 +++++++++++++ .../fire_charge_lit_campfire_unchanged.json | 42 +++++++++++++ .../fire_charge_places_fire_on_stone.json | 35 +++++++++++ ...e_side_of_flammable_block_places_fire.json | 43 +++++++++++++ ...e_side_of_stone_without_support_fails.json | 42 +++++++++++++ ...ire_charge_soul_sand_places_soul_fire.json | 34 +++++++++++ ...rge_tnt_gamerule_disabled_places_fire.json | 51 ++++++++++++++++ .../fire_charge/fire_charge_tnt_primes.json | 60 +++++++++++++++++++ .../fire_charge_use_in_air_does_nothing.json | 35 +++++++++++ ...ire_charge_waterlogged_candle_not_lit.json | 45 ++++++++++++++ 13 files changed, 560 insertions(+) create mode 100644 tests/items/fire_charge/fire_charge_creative_keeps_stack.json create mode 100644 tests/items/fire_charge/fire_charge_dispenser_shoots_small_fireball.json create mode 100644 tests/items/fire_charge/fire_charge_lights_candle.json create mode 100644 tests/items/fire_charge/fire_charge_lights_candle_cake.json create mode 100644 tests/items/fire_charge/fire_charge_lit_campfire_unchanged.json create mode 100644 tests/items/fire_charge/fire_charge_places_fire_on_stone.json create mode 100644 tests/items/fire_charge/fire_charge_side_of_flammable_block_places_fire.json create mode 100644 tests/items/fire_charge/fire_charge_side_of_stone_without_support_fails.json create mode 100644 tests/items/fire_charge/fire_charge_soul_sand_places_soul_fire.json create mode 100644 tests/items/fire_charge/fire_charge_tnt_gamerule_disabled_places_fire.json create mode 100644 tests/items/fire_charge/fire_charge_tnt_primes.json create mode 100644 tests/items/fire_charge/fire_charge_use_in_air_does_nothing.json create mode 100644 tests/items/fire_charge/fire_charge_waterlogged_candle_not_lit.json diff --git a/tests/items/fire_charge/fire_charge_creative_keeps_stack.json b/tests/items/fire_charge/fire_charge_creative_keeps_stack.json new file mode 100644 index 0000000..df88b60 --- /dev/null +++ b/tests/items/fire_charge/fire_charge_creative_keeps_stack.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "fire_charge_creative_keeps_stack", + "description": "A creative player using a fire charge on top of stone places fire, but the stack count is restored by ServerPlayerGameMode so no charge is consumed.", + "tags": ["item", "fire_charge", "fire", "creative", "player"], + "minecraftIds": ["minecraft:fire_charge", "minecraft:stone", "minecraft:fire"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fire_charge", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:fire" } }, + { "is": {"id": "minecraft:fire_charge", "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/fire_charge/fire_charge_dispenser_shoots_small_fireball.json b/tests/items/fire_charge/fire_charge_dispenser_shoots_small_fireball.json new file mode 100644 index 0000000..2ebcb93 --- /dev/null +++ b/tests/items/fire_charge/fire_charge_dispenser_shoots_small_fireball.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "fire_charge_dispenser_shoots_small_fireball", + "description": "A powered upward-facing dispenser holding one fire charge empties itself and spawns a small fireball entity (ProjectileItem dispense behaviour). Only the spawn is checked, not the flight; the player stands aside and the cleanup region is tall so the rising fireball stays in the checked area.", + "tags": ["item", "fire_charge", "dispenser", "projectile", "redstone"], + "minecraftIds": [ + "minecraft:fire_charge" , "minecraft:dispenser" , "minecraft:redstone_block", "minecraft:small_fireball" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 40, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [3, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [3.5, 1, 0.5] }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "up", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:fire_charge\"}]"} + } + }, + { "at": 2, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:dispenser", "nbt": {"Items": []} } + }, + {"is": "minecraft:small_fireball", "exists": true, "count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/fire_charge/fire_charge_lights_candle.json b/tests/items/fire_charge/fire_charge_lights_candle.json new file mode 100644 index 0000000..9289974 --- /dev/null +++ b/tests/items/fire_charge/fire_charge_lights_candle.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "fire_charge_lights_candle", + "description": "Using a fire charge on an unlit, non-waterlogged candle with three candles lights it (CandleBlock.canLight), keeps the candle count, places no fire above it and consumes one charge.", + "tags": ["item", "fire_charge", "candle", "ignite", "block-state", "player"], + "minecraftIds": ["minecraft:fire_charge", "minecraft:candle", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fire_charge", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": {"id": "minecraft:candle", "candles": 3, "lit": false, "waterlogged": false} + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:candle", "candles": 3, "lit": true, "waterlogged": false} + }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} }, + { "slot": "hotbar1", "is": {"id": "minecraft:fire_charge", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/fire_charge/fire_charge_lights_candle_cake.json b/tests/items/fire_charge/fire_charge_lights_candle_cake.json new file mode 100644 index 0000000..7b55f60 --- /dev/null +++ b/tests/items/fire_charge/fire_charge_lights_candle_cake.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "fire_charge_lights_candle_cake", + "description": "Using a fire charge on an unlit candle cake lights it: CandleCakeBlock.useItemOn passes on fire charges so FireChargeItem.useOn runs (CandleCakeBlock.canLight). One charge is consumed and no fire is placed above.", + "tags": ["item", "fire_charge", "candle_cake", "ignite", "block-state", "player"], + "minecraftIds": ["minecraft:fire_charge", "minecraft:candle_cake", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fire_charge", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:candle_cake", "lit": false} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:candle_cake", "lit": true} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} }, + { "is": {"id": "minecraft:fire_charge", "count": 1} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/fire_charge/fire_charge_lit_campfire_unchanged.json b/tests/items/fire_charge/fire_charge_lit_campfire_unchanged.json new file mode 100644 index 0000000..b8f0e59 --- /dev/null +++ b/tests/items/fire_charge/fire_charge_lit_campfire_unchanged.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "fire_charge_lit_campfire_unchanged", + "description": "Using a fire charge on an already lit campfire does nothing: CampfireBlock.canLight is false, and no fire can be placed on top of the campfire, so the stack is kept.", + "tags": ["item", "fire_charge", "campfire", "edge-case", "block-state", "player"], + "minecraftIds": ["minecraft:fire_charge", "minecraft:campfire", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fire_charge", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:campfire", "lit": true, "waterlogged": false} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:campfire", "lit": true, "waterlogged": false} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} } , + { "slot": "hotbar1", "is": {"id": "minecraft:fire_charge", "count": 2} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/fire_charge/fire_charge_places_fire_on_stone.json b/tests/items/fire_charge/fire_charge_places_fire_on_stone.json new file mode 100644 index 0000000..3629dce --- /dev/null +++ b/tests/items/fire_charge/fire_charge_places_fire_on_stone.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "fire_charge_places_fire_on_stone", + "description": "Using a stack of two fire charges on top of stone places fire above it (FireChargeItem.useOn) and consumes exactly one charge for a survival player.", + "tags": ["item", "fire_charge", "fire", "interaction", "player"], + "minecraftIds": ["minecraft:fire_charge", "minecraft:stone", "minecraft:fire"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fire_charge", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:fire" } }, + { "is": {"id": "minecraft:fire_charge", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/fire_charge/fire_charge_side_of_flammable_block_places_fire.json b/tests/items/fire_charge/fire_charge_side_of_flammable_block_places_fire.json new file mode 100644 index 0000000..a204f8e --- /dev/null +++ b/tests/items/fire_charge/fire_charge_side_of_flammable_block_places_fire.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "fire_charge_side_of_flammable_block_places_fire", + "description": "Using a fire charge on the west face of a floating oak planks block places fire beside it with no floor below, because the flammable neighbour lets the fire survive. One charge is consumed.", + "tags": ["item", "fire_charge", "fire", "flammability", "player"], + "minecraftIds": ["minecraft:fire_charge", "minecraft:oak_planks", "minecraft:stone", "minecraft:fire"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fire_charge", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-3, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:oak_planks"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-2.5, 1, 0.5], "rot": [-90, 24] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:oak_planks" } }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:fire" } }, + { "pos": [-1, 0, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:fire_charge", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/fire_charge/fire_charge_side_of_stone_without_support_fails.json b/tests/items/fire_charge/fire_charge_side_of_stone_without_support_fails.json new file mode 100644 index 0000000..27a9092 --- /dev/null +++ b/tests/items/fire_charge/fire_charge_side_of_stone_without_support_fails.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "fire_charge_side_of_stone_without_support_fails", + "description": "Using a fire charge on the west face of a floating stone block places nothing: the target spot has no sturdy floor and no flammable neighbour, so FireChargeItem.useOn returns FAIL and the stack is kept.", + "tags": ["item", "fire_charge", "fire", "edge-case", "player"], + "minecraftIds": ["minecraft:fire_charge", "minecraft:stone", "minecraft:fire"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fire_charge", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-3, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-2.5, 1, 0.5], "rot": [-90, 24] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:fire_charge", "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/fire_charge/fire_charge_soul_sand_places_soul_fire.json b/tests/items/fire_charge/fire_charge_soul_sand_places_soul_fire.json new file mode 100644 index 0000000..0a9de8d --- /dev/null +++ b/tests/items/fire_charge/fire_charge_soul_sand_places_soul_fire.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "fire_charge_soul_sand_places_soul_fire", + "description": "Using a fire charge on top of soul sand places soul fire instead of normal fire (BaseFireBlock.getState checks SoulFireBlock.canSurviveOnBlock) and consumes one charge.", + "tags": ["item", "fire_charge", "soul_fire", "interaction", "player"], + "minecraftIds": ["minecraft:fire_charge", "minecraft:soul_sand", "minecraft:soul_fire"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fire_charge", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:soul_sand"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:soul_fire" } }, + { "is": {"id": "minecraft:fire_charge", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/fire_charge/fire_charge_tnt_gamerule_disabled_places_fire.json b/tests/items/fire_charge/fire_charge_tnt_gamerule_disabled_places_fire.json new file mode 100644 index 0000000..a28c1a7 --- /dev/null +++ b/tests/items/fire_charge/fire_charge_tnt_gamerule_disabled_places_fire.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "fire_charge_tnt_gamerule_disabled_places_fire", + "description": "With tnt_explodes disabled, TNT does not prime and returns PASS, so the fire charge falls through to FireChargeItem.useOn and places fire above the TNT (a flammable support), consuming one charge. The TNT block stays.", + "tags": ["item", "fire_charge", "tnt", "gamerule", "edge-case", "player"], + "minecraftIds": ["minecraft:fire_charge", "minecraft:tnt", "minecraft:obsidian", "minecraft:fire"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fire_charge", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs" : false, + "minecraft:advance_time" : false, + "minecraft:advance_weather": false, + "minecraft:tnt_explodes" : false + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:obsidian"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:tnt" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:tnt"} } , + { "pos": [0, 2, 0], "is": {"id": "minecraft:fire"} } , + {"is": "minecraft:tnt", "exists": false} , + { "slot": "hotbar1", "is": {"id": "minecraft:fire_charge", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/fire_charge/fire_charge_tnt_primes.json b/tests/items/fire_charge/fire_charge_tnt_primes.json new file mode 100644 index 0000000..d43f502 --- /dev/null +++ b/tests/items/fire_charge/fire_charge_tnt_primes.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "fire_charge_tnt_primes", + "description": "With tnt_explodes enabled, using a fire charge on TNT replaces the block with air, spawns a primed TNT entity and consumes one charge (TntBlock.useItemOn). The player moves to a stone platform away from the blast, and the entity is gone after the fuse runs out and the obsidian floor survives.", + "tags": ["item", "fire_charge", "tnt", "ignite", "gamerule", "player"], + "minecraftIds": ["minecraft:fire_charge", "minecraft:tnt", "minecraft:obsidian"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 12] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fire_charge", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs" : false, + "minecraft:advance_time" : false, + "minecraft:advance_weather": false, + "minecraft:tnt_explodes" : true + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:obsidian"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:tnt" } }, + { "pos": [0, 0, 12], "block": {"id": "minecraft:stone" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 12.5], "rot": [0, 90] }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:tnt", "exists": true, "count": 1} , + { "slot": "hotbar1", "is": {"id": "minecraft:fire_charge", "count": 1} } + ] + }, + { + "at": 100, + "do": "assert", + "checks": [ + { "is": "minecraft:tnt" , "exists": false }, + { "is": {"id": "minecraft:obsidian"}, "pos": [0, 0, 0] } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/fire_charge/fire_charge_use_in_air_does_nothing.json b/tests/items/fire_charge/fire_charge_use_in_air_does_nothing.json new file mode 100644 index 0000000..8cdff82 --- /dev/null +++ b/tests/items/fire_charge/fire_charge_use_in_air_does_nothing.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "fire_charge_use_in_air_does_nothing", + "description": "Using a fire charge while facing open air does nothing: FireChargeItem only overrides useOn, not use, so the stack is kept and no fire appears.", + "tags": ["item", "fire_charge", "edge-case", "player"], + "minecraftIds": ["minecraft:fire_charge", "minecraft:fire"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 4, 3] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fire_charge", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 3, 1], "is": {"id": "minecraft:air" } }, + { "pos": [0, 3, 2], "is": {"id": "minecraft:air" } }, + { "pos": [0, 2, 1], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:fire_charge", "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/fire_charge/fire_charge_waterlogged_candle_not_lit.json b/tests/items/fire_charge/fire_charge_waterlogged_candle_not_lit.json new file mode 100644 index 0000000..4ff7f84 --- /dev/null +++ b/tests/items/fire_charge/fire_charge_waterlogged_candle_not_lit.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "fire_charge_waterlogged_candle_not_lit", + "description": "Using a fire charge on an unlit waterlogged candle does not light it (CandleBlock.canLight requires waterlogged=false) and places no fire above it because the candle cannot support fire. The stack is kept.", + "tags": ["item", "fire_charge", "candle", "waterlogging", "edge-case", "player"], + "minecraftIds": ["minecraft:fire_charge", "minecraft:candle", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fire_charge", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": {"id": "minecraft:candle", "candles": 1, "lit": false, "waterlogged": true} + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:candle", "lit": false, "waterlogged": true} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} } , + { "slot": "hotbar1", "is": {"id": "minecraft:fire_charge", "count": 2} } + ] + } + ], + "breakpoints": [] +} + From fcbfd26a6ec4bf836531cfec36dfe65be8ab94f1 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sat, 31 Oct 2026 06:57:48 +0100 Subject: [PATCH 59/85] Add Flint tests for firefly_bush (1 blocks) --- ...efly_bush_bonemeal_no_valid_neighbour.json | 75 +++++++++++++++ ...efly_bush_composts_in_empty_composter.json | 58 +++++++++++ .../firefly_bush_destroyed_by_piston.json | 72 ++++++++++++++ ..._bush_not_replaced_by_block_placement.json | 60 ++++++++++++ ...placement_rejected_on_invalid_support.json | 56 +++++++++++ .../firefly_bush_support_loss.json | 70 ++++++++++++++ .../firefly_bush_survives_on_supports.json | 96 +++++++++++++++++++ .../firefly_bush_washed_away_by_water.json | 63 ++++++++++++ 8 files changed, 550 insertions(+) create mode 100644 tests/vegetation/firefly_bush/firefly_bush_bonemeal_no_valid_neighbour.json create mode 100644 tests/vegetation/firefly_bush/firefly_bush_composts_in_empty_composter.json create mode 100644 tests/vegetation/firefly_bush/firefly_bush_destroyed_by_piston.json create mode 100644 tests/vegetation/firefly_bush/firefly_bush_not_replaced_by_block_placement.json create mode 100644 tests/vegetation/firefly_bush/firefly_bush_placement_rejected_on_invalid_support.json create mode 100644 tests/vegetation/firefly_bush/firefly_bush_support_loss.json create mode 100644 tests/vegetation/firefly_bush/firefly_bush_survives_on_supports.json create mode 100644 tests/vegetation/firefly_bush/firefly_bush_washed_away_by_water.json diff --git a/tests/vegetation/firefly_bush/firefly_bush_bonemeal_no_valid_neighbour.json b/tests/vegetation/firefly_bush/firefly_bush_bonemeal_no_valid_neighbour.json new file mode 100644 index 0000000..d232d3f --- /dev/null +++ b/tests/vegetation/firefly_bush/firefly_bush_bonemeal_no_valid_neighbour.json @@ -0,0 +1,75 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "firefly_bush_bonemeal_no_valid_neighbour", + "description": "Bone meal on a firefly bush with no empty supported horizontal neighbour places nothing, not even above, and is not consumed.", + "tags": ["vegetation", "firefly-bush", "bone-meal", "spread", "player"], + "minecraftIds": [ + "minecraft:firefly_bush", "minecraft:grass_block" , "minecraft:dirt" , "minecraft:sand" , + "minecraft:bone_meal" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -2], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, -1, -2], [2, 4, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [-1, 1, -1], [1, 3, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [0, 0, 1], "block": {"id": "minecraft:dirt" } }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:sand" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:firefly_bush"} } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:firefly_bush" } }, + { "pos": [ 1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [ 0, 1, -1], "is": {"id": "minecraft:air" } }, + { "pos": [ 0, 1, 1], "is": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:bone_meal" , "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/firefly_bush/firefly_bush_composts_in_empty_composter.json b/tests/vegetation/firefly_bush/firefly_bush_composts_in_empty_composter.json new file mode 100644 index 0000000..7c095ae --- /dev/null +++ b/tests/vegetation/firefly_bush/firefly_bush_composts_in_empty_composter.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "firefly_bush_composts_in_empty_composter", + "description": "A firefly bush used on an empty composter always raises it to level 1 and is consumed, instead of being placed.", + "tags": ["vegetation", "firefly-bush", "composter", "compostable", "player"], + "minecraftIds": ["minecraft:firefly_bush", "minecraft:composter", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [7, 4, 3] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:firefly_bush", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [7, 4, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [4, 1, 1], [4, 4, 1] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [4, 1, 1], "block": {"id": "minecraft:composter", "level": "0"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 1.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [4.5, 9, 1.5] }, + { + "at": 15, + "do": "assert", + "checks": [ + { "pos": [4, 1, 1], "is": {"id": "minecraft:composter", "level": "1"} }, + { "pos": [4, 2, 1], "is": {"id": "minecraft:air"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/firefly_bush/firefly_bush_destroyed_by_piston.json b/tests/vegetation/firefly_bush/firefly_bush_destroyed_by_piston.json new file mode 100644 index 0000000..8d33b46 --- /dev/null +++ b/tests/vegetation/firefly_bush/firefly_bush_destroyed_by_piston.json @@ -0,0 +1,72 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "firefly_bush_destroyed_by_piston", + "description": "A piston extending into a firefly bush destroys it instead of pushing it, the piston head takes its place, and one firefly bush item drops.", + "tags": ["vegetation", "firefly-bush", "piston", "push-reaction", "drops"], + "minecraftIds": [ + "minecraft:firefly_bush" , "minecraft:dirt" , "minecraft:piston" , "minecraft:redstone_block", + "minecraft:piston_head" , "minecraft:item" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [14, 3, 3] ] + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [14, 3, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [10, 1, 1], [13, 2, 2] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [12, 0, 1], "block": {"id": "minecraft:dirt"} }, + { "pos": [12, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, + { "pos": [11, 1, 1], "block": {"id": "minecraft:piston", "facing": "east", "extended": "false"} } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [12, 1, 1], "is": {"id": "minecraft:firefly_bush" } }, + { "pos": [11, 1, 1], "is": {"id": "minecraft:piston" , "extended": "false"} } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [11.5, 9, 2.5] }, + { "at": 5, "do": "place", "pos": [11, 1, 2], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 15, + "do": "assert", + "checks": [ + { "pos": [11, 1, 1], "is": {"id": "minecraft:piston", "extended": "true"} } , + { "pos": [12, 1, 1], "is": {"id": "minecraft:piston_head", "facing": "east"} } , + { "pos": [13, 1, 1], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "Item": "{count: 1, id: \"minecraft:firefly_bush\"}"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/firefly_bush/firefly_bush_not_replaced_by_block_placement.json b/tests/vegetation/firefly_bush/firefly_bush_not_replaced_by_block_placement.json new file mode 100644 index 0000000..899cb6b --- /dev/null +++ b/tests/vegetation/firefly_bush/firefly_bush_not_replaced_by_block_placement.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "firefly_bush_not_replaced_by_block_placement", + "description": "Because a firefly bush is not replaceable, placing a stone block against its top puts the stone above it and leaves the bush in place.", + "tags": ["vegetation", "firefly-bush", "not-replaceable", "placement", "player"], + "minecraftIds": ["minecraft:firefly_bush", "minecraft:dirt", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 4, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:dirt"} }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:firefly_bush"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 8, 0.5] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:firefly_bush"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/firefly_bush/firefly_bush_placement_rejected_on_invalid_support.json b/tests/vegetation/firefly_bush/firefly_bush_placement_rejected_on_invalid_support.json new file mode 100644 index 0000000..463f35a --- /dev/null +++ b/tests/vegetation/firefly_bush/firefly_bush_placement_rejected_on_invalid_support.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "firefly_bush_placement_rejected_on_invalid_support", + "description": "A firefly bush item used on stone does not place a bush, because stone does not support vegetation.", + "tags": ["vegetation", "firefly-bush", "placement", "supports-vegetation", "player"], + "minecraftIds": ["minecraft:firefly_bush", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:firefly_bush", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, -1, -1], [2, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [1, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/firefly_bush/firefly_bush_support_loss.json b/tests/vegetation/firefly_bush/firefly_bush_support_loss.json new file mode 100644 index 0000000..ee37343 --- /dev/null +++ b/tests/vegetation/firefly_bush/firefly_bush_support_loss.json @@ -0,0 +1,70 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "firefly_bush_support_loss", + "description": "A firefly bush on grass block or farmland becomes air once the block beneath it is removed.", + "tags": ["vegetation", "firefly-bush", "support", "neighbor-update"], + "minecraftIds": ["minecraft:firefly_bush", "minecraft:grass_block", "minecraft:farmland"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [14, 2, 2] ] + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [14, 2, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [12, 1, 1], [13, 1, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [12, 0, 1], "block": {"id": "minecraft:grass_block" } }, + { "pos": [13, 0, 1], "block": {"id": "minecraft:farmland" } }, + { "pos": [12, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, + { "pos": [13, 1, 1], "block": {"id": "minecraft:firefly_bush"} } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [12, 1, 1], "is": {"id": "minecraft:firefly_bush"} }, + { "pos": [13, 1, 1], "is": {"id": "minecraft:firefly_bush"} } + ] + }, + { "at": 5, "do": "remove", "pos": [12, 0, 1] }, + { "at": 5, "do": "remove", "pos": [13, 0, 1] }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [12, 0, 1], "is": {"id": "minecraft:air"} }, + { "pos": [12, 1, 1], "is": {"id": "minecraft:air"} }, + { "pos": [13, 0, 1], "is": {"id": "minecraft:air"} }, + { "pos": [13, 1, 1], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/firefly_bush/firefly_bush_survives_on_supports.json b/tests/vegetation/firefly_bush/firefly_bush_survives_on_supports.json new file mode 100644 index 0000000..84673b3 --- /dev/null +++ b/tests/vegetation/firefly_bush/firefly_bush_survives_on_supports.json @@ -0,0 +1,96 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "firefly_bush_survives_on_supports", + "description": "A firefly bush above grass block, dirt, podzol, mud, moss block or farmland stays when a neighbour update reaches it, but turns to air above sand.", + "tags": ["vegetation", "firefly-bush", "support", "supports-vegetation", "neighbor-update"], + "minecraftIds": [ + "minecraft:firefly_bush", "minecraft:grass_block" , "minecraft:dirt" , "minecraft:podzol" , + "minecraft:mud" , "minecraft:moss_block" , "minecraft:farmland" , "minecraft:sand" , + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [7, 3, 2] ] + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [7, 3, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 1], [6, 2, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 1], "block": {"id": "minecraft:grass_block"} }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:dirt" } }, + { "pos": [2, 0, 1], "block": {"id": "minecraft:podzol" } }, + { "pos": [3, 0, 1], "block": {"id": "minecraft:mud" } }, + { "pos": [4, 0, 1], "block": {"id": "minecraft:moss_block" } }, + { "pos": [5, 0, 1], "block": {"id": "minecraft:farmland" } }, + { "pos": [6, 0, 1], "block": {"id": "minecraft:sand" } } + ] + }, + { + "at": 5, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, + { "pos": [1, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, + { "pos": [2, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, + { "pos": [3, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, + { "pos": [5, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, + { "pos": [6, 1, 1], "block": {"id": "minecraft:firefly_bush"} } + ] + }, + { + "at": 6, + "do": "place_each", + "blocks": [ + { "pos": [0, 2, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 2, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [2, 2, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 2, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 2, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [5, 2, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 2, 1], "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 9, + "do": "assert", + "checks": [ + { "pos": [0, 1, 1], "is": {"id": "minecraft:firefly_bush"} }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:firefly_bush"} }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:firefly_bush"} }, + { "pos": [3, 1, 1], "is": {"id": "minecraft:firefly_bush"} }, + { "pos": [4, 1, 1], "is": {"id": "minecraft:firefly_bush"} }, + { "pos": [5, 1, 1], "is": {"id": "minecraft:firefly_bush"} }, + { "pos": [6, 1, 1], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/firefly_bush/firefly_bush_washed_away_by_water.json b/tests/vegetation/firefly_bush/firefly_bush_washed_away_by_water.json new file mode 100644 index 0000000..b9bbc62 --- /dev/null +++ b/tests/vegetation/firefly_bush/firefly_bush_washed_away_by_water.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "firefly_bush_washed_away_by_water", + "description": "Water spreading from an adjacent source into a firefly bush replaces it with flowing water and drops one firefly bush item.", + "tags": ["vegetation", "firefly-bush", "water", "fluid", "drops"], + "minecraftIds": [ + "minecraft:firefly_bush", "minecraft:dirt" , "minecraft:stone" , "minecraft:water" , + "minecraft:item" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [14, 3, 4] ] + }, + "world": { + "time": "minecraft:day", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [14, 3, 4] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [10, 1, 2], [11, 1, 2] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [11, 0, 2], "block": {"id": "minecraft:dirt"} }, + { "at": 4, "do": "place", "pos": [11, 1, 2], "block": {"id": "minecraft:firefly_bush"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [11.5, 9, 2.5] }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [11, 1, 2], "is": {"id": "minecraft:firefly_bush"} } + ] + }, + { "at": 6, "do": "place", "pos": [10, 1, 2], "block": {"id": "minecraft:water"} }, + { + "at": 20, + "do": "assert", + "checks": [ + { "pos": [10, 1, 2], "is": {"id": "minecraft:water"} } , + { "pos": [11, 1, 2], "is": {"id": "minecraft:water"} } , + {"is": "minecraft:item", "exists": true, "Item": "{count: 1, id: \"minecraft:firefly_bush\"}"} + ] + } + ], + "breakpoints": [] +} + From b443c2eed67f2cdea8229dc2da4fd218b70b3660 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sat, 31 Oct 2026 07:02:01 +0100 Subject: [PATCH 60/85] Add Flint tests for firework_rocket (1 blocks) --- ...work_rocket_dispenser_launch_sideways.json | 44 +++++++++++++++++++ .../firework_rocket_dispenser_launch_up.json | 44 +++++++++++++++++++ ...irework_rocket_use_in_air_not_gliding.json | 31 +++++++++++++ ...firework_rocket_use_on_block_creative.json | 37 ++++++++++++++++ ...firework_rocket_use_on_block_survival.json | 37 ++++++++++++++++ 5 files changed, 193 insertions(+) create mode 100644 tests/items/firework_rocket/firework_rocket_dispenser_launch_sideways.json create mode 100644 tests/items/firework_rocket/firework_rocket_dispenser_launch_up.json create mode 100644 tests/items/firework_rocket/firework_rocket_use_in_air_not_gliding.json create mode 100644 tests/items/firework_rocket/firework_rocket_use_on_block_creative.json create mode 100644 tests/items/firework_rocket/firework_rocket_use_on_block_survival.json diff --git a/tests/items/firework_rocket/firework_rocket_dispenser_launch_sideways.json b/tests/items/firework_rocket/firework_rocket_dispenser_launch_sideways.json new file mode 100644 index 0000000..6ca90f8 --- /dev/null +++ b/tests/items/firework_rocket/firework_rocket_dispenser_launch_sideways.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:firework_rocket", "minecraft:dispenser", "minecraft:redstone_block"], + "name": "Firework Rocket Dispenser Launch Sideways", + "description": "A powered dispenser facing east fires its firework rocket as an entity out of its east face and its inventory is emptied.", + "tags": ["item", "firework-rocket", "dispenser", "redstone"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 4, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:firework_rocket\"}]"} + } + }, + { "at": 1, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:dispenser", "nbt": {"Items": []} } + }, + { + "is": "minecraft:firework_rocket", + "exists": true, + "count": 1, + "pos": [3, 1.5, 0.5], + "position_tolerance": 1 + } + ] + } + ] +} + diff --git a/tests/items/firework_rocket/firework_rocket_dispenser_launch_up.json b/tests/items/firework_rocket/firework_rocket_dispenser_launch_up.json new file mode 100644 index 0000000..d99901d --- /dev/null +++ b/tests/items/firework_rocket/firework_rocket_dispenser_launch_up.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:firework_rocket", "minecraft:dispenser", "minecraft:redstone_block"], + "name": "Firework Rocket Dispenser Launch Up", + "description": "A powered dispenser facing up fires its firework rocket as an entity above itself and its inventory is emptied.", + "tags": ["item", "firework-rocket", "dispenser", "redstone"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 4, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "up", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:firework_rocket\"}]"} + } + }, + { "at": 1, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:dispenser", "nbt": {"Items": []} } + }, + { + "is": "minecraft:firework_rocket", + "exists": true, + "count": 1, + "pos": [0.5, 4, 0.5], + "position_tolerance": 1 + } + ] + } + ] +} + diff --git a/tests/items/firework_rocket/firework_rocket_use_in_air_not_gliding.json b/tests/items/firework_rocket/firework_rocket_use_in_air_not_gliding.json new file mode 100644 index 0000000..fb83919 --- /dev/null +++ b/tests/items/firework_rocket/firework_rocket_use_in_air_not_gliding.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:firework_rocket"], + "name": "Firework Rocket Use In Air Not Gliding", + "description": "Using a firework rocket in open air while not gliding does nothing: no rocket entity appears and the stack is not consumed.", + "tags": ["item", "firework-rocket", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 4, 0] ] + }, + "player": { + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:firework_rocket", "count": 2} } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:firework_rocket", "count": 2} }, + { "is": "minecraft:firework_rocket" , "exists": false } + ] + } + ] +} + diff --git a/tests/items/firework_rocket/firework_rocket_use_on_block_creative.json b/tests/items/firework_rocket/firework_rocket_use_on_block_creative.json new file mode 100644 index 0000000..e9eba27 --- /dev/null +++ b/tests/items/firework_rocket/firework_rocket_use_on_block_creative.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:firework_rocket"], + "name": "Firework Rocket Use On Block Creative", + "description": "A creative player using a firework rocket on the top of a block spawns one rocket entity just above that face but the stack count is unchanged.", + "tags": ["item", "firework-rocket", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 4, 0] ] + }, + "player": { + "game_mode": "Creative", + "inventory": { "hotbar1": {"id": "minecraft:firework_rocket", "count": 2} } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:firework_rocket", "count": 2} }, + { + "is": "minecraft:firework_rocket", + "exists": true, + "count": 1, + "pos": [0.5, 1.4, 0.5], + "position_tolerance": 0.6 + } + ] + } + ] +} + diff --git a/tests/items/firework_rocket/firework_rocket_use_on_block_survival.json b/tests/items/firework_rocket/firework_rocket_use_on_block_survival.json new file mode 100644 index 0000000..9ec3252 --- /dev/null +++ b/tests/items/firework_rocket/firework_rocket_use_on_block_survival.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:firework_rocket"], + "name": "Firework Rocket Use On Block Survival", + "description": "A survival player using a firework rocket on the top of a block spawns one rocket entity just above that face and consumes one rocket from the stack.", + "tags": ["item", "firework-rocket", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 4, 0] ] + }, + "player": { + "game_mode": "Survival", + "inventory": { "hotbar1": {"id": "minecraft:firework_rocket", "count": 2} } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:firework_rocket", "count": 1} }, + { + "is": "minecraft:firework_rocket", + "exists": true, + "count": 1, + "pos": [0.5, 1.4, 0.5], + "position_tolerance": 0.6 + } + ] + } + ] +} + From 3fc15267a8aa9df9bdf2897a447dfaa703616d61 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sun, 1 Nov 2026 04:28:54 +0100 Subject: [PATCH 61/85] Add Flint tests for fishing_rod (1 blocks) --- .../fishing_rod_cast_keeps_rod.json | 32 ++++++++++++++++++ .../fishing_rod_reel_in_midair_keeps_rod.json | 33 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 tests/items/fishing_rod/fishing_rod_cast_keeps_rod.json create mode 100644 tests/items/fishing_rod/fishing_rod_reel_in_midair_keeps_rod.json diff --git a/tests/items/fishing_rod/fishing_rod_cast_keeps_rod.json b/tests/items/fishing_rod/fishing_rod_cast_keeps_rod.json new file mode 100644 index 0000000..a7f4b2c --- /dev/null +++ b/tests/items/fishing_rod/fishing_rod_cast_keeps_rod.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:fishing_rod", "minecraft:fishing_bobber"], + "name": "fishing_rod_cast_keeps_rod", + "description": "Casting a fishing rod while aiming at open air spawns a fishing bobber and the rod is not consumed: it stays in the hand with count 1. This does not check durability.", + "tags": ["item", "fishing-rod", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 3, 6] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fishing_rod", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:fishing_rod", "count": 1} }, + { "is": "minecraft:fishing_bobber" , "exists": true, "count": 1 } + ] + } + ] +} + diff --git a/tests/items/fishing_rod/fishing_rod_reel_in_midair_keeps_rod.json b/tests/items/fishing_rod/fishing_rod_reel_in_midair_keeps_rod.json new file mode 100644 index 0000000..86e5282 --- /dev/null +++ b/tests/items/fishing_rod/fishing_rod_reel_in_midair_keeps_rod.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:fishing_rod", "minecraft:fishing_bobber"], + "name": "fishing_rod_reel_in_midair_keeps_rod", + "description": "Using a fishing rod a second time while its bobber is still in the air reels the bobber in and the rod is not consumed: it stays in the hand with count 1. This does not check durability.", + "tags": ["item", "fishing-rod", "player"], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [1, 3, 6] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:fishing_rod", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:fishing_rod", "count": 1} }, + { "is": "minecraft:fishing_bobber" , "exists": false } + ] + } + ] +} + From 7744b7167ff59b9da169cfad1c95536cf02644e5 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sun, 1 Nov 2026 04:35:02 +0100 Subject: [PATCH 62/85] Add Flint tests for flint_and_steel (1 blocks) --- ...d_steel_adventure_mode_places_no_fire.json | 30 ++++++++++ ...ser_blocked_target_still_takes_damage.json | 59 +++++++++++++++++++ ...int_and_steel_dispenser_lights_candle.json | 57 ++++++++++++++++++ ...flint_and_steel_dispenser_places_fire.json | 47 +++++++++++++++ .../flint_and_steel_lights_candle.json | 43 ++++++++++++++ .../flint_and_steel_lights_candle_cake.json | 37 ++++++++++++ .../flint_and_steel_places_fire_on_stone.json | 30 ++++++++++ ...d_steel_places_soul_fire_on_soul_sand.json | 29 +++++++++ .../flint_and_steel_primes_tnt.json | 55 +++++++++++++++++ ...l_side_of_flammable_block_places_fire.json | 30 ++++++++++ ..._stone_without_support_places_no_fire.json | 30 ++++++++++ ...tnt_explodes_gamerule_off_places_fire.json | 46 +++++++++++++++ ..._steel_waterlogged_candle_stays_unlit.json | 43 ++++++++++++++ 13 files changed, 536 insertions(+) create mode 100644 tests/items/flint_and_steel/flint_and_steel_adventure_mode_places_no_fire.json create mode 100644 tests/items/flint_and_steel/flint_and_steel_dispenser_blocked_target_still_takes_damage.json create mode 100644 tests/items/flint_and_steel/flint_and_steel_dispenser_lights_candle.json create mode 100644 tests/items/flint_and_steel/flint_and_steel_dispenser_places_fire.json create mode 100644 tests/items/flint_and_steel/flint_and_steel_lights_candle.json create mode 100644 tests/items/flint_and_steel/flint_and_steel_lights_candle_cake.json create mode 100644 tests/items/flint_and_steel/flint_and_steel_places_fire_on_stone.json create mode 100644 tests/items/flint_and_steel/flint_and_steel_places_soul_fire_on_soul_sand.json create mode 100644 tests/items/flint_and_steel/flint_and_steel_primes_tnt.json create mode 100644 tests/items/flint_and_steel/flint_and_steel_side_of_flammable_block_places_fire.json create mode 100644 tests/items/flint_and_steel/flint_and_steel_side_of_stone_without_support_places_no_fire.json create mode 100644 tests/items/flint_and_steel/flint_and_steel_tnt_explodes_gamerule_off_places_fire.json create mode 100644 tests/items/flint_and_steel/flint_and_steel_waterlogged_candle_stays_unlit.json diff --git a/tests/items/flint_and_steel/flint_and_steel_adventure_mode_places_no_fire.json b/tests/items/flint_and_steel/flint_and_steel_adventure_mode_places_no_fire.json new file mode 100644 index 0000000..f8a6a08 --- /dev/null +++ b/tests/items/flint_and_steel/flint_and_steel_adventure_mode_places_no_fire.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "flint_and_steel_adventure_mode_places_no_fire", + "description": "In adventure mode flint and steel does nothing on plain stone: ItemStack.useOn returns PASS because the player may not build and the block is not in the can_place_on list. The game mode is set per test, so the next test starts with its own mode again.", + "tags": ["item", "flint-and-steel", "adventure", "edge-case", "player"], + "minecraftIds": ["minecraft:flint_and_steel", "minecraft:stone", "minecraft:fire"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": {"game_mode": "Adventure"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:flint_and_steel"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:flint_and_steel"}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/flint_and_steel/flint_and_steel_dispenser_blocked_target_still_takes_damage.json b/tests/items/flint_and_steel/flint_and_steel_dispenser_blocked_target_still_takes_damage.json new file mode 100644 index 0000000..888bbdf --- /dev/null +++ b/tests/items/flint_and_steel/flint_and_steel_dispenser_blocked_target_still_takes_damage.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "flint_and_steel_dispenser_blocked_target_still_takes_damage", + "description": "A powered dispenser holding flint and steel facing solid stone changes nothing but still loses one durability, because FlintAndSteelDispenseItemBehavior never clears its success flag on that path.", + "tags": ["item", "flint-and-steel", "dispenser", "redstone"], + "minecraftIds": [ + "minecraft:flint_and_steel", "minecraft:dispenser" , "minecraft:redstone_block" , + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [1, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [1, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:flint_and_steel\"}]"} + } + } + ] + }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:dispenser", + "nbt": { + "Items": "[{components: {\"minecraft:damage\": 1}, count: 1, Slot: 0b, id: \"minecraft:flint_and_steel\"}]" + } + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/flint_and_steel/flint_and_steel_dispenser_lights_candle.json b/tests/items/flint_and_steel/flint_and_steel_dispenser_lights_candle.json new file mode 100644 index 0000000..0e41b4a --- /dev/null +++ b/tests/items/flint_and_steel/flint_and_steel_dispenser_lights_candle.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "flint_and_steel_dispenser_lights_candle", + "description": "A powered dispenser holding flint and steel lights an unlit candle in front of it instead of placing fire.", + "tags": ["item", "flint-and-steel", "dispenser", "redstone"], + "minecraftIds": [ + "minecraft:flint_and_steel", "minecraft:dispenser" , "minecraft:redstone_block" , + "minecraft:candle" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [1, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { + "pos": [1, 1, 0], + "block": {"id": "minecraft:candle", "candles": 1, "lit": false, "waterlogged": false} + }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:flint_and_steel\"}]"} + } + } + ] + }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { + "pos": [1, 1, 0], + "is": {"id": "minecraft:candle", "candles": 1, "lit": true, "waterlogged": false} + }, + { "pos": [1, 2, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/flint_and_steel/flint_and_steel_dispenser_places_fire.json b/tests/items/flint_and_steel/flint_and_steel_dispenser_places_fire.json new file mode 100644 index 0000000..848829c --- /dev/null +++ b/tests/items/flint_and_steel/flint_and_steel_dispenser_places_fire.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "flint_and_steel_dispenser_places_fire", + "description": "A powered dispenser holding flint and steel places fire on the air block in front of it when a solid floor supports it (FlintAndSteelDispenseItemBehavior).", + "tags": ["item", "flint-and-steel", "dispenser", "redstone"], + "minecraftIds": ["minecraft:flint_and_steel", "minecraft:dispenser", "minecraft:redstone_block", "minecraft:fire"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [1, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [1, 1, 0], "block": {"id": "minecraft:air"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:flint_and_steel\"}]"} + } + } + ] + }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:fire"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/flint_and_steel/flint_and_steel_lights_candle.json b/tests/items/flint_and_steel/flint_and_steel_lights_candle.json new file mode 100644 index 0000000..f89e205 --- /dev/null +++ b/tests/items/flint_and_steel/flint_and_steel_lights_candle.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "flint_and_steel_lights_candle", + "description": "Using flint and steel on an unlit candle stack lights it and keeps the candle count (CandleBlock.canLight), instead of placing fire above it.", + "tags": ["item", "flint-and-steel", "candle", "player"], + "minecraftIds": ["minecraft:flint_and_steel", "minecraft:candle"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": {"id": "minecraft:candle", "candles": 3, "lit": false, "waterlogged": false} + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:flint_and_steel"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:candle", "candles": 3, "lit": true, "waterlogged": false} + }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/flint_and_steel/flint_and_steel_lights_candle_cake.json b/tests/items/flint_and_steel/flint_and_steel_lights_candle_cake.json new file mode 100644 index 0000000..33c1ba9 --- /dev/null +++ b/tests/items/flint_and_steel/flint_and_steel_lights_candle_cake.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "flint_and_steel_lights_candle_cake", + "description": "Using flint and steel on an unlit candle cake lights it (CandleCakeBlock.canLight); the cake block passes the item through to FlintAndSteelItem.useOn.", + "tags": ["item", "flint-and-steel", "candle", "player"], + "minecraftIds": ["minecraft:flint_and_steel", "minecraft:candle_cake"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:candle_cake", "lit": false} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:flint_and_steel"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:candle_cake", "lit": true} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/flint_and_steel/flint_and_steel_places_fire_on_stone.json b/tests/items/flint_and_steel/flint_and_steel_places_fire_on_stone.json new file mode 100644 index 0000000..580406e --- /dev/null +++ b/tests/items/flint_and_steel/flint_and_steel_places_fire_on_stone.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "flint_and_steel_places_fire_on_stone", + "description": "Using flint and steel on the top of stone places fire above it (FlintAndSteelItem.useOn) and the item stays in the slot.", + "tags": ["item", "flint-and-steel", "fire", "player"], + "minecraftIds": ["minecraft:flint_and_steel", "minecraft:fire", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:flint_and_steel"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:fire" } }, + { "is": {"id": "minecraft:flint_and_steel"}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/flint_and_steel/flint_and_steel_places_soul_fire_on_soul_sand.json b/tests/items/flint_and_steel/flint_and_steel_places_soul_fire_on_soul_sand.json new file mode 100644 index 0000000..796fa64 --- /dev/null +++ b/tests/items/flint_and_steel/flint_and_steel_places_soul_fire_on_soul_sand.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "flint_and_steel_places_soul_fire_on_soul_sand", + "description": "Using flint and steel on the top of soul sand places soul fire instead of fire, because soul sand is in the soul_fire_base_blocks tag (BaseFireBlock.getState).", + "tags": ["item", "flint-and-steel", "soul-fire", "player"], + "minecraftIds": ["minecraft:flint_and_steel", "minecraft:soul_fire", "minecraft:soul_sand"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:soul_sand"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:flint_and_steel"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:soul_fire"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/flint_and_steel/flint_and_steel_primes_tnt.json b/tests/items/flint_and_steel/flint_and_steel_primes_tnt.json new file mode 100644 index 0000000..3134eb5 --- /dev/null +++ b/tests/items/flint_and_steel/flint_and_steel_primes_tnt.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "flint_and_steel_primes_tnt", + "description": "Using flint and steel on TNT removes the TNT block and spawns a primed tnt entity (TntBlock.useItemOn); the TNT sits on obsidian and the player moves 13 blocks away, so after the explosion nothing is left behind.", + "tags": ["item", "flint-and-steel", "tnt", "explosion", "player"], + "minecraftIds": ["minecraft:flint_and_steel", "minecraft:tnt", "minecraft:obsidian"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 14] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs" : false, + "minecraft:advance_time" : false, + "minecraft:advance_weather": false, + "minecraft:tnt_explodes" : true + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:obsidian"} }, + { "pos": [0, 0, 13], "block": {"id": "minecraft:obsidian"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:tnt" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:flint_and_steel"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 13.5], "rot": [0, 0] }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, + { "is": "minecraft:tnt" , "exists": true, "count": 1 } + ] + }, + { + "at": 100, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:obsidian"} }, + { "is": "minecraft:tnt" , "exists": false } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/flint_and_steel/flint_and_steel_side_of_flammable_block_places_fire.json b/tests/items/flint_and_steel/flint_and_steel_side_of_flammable_block_places_fire.json new file mode 100644 index 0000000..ef64aa9 --- /dev/null +++ b/tests/items/flint_and_steel/flint_and_steel_side_of_flammable_block_places_fire.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "flint_and_steel_side_of_flammable_block_places_fire", + "description": "Using flint and steel on the west side of a floating oak planks block places fire in the air next to it, with the east side flag set, because fire can survive next to a flammable neighbour (FireBlock.getStateForPlacement).", + "tags": ["item", "flint-and-steel", "fire", "flammability", "player"], + "minecraftIds": ["minecraft:flint_and_steel", "minecraft:fire", "minecraft:oak_planks"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, 0], [0, 2, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_planks"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-1.5, 0, 0.5], "rot": [-90, 0] }, + {"at": 1, "do": "interact", "item": "minecraft:flint_and_steel"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [-1, 1, 0], "is": {"id": "minecraft:fire" , "east": true} }, + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:oak_planks" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/flint_and_steel/flint_and_steel_side_of_stone_without_support_places_no_fire.json b/tests/items/flint_and_steel/flint_and_steel_side_of_stone_without_support_places_no_fire.json new file mode 100644 index 0000000..11ee9bd --- /dev/null +++ b/tests/items/flint_and_steel/flint_and_steel_side_of_stone_without_support_places_no_fire.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "flint_and_steel_side_of_stone_without_support_places_no_fire", + "description": "Using flint and steel on the side of a floating stone block places no fire: the target has air below and no flammable neighbour, so BaseFireBlock.canBePlacedAt fails and useOn returns FAIL.", + "tags": ["item", "flint-and-steel", "fire", "edge-case", "player"], + "minecraftIds": ["minecraft:flint_and_steel", "minecraft:fire", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, 0], [0, 2, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-1.5, 0, 0.5], "rot": [-90, 0] }, + {"at": 1, "do": "interact", "item": "minecraft:flint_and_steel"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [-1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:stone"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/flint_and_steel/flint_and_steel_tnt_explodes_gamerule_off_places_fire.json b/tests/items/flint_and_steel/flint_and_steel_tnt_explodes_gamerule_off_places_fire.json new file mode 100644 index 0000000..cbdf8ea --- /dev/null +++ b/tests/items/flint_and_steel/flint_and_steel_tnt_explodes_gamerule_off_places_fire.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "flint_and_steel_tnt_explodes_gamerule_off_places_fire", + "description": "With the tnt_explodes gamerule off, TNT cannot be primed: TntBlock.useItemOn returns PASS, so FlintAndSteelItem.useOn runs and places fire on top of the TNT, which stays in place.", + "tags": ["item", "flint-and-steel", "tnt", "gamerule", "edge-case", "player"], + "minecraftIds": ["minecraft:flint_and_steel", "minecraft:tnt", "minecraft:fire"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": {"game_mode": "Survival"}, + "world": { + "gamerules": { + "minecraft:spawn_mobs" : false, + "minecraft:advance_time" : false, + "minecraft:advance_weather": false, + "minecraft:tnt_explodes" : false + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:obsidian"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:tnt" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:flint_and_steel"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:tnt"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:fire"} }, + { "is": "minecraft:tnt" , "exists": false } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/flint_and_steel/flint_and_steel_waterlogged_candle_stays_unlit.json b/tests/items/flint_and_steel/flint_and_steel_waterlogged_candle_stays_unlit.json new file mode 100644 index 0000000..c8285b5 --- /dev/null +++ b/tests/items/flint_and_steel/flint_and_steel_waterlogged_candle_stays_unlit.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "flint_and_steel_waterlogged_candle_stays_unlit", + "description": "Using flint and steel on an unlit waterlogged candle does not light it (CandleBlock.canLight requires waterlogged=false) and no fire appears above it because the candle top cannot support fire.", + "tags": ["item", "flint-and-steel", "candle", "player"], + "minecraftIds": ["minecraft:flint_and_steel", "minecraft:candle"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": {"id": "minecraft:candle", "candles": 1, "lit": false, "waterlogged": true} + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact", "item": "minecraft:flint_and_steel"}, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:candle", "candles": 1, "lit": false, "waterlogged": true} + }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + From 536c7fce786e5bee44dd041ed4619553a8dc8e2b Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sun, 1 Nov 2026 04:43:33 +0100 Subject: [PATCH 63/85] Add Flint tests for flower_pots (39 blocks) --- .../flower_pot_destroyed_by_piston.json | 61 +++++++++++++++++++ .../flower_pot_empty_hand_does_nothing.json | 32 ++++++++++ .../flower_pot_fill_creative_keeps_item.json | 35 +++++++++++ .../flower_pot_rejects_non_plant_item.json | 36 +++++++++++ .../flower_pot_survives_support_removal.json | 37 +++++++++++ .../potted_allium_destroyed_by_piston.json | 61 +++++++++++++++++++ .../potted_allium_empty_hand_takes_plant.json | 31 ++++++++++ .../potted_allium_rejects_other_plant.json | 36 +++++++++++ ...otted_allium_survives_support_removal.json | 38 ++++++++++++ ...tted_closed_eyeblossom_opens_at_night.json | 36 +++++++++++ ...ed_eyeblossom_stays_closed_in_daytime.json | 43 +++++++++++++ ...ted_open_eyeblossom_closes_in_daytime.json | 36 +++++++++++ ...d_open_eyeblossom_stays_open_at_night.json | 43 +++++++++++++ 13 files changed, 525 insertions(+) create mode 100644 tests/decoration/flower_pots/flower_pot_destroyed_by_piston.json create mode 100644 tests/decoration/flower_pots/flower_pot_empty_hand_does_nothing.json create mode 100644 tests/decoration/flower_pots/flower_pot_fill_creative_keeps_item.json create mode 100644 tests/decoration/flower_pots/flower_pot_rejects_non_plant_item.json create mode 100644 tests/decoration/flower_pots/flower_pot_survives_support_removal.json create mode 100644 tests/decoration/flower_pots/potted_allium_destroyed_by_piston.json create mode 100644 tests/decoration/flower_pots/potted_allium_empty_hand_takes_plant.json create mode 100644 tests/decoration/flower_pots/potted_allium_rejects_other_plant.json create mode 100644 tests/decoration/flower_pots/potted_allium_survives_support_removal.json create mode 100644 tests/decoration/flower_pots/potted_closed_eyeblossom_opens_at_night.json create mode 100644 tests/decoration/flower_pots/potted_closed_eyeblossom_stays_closed_in_daytime.json create mode 100644 tests/decoration/flower_pots/potted_open_eyeblossom_closes_in_daytime.json create mode 100644 tests/decoration/flower_pots/potted_open_eyeblossom_stays_open_at_night.json diff --git a/tests/decoration/flower_pots/flower_pot_destroyed_by_piston.json b/tests/decoration/flower_pots/flower_pot_destroyed_by_piston.json new file mode 100644 index 0000000..324cdc5 --- /dev/null +++ b/tests/decoration/flower_pots/flower_pot_destroyed_by_piston.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flower_pot_destroyed_by_piston", + "description": "A piston extending into an empty flower pot destroys it instead of pushing it, because the pot's push reaction is destroy, and the pot drops exactly one flower pot item.", + "tags": ["decoration", "flower-pot", "piston", "push-reaction", "drops", "redstone"], + "minecraftIds": [ + "minecraft:flower_pot" , "minecraft:piston" , "minecraft:piston_head" , "minecraft:redstone_block", + "minecraft:item" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [2, 4, 1] ] + }, + "player": {"game_mode": "Spectator"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [2, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [1, 4, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston" , "facing": "up", "extended": false} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:flower_pot" } } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:flower_pot"} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { "at": 5, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "up", "extended": true} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:piston_head", "facing": "up"} } , + { "pos": [0, 3, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:flower_pot"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/flower_pots/flower_pot_empty_hand_does_nothing.json b/tests/decoration/flower_pots/flower_pot_empty_hand_does_nothing.json new file mode 100644 index 0000000..9f1ce74 --- /dev/null +++ b/tests/decoration/flower_pots/flower_pot_empty_hand_does_nothing.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flower_pot_empty_hand_does_nothing", + "description": "Using an empty hand on an empty flower pot does nothing: the pot stays empty and the player's hotbar stays empty.", + "tags": ["decoration", "flower-pot", "interaction", "player"], + "minecraftIds": ["minecraft:flower_pot"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": {"selected_hotbar": 1, "game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:flower_pot"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:flower_pot"} }, + { "is": "empty" , "slot": "hotbar1" }, + { "is": "empty" , "slot": "hotbar2" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/flower_pots/flower_pot_fill_creative_keeps_item.json b/tests/decoration/flower_pots/flower_pot_fill_creative_keeps_item.json new file mode 100644 index 0000000..58cd480 --- /dev/null +++ b/tests/decoration/flower_pots/flower_pot_fill_creative_keeps_item.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flower_pot_fill_creative_keeps_item", + "description": "Using an allium on an empty flower pot as a creative player turns it into a potted allium but does not consume the item, because ItemStack.consume skips players with infinite materials.", + "tags": ["decoration", "flower-pot", "creative", "player"], + "minecraftIds": ["minecraft:flower_pot", "minecraft:potted_allium", "minecraft:allium"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:allium", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:flower_pot"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_allium" } }, + { "is": {"id": "minecraft:allium" , "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/flower_pots/flower_pot_rejects_non_plant_item.json b/tests/decoration/flower_pots/flower_pot_rejects_non_plant_item.json new file mode 100644 index 0000000..235e12c --- /dev/null +++ b/tests/decoration/flower_pots/flower_pot_rejects_non_plant_item.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flower_pot_rejects_non_plant_item", + "description": "Using stone on an empty flower pot does nothing: the item has no potted variant so the pot's empty-hand interaction runs, which is consumed for an empty pot, so no stone is placed and the stack is unchanged.", + "tags": ["decoration", "flower-pot", "interaction", "player"], + "minecraftIds": ["minecraft:flower_pot", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:flower_pot"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:flower_pot" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:stone" , "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/flower_pots/flower_pot_survives_support_removal.json b/tests/decoration/flower_pots/flower_pot_survives_support_removal.json new file mode 100644 index 0000000..8557183 --- /dev/null +++ b/tests/decoration/flower_pots/flower_pot_survives_support_removal.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flower_pot_survives_support_removal", + "description": "An empty flower pot stays in place after the block under it is removed, because FlowerPotBlock never overrides canSurvive and so the support check in updateShape always passes.", + "tags": ["decoration", "flower-pot", "support", "neighbor-update"], + "minecraftIds": ["minecraft:flower_pot", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 1] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:flower_pot"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:flower_pot"} } + ] + }, + { "at": 2, "do": "remove", "pos": [0, 0, 0] }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:flower_pot"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/flower_pots/potted_allium_destroyed_by_piston.json b/tests/decoration/flower_pots/potted_allium_destroyed_by_piston.json new file mode 100644 index 0000000..9e272cb --- /dev/null +++ b/tests/decoration/flower_pots/potted_allium_destroyed_by_piston.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "potted_allium_destroyed_by_piston", + "description": "A piston extending into a potted allium destroys it instead of pushing it, because the pot's push reaction is destroy, and the loot table drops exactly two items (the flower pot and the allium).", + "tags": ["decoration", "flower-pot", "piston", "push-reaction", "drops", "redstone"], + "minecraftIds": [ + "minecraft:potted_allium" , "minecraft:piston" , "minecraft:piston_head" , "minecraft:redstone_block", + "minecraft:item" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [2, 4, 1] ] + }, + "player": {"game_mode": "Spectator"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [2, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [1, 4, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston" , "facing": "up", "extended": false} }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:potted_allium" } } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:potted_allium"} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { "at": 5, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "up", "extended": true} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:piston_head", "facing": "up"} } , + { "pos": [0, 3, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 2} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/flower_pots/potted_allium_empty_hand_takes_plant.json b/tests/decoration/flower_pots/potted_allium_empty_hand_takes_plant.json new file mode 100644 index 0000000..4e8cfd2 --- /dev/null +++ b/tests/decoration/flower_pots/potted_allium_empty_hand_takes_plant.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "potted_allium_empty_hand_takes_plant", + "description": "Using an empty hand on a potted allium turns it back into an empty flower pot and puts the allium in the player's hotbar.", + "tags": ["decoration", "flower-pot", "interaction", "player"], + "minecraftIds": ["minecraft:potted_allium", "minecraft:flower_pot", "minecraft:allium"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": {"selected_hotbar": 1, "game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:potted_allium"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:flower_pot" } }, + { "is": {"id": "minecraft:allium" , "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/flower_pots/potted_allium_rejects_other_plant.json b/tests/decoration/flower_pots/potted_allium_rejects_other_plant.json new file mode 100644 index 0000000..8d255b4 --- /dev/null +++ b/tests/decoration/flower_pots/potted_allium_rejects_other_plant.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "potted_allium_rejects_other_plant", + "description": "Using a poppy on a potted allium changes nothing: the poppy has a potted variant so the click is consumed, but the pot is not empty, so the pot keeps its allium and the poppy stack is unchanged.", + "tags": ["decoration", "flower-pot", "interaction", "player"], + "minecraftIds": ["minecraft:potted_allium", "minecraft:poppy"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:poppy", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:potted_allium"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_allium"} }, + { "is": {"id": "minecraft:poppy", "count": 2}, "slot": "hotbar1" }, + { "is": "empty" , "slot": "hotbar2" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/flower_pots/potted_allium_survives_support_removal.json b/tests/decoration/flower_pots/potted_allium_survives_support_removal.json new file mode 100644 index 0000000..80c01e4 --- /dev/null +++ b/tests/decoration/flower_pots/potted_allium_survives_support_removal.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "potted_allium_survives_support_removal", + "description": "A potted allium stays in place after the block under it is removed, because FlowerPotBlock never overrides canSurvive and so the support check in updateShape always passes.", + "tags": ["decoration", "flower-pot", "support", "neighbor-update"], + "minecraftIds": ["minecraft:potted_allium", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 1] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:potted_allium"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_allium"} } + ] + }, + { "at": 2, "do": "remove", "pos": [0, 0, 0] }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_allium"} }, + { "is": "minecraft:item" , "exists": false } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/flower_pots/potted_closed_eyeblossom_opens_at_night.json b/tests/decoration/flower_pots/potted_closed_eyeblossom_opens_at_night.json new file mode 100644 index 0000000..ee34b66 --- /dev/null +++ b/tests/decoration/flower_pots/potted_closed_eyeblossom_opens_at_night.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "potted_closed_eyeblossom_opens_at_night", + "description": "At midnight (inside the eyeblossom open window) with a very high random tick speed, a potted closed eyeblossom random-ticks into a potted open eyeblossom. Note: flintcli does not reset random_tick_speed after the test.", + "tags": ["decoration", "flower-pot", "eyeblossom", "random-tick", "time", "modifies-gamerule"], + "minecraftIds": ["minecraft:potted_open_eyeblossom", "minecraft:potted_closed_eyeblossom", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "world": { + "time": "minecraft:midnight", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:potted_closed_eyeblossom"} }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_open_eyeblossom"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/flower_pots/potted_closed_eyeblossom_stays_closed_in_daytime.json b/tests/decoration/flower_pots/potted_closed_eyeblossom_stays_closed_in_daytime.json new file mode 100644 index 0000000..fba3d8b --- /dev/null +++ b/tests/decoration/flower_pots/potted_closed_eyeblossom_stays_closed_in_daytime.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "potted_closed_eyeblossom_stays_closed_in_daytime", + "description": "At daytime (outside the eyeblossom open window) with a very high random tick speed, a potted closed eyeblossom stays closed. Note: flintcli does not reset random_tick_speed after the test.", + "tags": ["decoration", "flower-pot", "eyeblossom", "random-tick", "time", "modifies-gamerule"], + "minecraftIds": ["minecraft:potted_open_eyeblossom", "minecraft:potted_closed_eyeblossom", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "world": { + "time": "minecraft:day", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:potted_closed_eyeblossom"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_closed_eyeblossom"} } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_closed_eyeblossom"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/flower_pots/potted_open_eyeblossom_closes_in_daytime.json b/tests/decoration/flower_pots/potted_open_eyeblossom_closes_in_daytime.json new file mode 100644 index 0000000..6bb4b2b --- /dev/null +++ b/tests/decoration/flower_pots/potted_open_eyeblossom_closes_in_daytime.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "potted_open_eyeblossom_closes_in_daytime", + "description": "At daytime (outside the eyeblossom open window) with a very high random tick speed, a potted open eyeblossom random-ticks into a potted closed eyeblossom. Note: flintcli does not reset random_tick_speed after the test.", + "tags": ["decoration", "flower-pot", "eyeblossom", "random-tick", "time", "modifies-gamerule"], + "minecraftIds": ["minecraft:potted_open_eyeblossom", "minecraft:potted_closed_eyeblossom", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "world": { + "time": "minecraft:day", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:potted_open_eyeblossom"} }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_closed_eyeblossom"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/flower_pots/potted_open_eyeblossom_stays_open_at_night.json b/tests/decoration/flower_pots/potted_open_eyeblossom_stays_open_at_night.json new file mode 100644 index 0000000..81ab21d --- /dev/null +++ b/tests/decoration/flower_pots/potted_open_eyeblossom_stays_open_at_night.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "potted_open_eyeblossom_stays_open_at_night", + "description": "At midnight (inside the eyeblossom open window) with a very high random tick speed, a potted open eyeblossom stays open. Note: flintcli does not reset random_tick_speed after the test.", + "tags": ["decoration", "flower-pot", "eyeblossom", "random-tick", "time", "modifies-gamerule"], + "minecraftIds": ["minecraft:potted_open_eyeblossom", "minecraft:potted_closed_eyeblossom", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "world": { + "time": "minecraft:midnight", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:potted_open_eyeblossom"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_open_eyeblossom"} } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_open_eyeblossom"} } + ] + } + ], + "breakpoints": [] +} + From f8341595fb958da0aee69b8ed2f28e739b85437a Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sun, 1 Nov 2026 05:09:54 +0100 Subject: [PATCH 64/85] Add Flint tests for flowering_azalea (1 blocks) --- ...ng_azalea_bonemeal_build_height_limit.json | 58 ++++++++++++++ .../flowering_azalea_bonemeal_consumed.json | 59 ++++++++++++++ .../flowering_azalea_bonemeal_grows_tree.json | 62 +++++++++++++++ ..._azalea_bonemeal_rejected_under_water.json | 62 +++++++++++++++ .../flowering_azalea_destroyed_by_piston.json | 53 +++++++++++++ .../flowering_azalea_has_collision.json | 53 +++++++++++++ ...zalea_not_replaced_by_block_placement.json | 50 ++++++++++++ ...lowering_azalea_placement_on_supports.json | 77 +++++++++++++++++++ ...placement_rejected_on_invalid_support.json | 52 +++++++++++++ .../flowering_azalea_support_loss.json | 60 +++++++++++++++ .../flowering_azalea_water_interaction.json | 73 ++++++++++++++++++ 11 files changed, 659 insertions(+) create mode 100644 tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_build_height_limit.json create mode 100644 tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_consumed.json create mode 100644 tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_grows_tree.json create mode 100644 tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_rejected_under_water.json create mode 100644 tests/vegetation/flowering_azalea/flowering_azalea_destroyed_by_piston.json create mode 100644 tests/vegetation/flowering_azalea/flowering_azalea_has_collision.json create mode 100644 tests/vegetation/flowering_azalea/flowering_azalea_not_replaced_by_block_placement.json create mode 100644 tests/vegetation/flowering_azalea/flowering_azalea_placement_on_supports.json create mode 100644 tests/vegetation/flowering_azalea/flowering_azalea_placement_rejected_on_invalid_support.json create mode 100644 tests/vegetation/flowering_azalea/flowering_azalea_support_loss.json create mode 100644 tests/vegetation/flowering_azalea/flowering_azalea_water_interaction.json diff --git a/tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_build_height_limit.json b/tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_build_height_limit.json new file mode 100644 index 0000000..3ddbb75 --- /dev/null +++ b/tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_build_height_limit.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flowering_azalea_bonemeal_build_height_limit", + "description": "Bone meal on a flowering azalea at y=313 is consumed, but at y=314 the check that the tree's height stays inside the build limit fails, so the azalea stays an azalea and the bone meal is not consumed.", + "tags": ["vegetation", "flowering-azalea", "bone-meal", "build-height", "edge-case", "player"], + "minecraftIds": ["minecraft:flowering_azalea", "minecraft:grass_block", "minecraft:bone_meal"], + "setup": { + "cleanup": { + "region": [ [0, 0, -1], [3, 318, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -1], [3, 318, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 312, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [0, 313, 0], "block": {"id": "minecraft:flowering_azalea"} }, + { "pos": [3, 313, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [3, 314, 0], "block": {"id": "minecraft:flowering_azalea"} } + ] + }, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [0.5, 314, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { "slot": "hotbar1", "is": {"id": "minecraft:bone_meal", "count": 1} } + ] + }, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [3.5, 315, 0.5], "rot": [0, 90] }, + {"at": 9, "do": "interact"}, + { + "at": 11, + "do": "assert", + "checks": [ + { "pos": [3, 314, 0], "is": {"id": "minecraft:flowering_azalea" } }, + { "is": {"id": "minecraft:bone_meal" , "count": 1}, "slot": "hotbar1" } + ] + } + ], + "dependencies": [], + "breakpoints": [] +} + diff --git a/tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_consumed.json b/tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_consumed.json new file mode 100644 index 0000000..eec0d0a --- /dev/null +++ b/tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_consumed.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flowering_azalea_bonemeal_consumed", + "description": "A single bone meal on a flowering azalea in open air is always consumed (2 become 1), and the block is afterwards either still a flowering azalea or has become the base of an azalea tree (the growth roll succeeds 45% of the time).", + "tags": ["vegetation", "flowering-azalea", "bone-meal", "consumption", "player"], + "minecraftIds": [ + "minecraft:flowering_azalea", "minecraft:grass_block" , "minecraft:oak_log" , + "minecraft:bone_meal" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-5, 0, -5], [5, 14, 5] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-5, 0, -5], [5, 14, 5] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-5, 0, -5], [5, 0, 5] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:flowering_azalea"} } + ] + }, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 8, + "do": "assert", + "checks": [ + { + "pos": [ 0 , 1 , 0 ], + "is" : [ {"id": "minecraft:flowering_azalea"}, {"id": "minecraft:oak_log"} ] + }, + { "slot": "hotbar1", "is": {"id": "minecraft:bone_meal", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_grows_tree.json b/tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_grows_tree.json new file mode 100644 index 0000000..57bf7d8 --- /dev/null +++ b/tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_grows_tree.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flowering_azalea_bonemeal_grows_tree", + "description": "Repeated bone meal on a flowering azalea in open air eventually grows an azalea tree: the azalea is replaced by an oak log and the block below it becomes rooted dirt.", + "tags": ["vegetation", "flowering-azalea", "bone-meal", "growth", "tree", "player"], + "minecraftIds": [ + "minecraft:flowering_azalea", "minecraft:grass_block" , "minecraft:oak_log" , + "minecraft:rooted_dirt" , "minecraft:bone_meal" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-5, 0, -5], [5, 14, 5] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 40} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-5, 0, -5], [5, 14, 5] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-5, 0, -5], [5, 0, 5] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:flowering_azalea"} } + ] + }, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + { + "at": [ + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35 + ], + "do": "interact" + }, + { + "at": 37, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:rooted_dirt"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_log" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_rejected_under_water.json b/tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_rejected_under_water.json new file mode 100644 index 0000000..3862a45 --- /dev/null +++ b/tests/vegetation/flowering_azalea/flowering_azalea_bonemeal_rejected_under_water.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flowering_azalea_bonemeal_rejected_under_water", + "description": "Bone meal on a flowering azalea with a water source directly above it is not a valid azalea growth target, so the azalea stays; the item instead falls through to the water-plant path, turning the water above the sturdy top face into seagrass and consuming one bone meal.", + "tags": ["vegetation", "flowering-azalea", "bone-meal", "waterlogged", "seagrass", "player"], + "minecraftIds": [ + "minecraft:flowering_azalea", "minecraft:grass_block" , "minecraft:water" , + "minecraft:seagrass" , "minecraft:stone" , "minecraft:bone_meal" + ], + "setup": { + "cleanup": { + "region": [ [-2, 0, -2], [2, 5, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -2], [2, 5, 2] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -2], [2, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:flowering_azalea"} }, + { "pos": [ 1, 2, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 2, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, -1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 0], "block": {"id": "minecraft:water" } } + ] + }, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:flowering_azalea" } }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:seagrass" } }, + { "is": {"id": "minecraft:bone_meal" , "count": 1}, "slot": "hotbar1" } + ] + } + ], + "dependencies": [], + "breakpoints": [] +} + diff --git a/tests/vegetation/flowering_azalea/flowering_azalea_destroyed_by_piston.json b/tests/vegetation/flowering_azalea/flowering_azalea_destroyed_by_piston.json new file mode 100644 index 0000000..a669c1c --- /dev/null +++ b/tests/vegetation/flowering_azalea/flowering_azalea_destroyed_by_piston.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flowering_azalea_destroyed_by_piston", + "description": "An extending piston destroys a flowering azalea in front of it instead of pushing it, so the block behind the azalea is untouched and the azalea drops itself.", + "tags": ["vegetation", "flowering-azalea", "piston", "push-reaction", "drops"], + "minecraftIds": [ + "minecraft:flowering_azalea", "minecraft:piston" , "minecraft:redstone_block" , + "minecraft:dirt" , "minecraft:stone" , "minecraft:item" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [7, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [3, 1, 0], "block": {"id": "minecraft:piston", "facing": "east", "extended": false} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:dirt"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:flowering_azalea"} }, + { "pos": [5, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [4, 1, 0], "is": {"id": "minecraft:flowering_azalea"} } + ] + }, + { "at": 3, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [3, 1, 0], "is": {"id": "minecraft:piston" , "extended": true, "facing": "east"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east"} }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:stone" } } + ] + }, + { + "at": 10, + "do": "assert", + "checks": [ {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:flowering_azalea"} ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/flowering_azalea/flowering_azalea_has_collision.json b/tests/vegetation/flowering_azalea/flowering_azalea_has_collision.json new file mode 100644 index 0000000..0f14a58 --- /dev/null +++ b/tests/vegetation/flowering_azalea/flowering_azalea_has_collision.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flowering_azalea_has_collision", + "description": "An item entity dropped from above comes to rest on top of a flowering azalea at y+1, which shows that the block has a full-width collision shape up to the top of the block.", + "tags": ["vegetation", "flowering-azalea", "collision", "entity"], + "minecraftIds": ["minecraft:flowering_azalea", "minecraft:dirt", "minecraft:item", "minecraft:stick"], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 6, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 6, 1] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:flowering_azalea"} } + ] + }, + { + "at": 2, + "do": "summon", + "entity_alias": "stick", + "entity_type": "minecraft:item", + "pos": [0.5, 4, 0.5], + "nbt": {"Item": "{count: 1, id: \"minecraft:stick\"}", "PickupDelay": "32767s"} + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "is": "minecraft:item", "exists": true, "pos": [0.5, 2, 0.5], "position_tolerance": 0.05 } + ] + } + ], + "dependencies": [], + "breakpoints": [] +} + diff --git a/tests/vegetation/flowering_azalea/flowering_azalea_not_replaced_by_block_placement.json b/tests/vegetation/flowering_azalea/flowering_azalea_not_replaced_by_block_placement.json new file mode 100644 index 0000000..3856b49 --- /dev/null +++ b/tests/vegetation/flowering_azalea/flowering_azalea_not_replaced_by_block_placement.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flowering_azalea_not_replaced_by_block_placement", + "description": "Because a flowering azalea is not replaceable, placing a stone block against its top face puts the stone on top of it and leaves the azalea in place.", + "tags": ["vegetation", "flowering-azalea", "replaceable", "placement", "player"], + "minecraftIds": ["minecraft:flowering_azalea", "minecraft:dirt", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [3, 4, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:dirt"} }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:flowering_azalea"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [2.5, 1, 0.5], "rot": [90, 17] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [2.5, 6, 0.5] }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:flowering_azalea"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/flowering_azalea/flowering_azalea_placement_on_supports.json b/tests/vegetation/flowering_azalea/flowering_azalea_placement_on_supports.json new file mode 100644 index 0000000..f1eb98d --- /dev/null +++ b/tests/vegetation/flowering_azalea/flowering_azalea_placement_on_supports.json @@ -0,0 +1,77 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flowering_azalea_placement_on_supports", + "description": "Flowering azalea items placed on grass block, dirt, moss block, mud, farmland and clay create a flowering azalea on each and consume all six items; clay is accepted only because azalea adds it to the vegetation supports.", + "tags": ["vegetation", "flowering-azalea", "placement", "supports-azalea", "player"], + "minecraftIds": [ + "minecraft:flowering_azalea", "minecraft:grass_block" , "minecraft:dirt" , + "minecraft:moss_block" , "minecraft:mud" , "minecraft:farmland" , + "minecraft:clay" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [6, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:flowering_azalea", "count": 6} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [6, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [5, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:moss_block" } }, + { "pos": [3, 0, 0], "block": {"id": "minecraft:mud" } }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:farmland" } }, + { "pos": [5, 0, 0], "block": {"id": "minecraft:clay" } } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, + {"at": 7, "do": "interact"}, + { "at": 8, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 0.5], "rot": [0, 90] }, + {"at": 8, "do": "interact"}, + { "at": 9, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 0.5], "rot": [0, 90] }, + {"at": 9, "do": "interact"}, + { "at": 10, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 0.5], "rot": [0, 90] }, + {"at": 10, "do": "interact"}, + { "at": 11, "do": "tp", "entity_alias": "player", "pos": [2.5, 6, 0.5] }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:flowering_azalea"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:flowering_azalea"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:flowering_azalea"} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:flowering_azalea"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:flowering_azalea"} }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:flowering_azalea"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/flowering_azalea/flowering_azalea_placement_rejected_on_invalid_support.json b/tests/vegetation/flowering_azalea/flowering_azalea_placement_rejected_on_invalid_support.json new file mode 100644 index 0000000..324fc15 --- /dev/null +++ b/tests/vegetation/flowering_azalea/flowering_azalea_placement_rejected_on_invalid_support.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flowering_azalea_placement_rejected_on_invalid_support", + "description": "Flowering azalea items used on stone and sand do not place a flowering azalea and are not consumed, because neither block is in the azalea support tag.", + "tags": ["vegetation", "flowering-azalea", "placement", "supports-azalea", "player"], + "minecraftIds": ["minecraft:flowering_azalea", "minecraft:stone", "minecraft:sand"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, -1], [2, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:flowering_azalea", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, -1, -1], [2, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [1, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:sand"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:sand" } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:flowering_azalea", "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/flowering_azalea/flowering_azalea_support_loss.json b/tests/vegetation/flowering_azalea/flowering_azalea_support_loss.json new file mode 100644 index 0000000..d4be106 --- /dev/null +++ b/tests/vegetation/flowering_azalea/flowering_azalea_support_loss.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flowering_azalea_support_loss", + "description": "A flowering azalea on grass block or clay becomes air once the block beneath it is removed.", + "tags": ["vegetation", "flowering-azalea", "support", "neighbor-update"], + "minecraftIds": ["minecraft:flowering_azalea", "minecraft:grass_block", "minecraft:clay"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [6, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [6, 2, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [4, 1, 0], [5, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [4, 0, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [5, 0, 0], "block": {"id": "minecraft:clay" } }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:flowering_azalea"} }, + { "pos": [5, 1, 0], "block": {"id": "minecraft:flowering_azalea"} } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [4, 1, 0], "is": {"id": "minecraft:flowering_azalea"} }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:flowering_azalea"} } + ] + }, + { "at": 5, "do": "remove", "pos": [4, 0, 0] }, + { "at": 5, "do": "remove", "pos": [5, 0, 0] }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [4, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [5, 0, 0], "is": {"id": "minecraft:air"} }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/flowering_azalea/flowering_azalea_water_interaction.json b/tests/vegetation/flowering_azalea/flowering_azalea_water_interaction.json new file mode 100644 index 0000000..53fc36f --- /dev/null +++ b/tests/vegetation/flowering_azalea/flowering_azalea_water_interaction.json @@ -0,0 +1,73 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "flowering_azalea_water_interaction", + "description": "Water flowing sideways into a flowering azalea washes it away, because its side faces are not full, while a water source directly above it leaves it in place, because its top face is full.", + "tags": ["vegetation", "flowering-azalea", "water", "fluid", "fluid-interaction"], + "minecraftIds": ["minecraft:flowering_azalea", "minecraft:dirt", "minecraft:water", "minecraft:stone"], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [7, 4, 5] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [7, 4, 5] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [7, 0, 5] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [ 1, 0, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:flowering_azalea"} }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 2, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 1, 1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 1, 1, -1], "block": {"id": "minecraft:stone" } }, + { "pos": [ 5, 0, 4], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 5, 1, 4], "block": {"id": "minecraft:flowering_azalea"} }, + { "pos": [ 4, 1, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [ 6, 1, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [ 5, 1, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [ 5, 1, 5], "block": {"id": "minecraft:stone" } }, + { "pos": [ 4, 2, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [ 6, 2, 4], "block": {"id": "minecraft:stone" } }, + { "pos": [ 5, 2, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [ 5, 2, 5], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:water" } }, + { "pos": [ 5, 2, 4], "block": {"id": "minecraft:water" } } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:flowering_azalea"} }, + { "pos": [5, 1, 4], "is": {"id": "minecraft:flowering_azalea"} } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:water" } }, + { "pos": [5, 1, 4], "is": {"id": "minecraft:flowering_azalea"} }, + { "pos": [5, 2, 4], "is": {"id": "minecraft:water" } } + ] + } + ], + "dependencies": [], + "breakpoints": [] +} + From 23a75ff412e6c9444990b23b6bb2e24b181653b7 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sun, 1 Nov 2026 05:32:37 +0100 Subject: [PATCH 65/85] Add Flint tests for ice (2 blocks) --- ...osted_ice_ages_and_melts_in_sky_light.json | 110 ++++++++++++++++++ ...ed_ice_ignores_other_neighbor_changes.json | 89 ++++++++++++++ ...osted_ice_max_age_melts_on_first_tick.json | 79 +++++++++++++ .../frosted_ice_melt_chain_reaction.json | 50 ++++++++ ...ts_when_frosted_ice_placed_next_to_it.json | 74 ++++++++++++ .../frosted_ice_stable_at_midnight.json | 81 +++++++++++++ .../frosted_ice_stable_in_darkness.json | 48 ++++++++ ...osted_ice_survives_with_two_neighbors.json | 67 +++++++++++ .../ice/ice_block_light_threshold.json | 51 ++++++++ .../decoration/ice/ice_ignores_sky_light.json | 70 +++++++++++ .../decoration/ice/ice_melt_water_flows.json | 58 +++++++++ .../ice/ice_melts_in_block_light.json | 43 +++++++ 12 files changed, 820 insertions(+) create mode 100644 tests/decoration/frosted_ice/frosted_ice_ages_and_melts_in_sky_light.json create mode 100644 tests/decoration/frosted_ice/frosted_ice_ignores_other_neighbor_changes.json create mode 100644 tests/decoration/frosted_ice/frosted_ice_max_age_melts_on_first_tick.json create mode 100644 tests/decoration/frosted_ice/frosted_ice_melt_chain_reaction.json create mode 100644 tests/decoration/frosted_ice/frosted_ice_melts_when_frosted_ice_placed_next_to_it.json create mode 100644 tests/decoration/frosted_ice/frosted_ice_stable_at_midnight.json create mode 100644 tests/decoration/frosted_ice/frosted_ice_stable_in_darkness.json create mode 100644 tests/decoration/frosted_ice/frosted_ice_survives_with_two_neighbors.json create mode 100644 tests/decoration/ice/ice_block_light_threshold.json create mode 100644 tests/decoration/ice/ice_ignores_sky_light.json create mode 100644 tests/decoration/ice/ice_melt_water_flows.json create mode 100644 tests/decoration/ice/ice_melts_in_block_light.json diff --git a/tests/decoration/frosted_ice/frosted_ice_ages_and_melts_in_sky_light.json b/tests/decoration/frosted_ice/frosted_ice_ages_and_melts_in_sky_light.json new file mode 100644 index 0000000..84dc5df --- /dev/null +++ b/tests/decoration/frosted_ice/frosted_ice_ages_and_melts_in_sky_light.json @@ -0,0 +1,110 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "frosted_ice_ages_and_melts_in_sky_light", + "description": "Frosted ice uses the highest of sky and block light. Time is set to noon (6000). An inverted daylight detector outputs 15 minus the effective sky light; power 0-3 confirms effective sky light of at least 12 (rain darkens the sky by 3), so the frosted ice, open to the sky in a stone pit, sees at least 11 (sky light loses 1 entering it). That is above 11 - age - 1 at every age. A lone block always has fewer than 4 frosted neighbours, so each scheduled tick ages it by 1 and at age 3 it melts into a water source. Every age change runs onPlace again, which schedules the next tick 60-120 ticks later; the 20-40 tick reschedule in tick() is dropped as a duplicate. So the 4 steps take 240-480 ticks: age 0 until at least +60, age 1-2 at +121, not yet water at +239, water by +481.", + "tags": ["frosted-ice", "melting", "scheduled-tick", "light", "sky-light", "block-state"], + "minecraftIds": ["minecraft:frosted_ice", "minecraft:water", "minecraft:daylight_detector"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + }, + "world": { + "time": "6000", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 3 + }, + "weather": "clear" + } + }, + "timeline": [ + { + "at": 0, + "do": "assert", + "checks": [ {"time": 6000} ] + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [2, 2, 0], "block": {"id": "minecraft:daylight_detector", "inverted": true} }, + { + "at": 25, + "do": "assert", + "checks": [ + { + "pos": [2, 2, 0], + "is": [ + {"id": "minecraft:daylight_detector", "power": 0}, + {"id": "minecraft:daylight_detector", "power": 1}, + {"id": "minecraft:daylight_detector", "power": 2}, + {"id": "minecraft:daylight_detector", "power": 3} + ] + } + ] + }, + { "at": 25, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:frosted_ice", "age": 0} }, + { + "at": 26, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} } + ] + }, + { + "at": 84, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} } + ] + }, + { + "at": 146, + "do": "assert", + "checks": [ + { + "pos": [ 0 , 1 , 0 ], + "is" : [ {"id": "minecraft:frosted_ice", "age": 1}, {"id": "minecraft:frosted_ice", "age": 2} ] + } + ] + }, + { + "at": 263, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": [ + {"id": "minecraft:frosted_ice", "age": 1}, + {"id": "minecraft:frosted_ice", "age": 2}, + {"id": "minecraft:frosted_ice", "age": 3} + ] + } + ] + }, + { + "at": 507, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, + { + "pos": [2, 2, 0], + "is": [ + {"id": "minecraft:daylight_detector", "power": 0}, + {"id": "minecraft:daylight_detector", "power": 1}, + {"id": "minecraft:daylight_detector", "power": 2}, + {"id": "minecraft:daylight_detector", "power": 3} + ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/frosted_ice/frosted_ice_ignores_other_neighbor_changes.json b/tests/decoration/frosted_ice/frosted_ice_ignores_other_neighbor_changes.json new file mode 100644 index 0000000..d507aa9 --- /dev/null +++ b/tests/decoration/frosted_ice/frosted_ice_ignores_other_neighbor_changes.json @@ -0,0 +1,89 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "frosted_ice_ignores_other_neighbor_changes", + "description": "Everything is sealed in stone, so there is no light and frosted ice never ages or melts on its own. Flint places blocks with /setblock and /fill, which notify neighbours with the new block (ServerLevel.updateNeighboursOnBlockSet), while a melting block notifies its neighbours with the old block, frosted ice. Frosted ice only reacts to a neighbour update that comes from frosted ice. In a 2x2 square filled at once, removing one corner with /setblock air notifies with air, so the two blocks next to it stay even though each now has only 1 frosted neighbour. Placing stone into the gap notifies with stone, and they still stay.", + "tags": ["frosted-ice", "neighbor-update", "block-update"], + "minecraftIds": ["minecraft:frosted_ice"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [2, 2, 2] ] + }, + "world": { + "time": "6000", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 3 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [2, 2, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [0, 1, 0], [1, 1, 1] ], + "with": {"id": "minecraft:frosted_ice", "age": 0} + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } + ] + }, + { "at": 5, "do": "remove", "pos": [1, 1, 1] }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } + ] + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } + ] + }, + { "at": 10, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:stone"} }, + { + "at": 11, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } + ] + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/frosted_ice/frosted_ice_max_age_melts_on_first_tick.json b/tests/decoration/frosted_ice/frosted_ice_max_age_melts_on_first_tick.json new file mode 100644 index 0000000..32211f4 --- /dev/null +++ b/tests/decoration/frosted_ice/frosted_ice_max_age_melts_on_first_tick.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "frosted_ice_max_age_melts_on_first_tick", + "description": "Frosted ice placed at age 3 melts into a water source on its first scheduled tick (60-120 ticks after placement; flint ticks can lag the game tick by one, hence the margin), because at age 3 the next step is melting instead of ageing. Time is set to noon (6000); an inverted daylight detector at power 0-3 confirms effective sky light of at least 12, so the ice in an open stone pit sees at least 11, above the age-3 threshold of 11 - 3 - 1 = 7.", + "tags": ["frosted-ice", "melting", "scheduled-tick", "light", "sky-light", "block-state"], + "minecraftIds": ["minecraft:frosted_ice", "minecraft:water", "minecraft:daylight_detector"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + }, + "world": { + "time": "6000", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 3 + }, + "weather": "clear" + } + }, + "timeline": [ + { + "at": 0, + "do": "assert", + "checks": [ {"time": 6000} ] + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [2, 2, 0], "block": {"id": "minecraft:daylight_detector", "inverted": true} }, + { + "at": 25, + "do": "assert", + "checks": [ + { + "pos": [2, 2, 0], + "is": [ + {"id": "minecraft:daylight_detector", "power": 0}, + {"id": "minecraft:daylight_detector", "power": 1}, + {"id": "minecraft:daylight_detector", "power": 2}, + {"id": "minecraft:daylight_detector", "power": 3} + ] + } + ] + }, + { "at": 25, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:frosted_ice", "age": 3} }, + { + "at": 80, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 3} } + ] + }, + { + "at": 147, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, + { + "pos": [2, 2, 0], + "is": [ + {"id": "minecraft:daylight_detector", "power": 0}, + {"id": "minecraft:daylight_detector", "power": 1}, + {"id": "minecraft:daylight_detector", "power": 2}, + {"id": "minecraft:daylight_detector", "power": 3} + ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/frosted_ice/frosted_ice_melt_chain_reaction.json b/tests/decoration/frosted_ice/frosted_ice_melt_chain_reaction.json new file mode 100644 index 0000000..ad89b50 --- /dev/null +++ b/tests/decoration/frosted_ice/frosted_ice_melt_chain_reaction.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "frosted_ice_melt_chain_reaction", + "description": "Everything is sealed in stone, so there is no light and frosted ice never ages or melts on its own. Flint places blocks with /setblock and /fill, which notify neighbours with the new block (ServerLevel.updateNeighboursOnBlockSet), while a melting block notifies its neighbours with the old block, frosted ice. Filling a straight line of five frosted ice blocks at once notifies every block with frosted ice. The two ends have only 1 frosted neighbour and melt. Each melt notifies the next block in the line, which by then has only 1 frosted neighbour, so the melting runs along the whole line in the same tick, even through the middle blocks that had 2 neighbours when they were placed.", + "tags": ["frosted-ice", "melting", "neighbor-update", "chain-reaction"], + "minecraftIds": ["minecraft:frosted_ice", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 2, 1] ] + }, + "world": { + "time": "6000", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 3 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 2, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [0, 1, 0], [4, 1, 0] ], + "with": {"id": "minecraft:frosted_ice", "age": 0} + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:water", "level": 0} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/frosted_ice/frosted_ice_melts_when_frosted_ice_placed_next_to_it.json b/tests/decoration/frosted_ice/frosted_ice_melts_when_frosted_ice_placed_next_to_it.json new file mode 100644 index 0000000..7736c6c --- /dev/null +++ b/tests/decoration/frosted_ice/frosted_ice_melts_when_frosted_ice_placed_next_to_it.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "frosted_ice_melts_when_frosted_ice_placed_next_to_it", + "description": "Everything is sealed in stone, so there is no light and frosted ice never ages or melts on its own. Flint places blocks with /setblock and /fill, which notify neighbours with the new block (ServerLevel.updateNeighboursOnBlockSet), while a melting block notifies its neighbours with the old block, frosted ice. Frosted ice melts straight away when a neighbour update comes from frosted ice and it has fewer than 2 frosted neighbours. A 2x2 square is filled at once (every block has 2 frosted neighbours, so it stays), one corner is removed, and a lone frosted ice block is placed next to the gap. Placing frosted ice back into the gap notifies the lone block, which has 1 frosted neighbour and melts into a water source. The refilled corner and the rest of the square have 2 frosted neighbours each, so they stay.", + "tags": ["frosted-ice", "melting", "neighbor-update"], + "minecraftIds": ["minecraft:frosted_ice", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 2] ] + }, + "world": { + "time": "6000", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 3 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 2, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [1, 1, 0], [2, 1, 1] ], + "with": {"id": "minecraft:frosted_ice", "age": 0} + }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } + ] + }, + { "at": 3, "do": "remove", "pos": [1, 1, 0] }, + { "at": 5, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:frosted_ice", "age": 0} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } + ] + }, + { "at": 8, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:frosted_ice", "age": 0} }, + { + "at": 9, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water" , "level": 0 } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [2, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/frosted_ice/frosted_ice_stable_at_midnight.json b/tests/decoration/frosted_ice/frosted_ice_stable_at_midnight.json new file mode 100644 index 0000000..bc88da2 --- /dev/null +++ b/tests/decoration/frosted_ice/frosted_ice_stable_at_midnight.json @@ -0,0 +1,81 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "frosted_ice_stable_at_midnight", + "description": "At midnight (18000) the sky darkens by 11, so frosted ice open to the sky sees too little light to age or melt. An inverted daylight detector at power 11-15 confirms effective sky light of 4 or less, so the ice in an open stone pit sees 3 or less, below 11 - 0 - 1 = 10 at age 0. It stays at age 0 for 240 ticks.", + "tags": ["frosted-ice", "scheduled-tick", "light", "sky-light", "night", "block-state"], + "minecraftIds": ["minecraft:frosted_ice", "minecraft:daylight_detector"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + }, + "world": { + "time": "18000", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 3 + }, + "weather": "clear" + } + }, + "timeline": [ + { + "at": 0, + "do": "assert", + "checks": [ {"time": 18000} ] + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [2, 2, 0], "block": {"id": "minecraft:daylight_detector", "inverted": true} }, + { + "at": 25, + "do": "assert", + "checks": [ + { + "pos": [2, 2, 0], + "is": [ + {"id": "minecraft:daylight_detector", "power": 11}, + {"id": "minecraft:daylight_detector", "power": 12}, + {"id": "minecraft:daylight_detector", "power": 13}, + {"id": "minecraft:daylight_detector", "power": 14}, + {"id": "minecraft:daylight_detector", "power": 15} + ] + } + ] + }, + { "at": 25, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:frosted_ice", "age": 0} }, + { + "at": 145, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} } + ] + }, + { + "at": 265, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { + "pos": [2, 2, 0], + "is": [ + {"id": "minecraft:daylight_detector", "power": 11}, + {"id": "minecraft:daylight_detector", "power": 12}, + {"id": "minecraft:daylight_detector", "power": 13}, + {"id": "minecraft:daylight_detector", "power": 14}, + {"id": "minecraft:daylight_detector", "power": 15} + ] + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/frosted_ice/frosted_ice_stable_in_darkness.json b/tests/decoration/frosted_ice/frosted_ice_stable_in_darkness.json new file mode 100644 index 0000000..11c1947 --- /dev/null +++ b/tests/decoration/frosted_ice/frosted_ice_stable_in_darkness.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "frosted_ice_stable_in_darkness", + "description": "Frosted ice sealed in stone gets no sky or block light, so it never passes the light check (light must be above 11 - age - 1 = 10 at age 0). Even at noon it keeps rescheduling its tick without ageing and stays at age 0 for 240 ticks.", + "tags": ["frosted-ice", "scheduled-tick", "light", "darkness", "block-state"], + "minecraftIds": ["minecraft:frosted_ice"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 1] ] + }, + "world": { + "time": "6000", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 3 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 2, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:frosted_ice", "age": 0} }, + { + "at": 121, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} } + ] + }, + { + "at": 241, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/frosted_ice/frosted_ice_survives_with_two_neighbors.json b/tests/decoration/frosted_ice/frosted_ice_survives_with_two_neighbors.json new file mode 100644 index 0000000..29d1b6e --- /dev/null +++ b/tests/decoration/frosted_ice/frosted_ice_survives_with_two_neighbors.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "frosted_ice_survives_with_two_neighbors", + "description": "Everything is sealed in stone, so there is no light and frosted ice never ages or melts on its own. Flint places blocks with /setblock and /fill, which notify neighbours with the new block (ServerLevel.updateNeighboursOnBlockSet), while a melting block notifies its neighbours with the old block, frosted ice. Frosted ice only melts from a frosted-ice neighbour update if it has fewer than 2 frosted neighbours. A 2x2 square filled at once gives every block exactly 2 frosted neighbours, so the whole square stays at age 0. A pair filled at once in a separate stone pocket gives each block only 1, so both melt into water sources.", + "tags": ["frosted-ice", "melting", "neighbor-update", "threshold"], + "minecraftIds": ["minecraft:frosted_ice", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [6, 2, 2] ] + }, + "world": { + "time": "6000", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 3 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [6, 2, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [0, 1, 0], [1, 1, 1] ], + "with": {"id": "minecraft:frosted_ice", "age": 0} + }, + { + "at": 1, + "do": "fill", + "region": [ [4, 1, 0], [5, 1, 0] ], + "with": {"id": "minecraft:frosted_ice", "age": 0} + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0 } }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0 } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0 } }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0 } }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:water" , "level": 0} }, + { "pos": [5, 1, 0], "is": {"id": "minecraft:water" , "level": 0} } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/ice/ice_block_light_threshold.json b/tests/decoration/ice/ice_block_light_threshold.json new file mode 100644 index 0000000..77346b8 --- /dev/null +++ b/tests/decoration/ice/ice_block_light_threshold.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ice_block_light_threshold", + "description": "Ice melts on a random tick only when block light at its position is greater than 11 - light dampening 1 = 10. Each ice block sits in a stone pit with a light block directly above; light entering ice loses 1 level. A level 11 light block gives block light 10 at the ice and it stays ice; a level 12 light block gives 11 and it melts into a water source. The pits are 4 blocks apart so each light block only affects its own ice. Random tick speed 4096 gives about one random tick per block per game tick.", + "tags": ["ice", "melting", "random-tick", "light", "threshold", "modifies-gamerule"], + "minecraftIds": ["minecraft:ice", "minecraft:water", "minecraft:light"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 2, 1] ] + }, + "world": { + "time": "6000", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:ice" } }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:ice" } }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:light", "level": 11, "waterlogged": false} }, + { "pos": [4, 2, 0], "block": {"id": "minecraft:light", "level": 12, "waterlogged": false} } + ] + }, + { + "at": 121, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:ice" } }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:water", "level": 0} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/ice/ice_ignores_sky_light.json b/tests/decoration/ice/ice_ignores_sky_light.json new file mode 100644 index 0000000..014fa6a --- /dev/null +++ b/tests/decoration/ice/ice_ignores_sky_light.json @@ -0,0 +1,70 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ice_ignores_sky_light", + "description": "Ice melting only looks at block light (threshold above 11 - light dampening 1 = 10), never sky light. At noon (time 6000) ice under open sky with block light 0 stays ice for 200 ticks at random tick speed 4096. An inverted daylight detector at the same height outputs 15 minus the effective sky light; power 0-3 confirms effective sky light 12-15 there (rain darkens the sky by 3), so the ice block itself sees sky light of at least 11, which would be enough to melt it if sky light counted.", + "tags": ["ice", "melting", "random-tick", "light", "sky-light", "modifies-gamerule"], + "minecraftIds": ["minecraft:ice", "minecraft:daylight_detector"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 1, 1] ] + }, + "world": { + "time": "6000", + "weather": "clear", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "assert", + "checks": [ {"time": 6000} ] + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:ice" } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:daylight_detector", "inverted": true} } + ] + }, + { + "at": 25, + "do": "assert", + "checks": [ + { + "pos": [2, 1, 0], + "is": [ + {"id": "minecraft:daylight_detector", "power": 0}, + {"id": "minecraft:daylight_detector", "power": 1}, + {"id": "minecraft:daylight_detector", "power": 2}, + {"id": "minecraft:daylight_detector", "power": 3} + ] + }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:ice"} } + ] + }, + { + "at": 201, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:ice"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/ice/ice_melt_water_flows.json b/tests/decoration/ice/ice_melt_water_flows.json new file mode 100644 index 0000000..17fbf90 --- /dev/null +++ b/tests/decoration/ice/ice_melt_water_flows.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ice_melt_water_flows", + "description": "When ice melts it becomes a water source and notifies itself of the change, so the new water starts flowing straight away. Ice with glowstone above (block light 14) at the closed end of a walled channel 3 blocks long melts. The source stays at level 0 and spreads into the channel as flowing water, level 1 then level 2.", + "tags": ["ice", "melting", "random-tick", "water", "flow", "modifies-gamerule"], + "minecraftIds": ["minecraft:ice", "minecraft:water", "minecraft:glowstone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + }, + "world": { + "time": "6000", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [1, 1, 0], [2, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:ice"} }, + { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:glowstone"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} } + ] + }, + { + "at": 81, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water", "level": 1} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:water", "level": 2} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/ice/ice_melts_in_block_light.json b/tests/decoration/ice/ice_melts_in_block_light.json new file mode 100644 index 0000000..94bb096 --- /dev/null +++ b/tests/decoration/ice/ice_melts_in_block_light.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "ice_melts_in_block_light", + "description": "Ice with glowstone directly above (block light 14 at the ice, above the threshold of 11 - light dampening 1 = 10) melts into a water source on a random tick. The ice sits in a stone pit so the water stays put. With random tick speed 4096 each block gets about one random tick per game tick, so not melting within 60 ticks is practically impossible.", + "tags": ["ice", "melting", "random-tick", "light", "modifies-gamerule"], + "minecraftIds": ["minecraft:ice", "minecraft:water", "minecraft:glowstone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 1] ] + }, + "world": { + "time": "6000", + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:ice"} }, + { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:glowstone"} }, + { + "at": 61, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water" , "level": 0} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:glowstone" } } + ] + } + ], + "breakpoints": [] +} + From 579f364827c227b556a290a76a8b5d0cd3e76627 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sun, 1 Nov 2026 05:44:48 +0100 Subject: [PATCH 66/85] Add Flint tests for furnace (1 blocks) --- .../furnace/furnace_comparator_signal.json | 72 ++++++++++++++++ .../furnace_cooking_progress_advances.json | 49 +++++++++++ .../furnace_cooking_progress_cools_down.json | 55 ++++++++++++ ...different_result_item_blocks_smelting.json | 50 +++++++++++ ...ace_explosion_drops_self_and_contents.json | 54 ++++++++++++ .../furnace/furnace_fuel_burns_out.json | 85 +++++++++++++++++++ ...rnace_fuel_without_input_not_consumed.json | 43 ++++++++++ ...nace_full_result_slot_blocks_smelting.json | 50 +++++++++++ ...rnace_hopper_above_inserts_into_input.json | 71 ++++++++++++++++ ...per_below_extracts_result_and_buckets.json | 73 ++++++++++++++++ ...furnace_hopper_side_inserts_only_fuel.json | 65 ++++++++++++++ ...rnace_lava_bucket_leaves_empty_bucket.json | 50 +++++++++++ .../furnace_placement_faces_player.json | 52 ++++++++++++ .../furnace/furnace_smelts_raw_iron.json | 69 +++++++++++++++ .../furnace_unsmeltable_input_not_cooked.json | 48 +++++++++++ ...nace_wet_sponge_turns_bucket_to_water.json | 69 +++++++++++++++ 16 files changed, 955 insertions(+) create mode 100644 tests/container/furnace/furnace_comparator_signal.json create mode 100644 tests/container/furnace/furnace_cooking_progress_advances.json create mode 100644 tests/container/furnace/furnace_cooking_progress_cools_down.json create mode 100644 tests/container/furnace/furnace_different_result_item_blocks_smelting.json create mode 100644 tests/container/furnace/furnace_explosion_drops_self_and_contents.json create mode 100644 tests/container/furnace/furnace_fuel_burns_out.json create mode 100644 tests/container/furnace/furnace_fuel_without_input_not_consumed.json create mode 100644 tests/container/furnace/furnace_full_result_slot_blocks_smelting.json create mode 100644 tests/container/furnace/furnace_hopper_above_inserts_into_input.json create mode 100644 tests/container/furnace/furnace_hopper_below_extracts_result_and_buckets.json create mode 100644 tests/container/furnace/furnace_hopper_side_inserts_only_fuel.json create mode 100644 tests/container/furnace/furnace_lava_bucket_leaves_empty_bucket.json create mode 100644 tests/container/furnace/furnace_placement_faces_player.json create mode 100644 tests/container/furnace/furnace_smelts_raw_iron.json create mode 100644 tests/container/furnace/furnace_unsmeltable_input_not_cooked.json create mode 100644 tests/container/furnace/furnace_wet_sponge_turns_bucket_to_water.json diff --git a/tests/container/furnace/furnace_comparator_signal.json b/tests/container/furnace/furnace_comparator_signal.json new file mode 100644 index 0000000..0707061 --- /dev/null +++ b/tests/container/furnace/furnace_comparator_signal.json @@ -0,0 +1,72 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_comparator_signal", + "description": "A comparator reading a furnace outputs 0 when empty, 1 with a single item and 5 with a full stack in one of its three slots (floor(1/3 * 14) + 1).", + "tags": ["container", "furnace", "block-entity", "comparator", "redstone"], + "minecraftIds": ["minecraft:furnace", "minecraft:comparator", "minecraft:stone", "minecraft:dirt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [1, 0, 4] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [1, 1, 0], "block": {"id": "minecraft:comparator", "facing": "west"} }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:comparator", "facing": "west"} }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:comparator", "facing": "west"} } + ] + }, + { + "at": 2, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:furnace"} }, + { + "pos": [0, 1, 2], + "block": { + "id": "minecraft:furnace", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:dirt\"}]"} + } + }, + { + "pos": [0, 1, 4], + "block": { + "id": "minecraft:furnace", + "nbt": {"Items": "[{Slot: 0b, count: 64, id: \"minecraft:dirt\"}]"} + } + } + ] + }, + { + "at": 6, + "do": "assert", + "checks": [ + { + "pos": [1, 1, 0], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 0} } + }, + { + "pos": [1, 1, 2], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 1} } + }, + { + "pos": [1, 1, 4], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 5} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_cooking_progress_advances.json b/tests/container/furnace/furnace_cooking_progress_advances.json new file mode 100644 index 0000000..ac01767 --- /dev/null +++ b/tests/container/furnace/furnace_cooking_progress_advances.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_cooking_progress_advances", + "description": "While lit and smelting, a furnace advances cooking_time_spent every tick and keeps the result slot empty until the cooking time is reached.", + "tags": ["container", "furnace", "block-entity", "smelting"], + "minecraftIds": ["minecraft:furnace", "minecraft:raw_iron", "minecraft:coal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "cooking_total_time": "200s", + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}]" + } + } + }, + { + "at": 20, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "true", + "nbt": { + "cooking_time_spent": "20s" , + "cooking_total_time": "200s" , + "Items[0].id" : "minecraft:raw_iron", + "Items[0].Slot" : "0b" + } + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_cooking_progress_cools_down.json b/tests/container/furnace/furnace_cooking_progress_cools_down.json new file mode 100644 index 0000000..5abf78e --- /dev/null +++ b/tests/container/furnace/furnace_cooking_progress_cools_down.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_cooking_progress_cools_down", + "description": "An unlit furnace with no fuel loses 2 points of cooking progress per tick and stops at 0.", + "tags": ["container", "furnace", "block-entity", "smelting"], + "minecraftIds": ["minecraft:furnace", "minecraft:raw_iron"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "cooking_time_spent": "50s" , + "cooking_total_time": "200s" , + "Items" : "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}]" + } + } + }, + { + "at": 10, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { "id": "minecraft:furnace", "lit": "false", "nbt": {"cooking_time_spent": "30s"} } + } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "false", + "nbt": {"cooking_time_spent": "0s", "Items[0].id": "minecraft:raw_iron"} + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_different_result_item_blocks_smelting.json b/tests/container/furnace/furnace_different_result_item_blocks_smelting.json new file mode 100644 index 0000000..b55e7b8 --- /dev/null +++ b/tests/container/furnace/furnace_different_result_item_blocks_smelting.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_different_result_item_blocks_smelting", + "description": "A furnace whose result slot holds a different item than the recipe output does not smelt, stays unlit and keeps its fuel.", + "tags": ["container", "furnace", "block-entity", "smelting", "fuel"], + "minecraftIds": ["minecraft:furnace", "minecraft:raw_iron", "minecraft:coal", "minecraft:gold_ingot"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}, {Slot: 2b, count: 1, id: \"minecraft:gold_ingot\"}]" + } + } + }, + { + "at": 10, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "false", + "nbt": { + "lit_total_time": "0s", + "Items[0].id": "minecraft:raw_iron", + "Items[1].id": "minecraft:coal", + "Items[1].count": 1, + "Items[2].id": "minecraft:gold_ingot", + "Items[2].count": 1 + } + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_explosion_drops_self_and_contents.json b/tests/container/furnace/furnace_explosion_drops_self_and_contents.json new file mode 100644 index 0000000..5f87129 --- /dev/null +++ b/tests/container/furnace/furnace_explosion_drops_self_and_contents.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_explosion_drops_self_and_contents", + "description": "A furnace destroyed by an explosion drops itself as one item and spills the contents of its input, fuel and result slots, giving four item entities in total.", + "tags": ["container", "furnace", "block-entity", "drops", "explosion"], + "minecraftIds": [ + "minecraft:furnace" , "minecraft:tnt" , "minecraft:obsidian" , "minecraft:item" , + "minecraft:dirt" , "minecraft:coal" , "minecraft:iron_ingot" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [8, 4, 8] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [4, 0, 4], [8, 0, 8] ], + "with": {"id": "minecraft:obsidian"} + }, + { + "at": 1, + "do": "place", + "pos": [6, 1, 6], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:dirt\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}, {Slot: 2b, count: 1, id: \"minecraft:iron_ingot\"}]" + } + } + }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [6.5, 1, 5.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [6, 1, 6], "is": {"id": "minecraft:air"} }, + { "is": "minecraft:item" , "exists": true, "count": 4 } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_fuel_burns_out.json b/tests/container/furnace/furnace_fuel_burns_out.json new file mode 100644 index 0000000..504bf2b --- /dev/null +++ b/tests/container/furnace/furnace_fuel_burns_out.json @@ -0,0 +1,85 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_fuel_burns_out", + "description": "A furnace fed one oak fence (300 ticks of fuel) smelts one of two raw iron, then turns unlit once the fuel runs out and leaves the second raw iron unsmelted.", + "tags": ["container", "furnace", "block-entity", "smelting", "fuel"], + "minecraftIds": ["minecraft:furnace", "minecraft:raw_iron", "minecraft:oak_fence", "minecraft:iron_ingot"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "cooking_total_time": "200s", + "Items": "[{Slot: 0b, count: 2, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:oak_fence\"}]" + } + } + }, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "true", + "nbt": {"lit_total_time": "300s", "Items[0].count": 2, "Items[0].id": "minecraft:raw_iron"} + } + } + ] + }, + { + "at": 215, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "true", + "nbt": { + "Items[0].id": "minecraft:raw_iron", + "Items[0].count": 1, + "Items[1].id": "minecraft:iron_ingot", + "Items[1].count": 1 + } + } + } + ] + }, + { + "at": 330, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "false", + "nbt": { + "lit_time_remaining": "0s", + "Items[0].id": "minecraft:raw_iron", + "Items[0].count": 1, + "Items[0].Slot": "0b", + "Items[1].id": "minecraft:iron_ingot", + "Items[1].count": 1, + "Items[1].Slot": "2b" + } + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_fuel_without_input_not_consumed.json b/tests/container/furnace/furnace_fuel_without_input_not_consumed.json new file mode 100644 index 0000000..ccc79ee --- /dev/null +++ b/tests/container/furnace/furnace_fuel_without_input_not_consumed.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_fuel_without_input_not_consumed", + "description": "A furnace with fuel but an empty input slot stays unlit and keeps its fuel.", + "tags": ["container", "furnace", "block-entity", "fuel"], + "minecraftIds": ["minecraft:furnace", "minecraft:coal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { "id": "minecraft:furnace", "nbt": {"Items": "[{Slot: 1b, count: 1, id: \"minecraft:coal\"}]"} } + }, + { + "at": 10, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "false", + "nbt": { + "lit_total_time": "0s", + "Items[0].id": "minecraft:coal", + "Items[0].Slot": "1b", + "Items[0].count": 1 + } + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_full_result_slot_blocks_smelting.json b/tests/container/furnace/furnace_full_result_slot_blocks_smelting.json new file mode 100644 index 0000000..8603863 --- /dev/null +++ b/tests/container/furnace/furnace_full_result_slot_blocks_smelting.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_full_result_slot_blocks_smelting", + "description": "A furnace whose result slot already holds a full stack of the output item does not smelt, stays unlit and keeps its fuel.", + "tags": ["container", "furnace", "block-entity", "smelting", "fuel"], + "minecraftIds": ["minecraft:furnace", "minecraft:raw_iron", "minecraft:coal", "minecraft:iron_ingot"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}, {Slot: 2b, count: 64, id: \"minecraft:iron_ingot\"}]" + } + } + }, + { + "at": 10, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "false", + "nbt": { + "lit_total_time": "0s", + "Items[0].id": "minecraft:raw_iron", + "Items[1].id": "minecraft:coal", + "Items[1].count": 1, + "Items[2].id": "minecraft:iron_ingot", + "Items[2].count": 64 + } + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_hopper_above_inserts_into_input.json b/tests/container/furnace/furnace_hopper_above_inserts_into_input.json new file mode 100644 index 0000000..7b246de --- /dev/null +++ b/tests/container/furnace/furnace_hopper_above_inserts_into_input.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_hopper_above_inserts_into_input", + "description": "A hopper above a furnace inserts any item into the input slot, including coal, which does not go to the fuel slot.", + "tags": ["container", "furnace", "block-entity", "hopper", "item-transfer"], + "minecraftIds": ["minecraft:furnace", "minecraft:hopper", "minecraft:raw_iron", "minecraft:coal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:furnace"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:hopper", + "facing": "down", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}]"} + } + }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:furnace"} }, + { + "pos": [2, 1, 0], + "block": { + "id": "minecraft:hopper", + "facing": "down", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:coal\"}]"} + } + } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "nbt": {"Items[0].id": "minecraft:raw_iron", "Items[0].Slot": "0b", "Items[0].count": 1} + } + }, + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:hopper", "nbt": {"Items": []} } + }, + { + "pos": [2, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "false", + "nbt": {"Items[0].id": "minecraft:coal", "Items[0].Slot": "0b", "Items[0].count": 1} + } + }, + { + "pos": [2, 1, 0], + "is": { "id": "minecraft:hopper", "nbt": {"Items": []} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_hopper_below_extracts_result_and_buckets.json b/tests/container/furnace/furnace_hopper_below_extracts_result_and_buckets.json new file mode 100644 index 0000000..fcfacab --- /dev/null +++ b/tests/container/furnace/furnace_hopper_below_extracts_result_and_buckets.json @@ -0,0 +1,73 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_hopper_below_extracts_result_and_buckets", + "description": "A hopper below a furnace pulls the result slot but not coal from the fuel slot, and does pull an empty bucket from the fuel slot.", + "tags": ["container", "furnace", "block-entity", "hopper", "item-transfer"], + "minecraftIds": [ + "minecraft:furnace" , "minecraft:hopper" , "minecraft:iron_ingot", "minecraft:coal" , + "minecraft:bucket" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 1b, count: 1, id: \"minecraft:coal\"}, {Slot: 2b, count: 1, id: \"minecraft:iron_ingot\"}]" + } + } + }, + { "pos": [0, 0, 0], "block": {"id": "minecraft:hopper", "facing": "down"} }, + { + "pos": [2, 1, 0], + "block": { + "id": "minecraft:furnace", + "nbt": {"Items": "[{Slot: 1b, count: 1, id: \"minecraft:bucket\"}]"} + } + }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:hopper", "facing": "down"} } + ] + }, + { + "at": 60, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:furnace", + "nbt": {"Items[0].id": "minecraft:coal", "Items[0].Slot": "1b", "Items[0].count": 1} + } + }, + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:hopper", + "nbt": {"Items[0].id": "minecraft:iron_ingot", "Items[0].count": 1} + } + }, + { + "pos": [2, 1, 0], + "is": { "id": "minecraft:furnace", "nbt": {"Items": []} } + }, + { + "pos": [2, 0, 0], + "is": { "id": "minecraft:hopper", "nbt": {"Items[0].id": "minecraft:bucket", "Items[0].count": 1} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_hopper_side_inserts_only_fuel.json b/tests/container/furnace/furnace_hopper_side_inserts_only_fuel.json new file mode 100644 index 0000000..14c1cb4 --- /dev/null +++ b/tests/container/furnace/furnace_hopper_side_inserts_only_fuel.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_hopper_side_inserts_only_fuel", + "description": "A hopper beside a furnace inserts coal into the fuel slot but refuses an item that is not a fuel.", + "tags": ["container", "furnace", "block-entity", "hopper", "item-transfer", "fuel"], + "minecraftIds": ["minecraft:furnace", "minecraft:hopper", "minecraft:coal", "minecraft:cobblestone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 0, 0], "block": {"id": "minecraft:furnace"} }, + { + "pos": [0, 0, 0], + "block": { + "id": "minecraft:hopper", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:coal\"}]"} + } + }, + { + "pos": [2, 0, 0], + "block": { + "id": "minecraft:hopper", + "facing": "west", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:cobblestone\"}]"} + } + } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { + "pos": [1, 0, 0], + "is": { + "id": "minecraft:furnace", + "nbt": {"Items[0].id": "minecraft:coal", "Items[0].Slot": "1b", "Items[0].count": 1} + } + }, + { + "pos": [0, 0, 0], + "is": { "id": "minecraft:hopper", "nbt": {"Items": []} } + }, + { + "pos": [2, 0, 0], + "is": { + "id": "minecraft:hopper", + "nbt": {"Items[0].id": "minecraft:cobblestone", "Items[0].count": 1} + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_lava_bucket_leaves_empty_bucket.json b/tests/container/furnace/furnace_lava_bucket_leaves_empty_bucket.json new file mode 100644 index 0000000..80e7488 --- /dev/null +++ b/tests/container/furnace/furnace_lava_bucket_leaves_empty_bucket.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_lava_bucket_leaves_empty_bucket", + "description": "A lava bucket used as fuel lights the furnace for 20000 ticks and leaves an empty bucket in the fuel slot.", + "tags": ["container", "furnace", "block-entity", "fuel"], + "minecraftIds": ["minecraft:furnace", "minecraft:raw_iron", "minecraft:lava_bucket", "minecraft:bucket"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "cooking_total_time": "200s", + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:lava_bucket\"}]" + } + } + }, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "true", + "nbt": { + "lit_total_time": "20000s", + "Items[0].id": "minecraft:raw_iron", + "Items[1].id": "minecraft:bucket", + "Items[1].Slot": "1b", + "Items[1].count": 1 + } + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_placement_faces_player.json b/tests/container/furnace/furnace_placement_faces_player.json new file mode 100644 index 0000000..a1edf64 --- /dev/null +++ b/tests/container/furnace/furnace_placement_faces_player.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_placement_faces_player", + "description": "A furnace placed by a survival player faces back toward the player (the opposite of their horizontal look direction), starts unlit and consumes the held item.", + "tags": ["container", "furnace", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:furnace", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [12, 3, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 4, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 8, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [12, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:furnace"}, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + {"at": 2, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:furnace"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 4, 0.5], "rot": [90, 90] }, + {"at": 2, "do": "interact"}, + {"at": 3, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:furnace"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [8.5, 4, 0.5], "rot": [180, 90] }, + {"at": 3, "do": "interact"}, + {"at": 4, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:furnace"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [12.5, 4, 0.5], "rot": [-90, 90] }, + {"at": 4, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:furnace", "facing": "north", "lit": "false"} }, + { "pos": [4, 2, 0], "is": {"id": "minecraft:furnace", "facing": "east", "lit": "false"} } , + { "pos": [8, 2, 0], "is": {"id": "minecraft:furnace", "facing": "south", "lit": "false"} }, + { "pos": [12, 2, 0], "is": {"id": "minecraft:furnace", "facing": "west", "lit": "false"} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_smelts_raw_iron.json b/tests/container/furnace/furnace_smelts_raw_iron.json new file mode 100644 index 0000000..2ae38c9 --- /dev/null +++ b/tests/container/furnace/furnace_smelts_raw_iron.json @@ -0,0 +1,69 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_smelts_raw_iron", + "description": "A furnace with raw iron and coal lights on the first tick, consumes one coal, and after 200 ticks of cooking holds one iron ingot in the result slot with the input used up.", + "tags": ["container", "furnace", "smelting", "fuel", "block-entity"], + "minecraftIds": ["minecraft:furnace", "minecraft:raw_iron", "minecraft:coal", "minecraft:iron_ingot"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "cooking_total_time": "200s", + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 2, id: \"minecraft:coal\"}]" + } + } + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "true", + "nbt": { + "lit_total_time": "1600s", + "Items[0].id": "minecraft:raw_iron", + "Items[1].id": "minecraft:coal", + "Items[1].count": 1 + } + } + } + ] + }, + { + "at": 210, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "true", + "nbt": { + "Items[0].id": "minecraft:coal", + "Items[0].Slot": "1b", + "Items[1].id": "minecraft:iron_ingot", + "Items[1].Slot": "2b", + "Items[1].count": 1 + } + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_unsmeltable_input_not_cooked.json b/tests/container/furnace/furnace_unsmeltable_input_not_cooked.json new file mode 100644 index 0000000..6241d38 --- /dev/null +++ b/tests/container/furnace/furnace_unsmeltable_input_not_cooked.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_unsmeltable_input_not_cooked", + "description": "A furnace with fuel and an input that has no smelting recipe stays unlit and keeps the fuel.", + "tags": ["container", "furnace", "block-entity", "smelting", "fuel"], + "minecraftIds": ["minecraft:furnace", "minecraft:dirt", "minecraft:coal"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:dirt\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}]" + } + } + }, + { + "at": 10, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "false", + "nbt": { + "lit_total_time": "0s", + "Items[0].id": "minecraft:dirt", + "Items[1].id": "minecraft:coal", + "Items[1].count": 1 + } + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/container/furnace/furnace_wet_sponge_turns_bucket_to_water.json b/tests/container/furnace/furnace_wet_sponge_turns_bucket_to_water.json new file mode 100644 index 0000000..0c39bce --- /dev/null +++ b/tests/container/furnace/furnace_wet_sponge_turns_bucket_to_water.json @@ -0,0 +1,69 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "furnace_wet_sponge_turns_bucket_to_water", + "description": "Smelting a wet sponge while an empty bucket sits in the fuel slot produces a sponge and replaces the bucket with a water bucket.", + "tags": ["container", "furnace", "block-entity", "smelting"], + "minecraftIds": [ + "minecraft:furnace" , "minecraft:wet_sponge" , "minecraft:sponge" , "minecraft:bucket" , + "minecraft:water_bucket" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": { + "id": "minecraft:furnace", + "nbt": { + "cooking_total_time": "200s", + "lit_time_remaining": "300s", + "lit_total_time": "300s", + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:wet_sponge\"}, {Slot: 1b, count: 1, id: \"minecraft:bucket\"}]" + }, + "lit": "true" + } + }, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "lit": "true", + "nbt": {"Items[0].id": "minecraft:wet_sponge", "Items[1].id": "minecraft:bucket"} + } + } + ] + }, + { + "at": 215, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id": "minecraft:furnace", + "nbt": { + "Items[0].id": "minecraft:water_bucket", + "Items[0].Slot": "1b", + "Items[1].id": "minecraft:sponge", + "Items[1].Slot": "2b", + "Items[1].count": 1 + } + } + } + ] + } + ], + "breakpoints": [] +} + From e1751db085caf070d5ac7710115ddb0eff16b041 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sun, 1 Nov 2026 05:51:29 +0100 Subject: [PATCH 67/85] Add Flint tests for glass_bottle (1 blocks) --- ...ottle_dispenser_beehive_collect_honey.json | 58 +++++++++++++++++ ...ass_bottle_dispenser_beehive_not_full.json | 53 ++++++++++++++++ ..._bottle_dispenser_fills_flowing_water.json | 62 +++++++++++++++++++ ...s_bottle_dispenser_fills_water_source.json | 55 ++++++++++++++++ ...ttle_dispenser_fills_waterlogged_slab.json | 60 ++++++++++++++++++ ...e_dispenser_solid_block_shoots_bottle.json | 48 ++++++++++++++ 6 files changed, 336 insertions(+) create mode 100644 tests/items/glass_bottle/glass_bottle_dispenser_beehive_collect_honey.json create mode 100644 tests/items/glass_bottle/glass_bottle_dispenser_beehive_not_full.json create mode 100644 tests/items/glass_bottle/glass_bottle_dispenser_fills_flowing_water.json create mode 100644 tests/items/glass_bottle/glass_bottle_dispenser_fills_water_source.json create mode 100644 tests/items/glass_bottle/glass_bottle_dispenser_fills_waterlogged_slab.json create mode 100644 tests/items/glass_bottle/glass_bottle_dispenser_solid_block_shoots_bottle.json diff --git a/tests/items/glass_bottle/glass_bottle_dispenser_beehive_collect_honey.json b/tests/items/glass_bottle/glass_bottle_dispenser_beehive_collect_honey.json new file mode 100644 index 0000000..66664e8 --- /dev/null +++ b/tests/items/glass_bottle/glass_bottle_dispenser_beehive_collect_honey.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "glass_bottle_dispenser_beehive_collect_honey", + "description": "A powered dispenser facing a beehive at honey level 5 turns the glass bottle into a honey bottle and resets the hive to honey level 0.", + "tags": ["glass-bottle", "honey-bottle", "dispenser", "beehive", "redstone"], + "minecraftIds": [ + "minecraft:glass_bottle" , "minecraft:honey_bottle" , "minecraft:dispenser" , "minecraft:beehive" , + "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 2, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [3, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:glass_bottle\"}]"} + } + }, + { + "at": 1, + "do": "place", + "pos": [1, 1, 0], + "block": {"id": "minecraft:beehive", "honey_level": 5, "facing": "east"} + }, + { "at": 2, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:dispenser", + "nbt": {"Items": "[{count: 1, Slot: 0b, id: \"minecraft:honey_bottle\"}]"} + } + }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:beehive", "honey_level": 0, "facing": "east"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/glass_bottle/glass_bottle_dispenser_beehive_not_full.json b/tests/items/glass_bottle/glass_bottle_dispenser_beehive_not_full.json new file mode 100644 index 0000000..b8736c6 --- /dev/null +++ b/tests/items/glass_bottle/glass_bottle_dispenser_beehive_not_full.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "glass_bottle_dispenser_beehive_not_full", + "description": "A powered dispenser facing a beehive below honey level 5 does not fill the glass bottle: it shoots the bottle out as an item and the hive keeps its honey level.", + "tags": ["glass-bottle", "dispenser", "beehive", "edge-case", "redstone"], + "minecraftIds": ["minecraft:glass_bottle", "minecraft:dispenser", "minecraft:beehive", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 2, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [3, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:glass_bottle\"}]"} + } + }, + { + "at": 1, + "do": "place", + "pos": [1, 1, 0], + "block": {"id": "minecraft:beehive", "honey_level": 4, "facing": "east"} + }, + { "at": 2, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 7, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:dispenser", "nbt": {"Items": "[]"} } + }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:beehive", "honey_level": 4, "facing": "east"} }, + {"is": "minecraft:item", "exists": true, "count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/glass_bottle/glass_bottle_dispenser_fills_flowing_water.json b/tests/items/glass_bottle/glass_bottle_dispenser_fills_flowing_water.json new file mode 100644 index 0000000..b8f5e1c --- /dev/null +++ b/tests/items/glass_bottle/glass_bottle_dispenser_fills_flowing_water.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "glass_bottle_dispenser_fills_flowing_water", + "description": "A powered dispenser facing flowing (non-source) water still turns the glass bottle into a water potion and does not remove the water.", + "tags": ["glass-bottle", "dispenser", "water", "flowing", "redstone"], + "minecraftIds": [ + "minecraft:glass_bottle" , "minecraft:potion" , "minecraft:dispenser" , "minecraft:water" , + "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 2, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [3, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [1, 2, 0], "block": {"id": "minecraft:water", "level": 0} }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:glass_bottle\"}]"} + } + }, + { + "at": 15, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:water", "level": 8} } + ] + }, + { "at": 16, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 25, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:dispenser", + "nbt": { + "Items": "[{components: {\"minecraft:potion_contents\": {potion: \"minecraft:water\"}}, count: 1, Slot: 0b, id: \"minecraft:potion\"}]" + } + } + }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water", "level": 8} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/glass_bottle/glass_bottle_dispenser_fills_water_source.json b/tests/items/glass_bottle/glass_bottle_dispenser_fills_water_source.json new file mode 100644 index 0000000..1c6d47b --- /dev/null +++ b/tests/items/glass_bottle/glass_bottle_dispenser_fills_water_source.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "glass_bottle_dispenser_fills_water_source", + "description": "A powered dispenser facing a water source turns one glass bottle into a water potion and leaves the water source in place.", + "tags": ["glass-bottle", "dispenser", "water", "redstone"], + "minecraftIds": [ + "minecraft:glass_bottle" , "minecraft:potion" , "minecraft:dispenser" , "minecraft:water" , + "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 2, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [3, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 2, id: \"minecraft:glass_bottle\"}]"} + } + }, + { "at": 1, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { "at": 2, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:dispenser", + "nbt": { + "Items": "[{count: 1, Slot: 0b, id: \"minecraft:glass_bottle\"}, {components: {\"minecraft:potion_contents\": {potion: \"minecraft:water\"}}, count: 1, Slot: 1b, id: \"minecraft:potion\"}]" + } + } + }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water", "level": 0} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/glass_bottle/glass_bottle_dispenser_fills_waterlogged_slab.json b/tests/items/glass_bottle/glass_bottle_dispenser_fills_waterlogged_slab.json new file mode 100644 index 0000000..13b4e77 --- /dev/null +++ b/tests/items/glass_bottle/glass_bottle_dispenser_fills_waterlogged_slab.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "glass_bottle_dispenser_fills_waterlogged_slab", + "description": "A powered dispenser facing a waterlogged slab turns the glass bottle into a water potion and the slab stays waterlogged.", + "tags": ["glass-bottle", "dispenser", "water", "waterlogged", "redstone"], + "minecraftIds": [ + "minecraft:glass_bottle" , "minecraft:potion" , "minecraft:dispenser" , "minecraft:oak_slab" , + "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 2, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [3, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:glass_bottle\"}]"} + } + }, + { + "at": 1, + "do": "place", + "pos": [1, 1, 0], + "block": {"id": "minecraft:oak_slab", "type": "bottom", "waterlogged": true} + }, + { "at": 2, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:dispenser", + "nbt": { + "Items": "[{components: {\"minecraft:potion_contents\": {potion: \"minecraft:water\"}}, count: 1, Slot: 0b, id: \"minecraft:potion\"}]" + } + } + }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:oak_slab", "type": "bottom", "waterlogged": true} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/glass_bottle/glass_bottle_dispenser_solid_block_shoots_bottle.json b/tests/items/glass_bottle/glass_bottle_dispenser_solid_block_shoots_bottle.json new file mode 100644 index 0000000..b7f081b --- /dev/null +++ b/tests/items/glass_bottle/glass_bottle_dispenser_solid_block_shoots_bottle.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "glass_bottle_dispenser_solid_block_shoots_bottle", + "description": "A powered dispenser facing a plain solid block does not fill the glass bottle: it shoots the bottle out as an item and the dispenser ends up empty.", + "tags": ["glass-bottle", "dispenser", "edge-case", "redstone"], + "minecraftIds": ["minecraft:glass_bottle", "minecraft:dispenser", "minecraft:stone", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 2, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [3, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:glass_bottle\"}]"} + } + }, + { "at": 1, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 2, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 7, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:dispenser", "nbt": {"Items": "[]"} } + }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:stone"} }, + {"is": "minecraft:item", "exists": true, "count": 1} + ] + } + ], + "breakpoints": [] +} + From 1a5c5394f0bca6a78c76e34b3a75ede18f408b25 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sun, 1 Nov 2026 06:23:36 +0100 Subject: [PATCH 68/85] Add Flint tests for glow_ink_sac (1 blocks) --- .../glow_ink_sac_adventure_mode.json | 52 ++++++++++++++++++ .../glow_ink_sac_already_glowing.json | 52 ++++++++++++++++++ .../glow_ink_sac_back_text_glows.json | 55 +++++++++++++++++++ .../glow_ink_sac_creative_keeps_stack.json | 52 ++++++++++++++++++ .../glow_ink_sac/glow_ink_sac_empty_text.json | 52 ++++++++++++++++++ .../glow_ink_sac_front_text_glows.json | 52 ++++++++++++++++++ .../glow_ink_sac_non_sign_block.json | 37 +++++++++++++ .../glow_ink_sac/glow_ink_sac_waxed_sign.json | 55 +++++++++++++++++++ 8 files changed, 407 insertions(+) create mode 100644 tests/items/glow_ink_sac/glow_ink_sac_adventure_mode.json create mode 100644 tests/items/glow_ink_sac/glow_ink_sac_already_glowing.json create mode 100644 tests/items/glow_ink_sac/glow_ink_sac_back_text_glows.json create mode 100644 tests/items/glow_ink_sac/glow_ink_sac_creative_keeps_stack.json create mode 100644 tests/items/glow_ink_sac/glow_ink_sac_empty_text.json create mode 100644 tests/items/glow_ink_sac/glow_ink_sac_front_text_glows.json create mode 100644 tests/items/glow_ink_sac/glow_ink_sac_non_sign_block.json create mode 100644 tests/items/glow_ink_sac/glow_ink_sac_waxed_sign.json diff --git a/tests/items/glow_ink_sac/glow_ink_sac_adventure_mode.json b/tests/items/glow_ink_sac/glow_ink_sac_adventure_mode.json new file mode 100644 index 0000000..04fe60a --- /dev/null +++ b/tests/items/glow_ink_sac/glow_ink_sac_adventure_mode.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Glow Ink Sac Adventure Mode", + "description": "An adventure mode player cannot build, so a glow ink sac does not make sign text glow and the sac is not used up.", + "tags": ["glow_ink_sac", "sign", "interaction", "item"], + "minecraftIds": ["minecraft:glow_ink_sac", "minecraft:oak_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -2], [0, 2, 2] ] + }, + "player": {"game_mode": "Adventure"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -2], [0, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 2, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 0, + "nbt": {"front_text": "{has_glowing_text: false, messages: [\"hi\", \"\", \"\", \"\"]}"} + } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 2.5], "rot": [180, 0] }, + {"at": 2, "do": "interact", "item": "minecraft:glow_ink_sac"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:oak_sign", + "nbt": {"front_text.has_glowing_text": false, "back_text.has_glowing_text": false} + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:glow_ink_sac", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/glow_ink_sac/glow_ink_sac_already_glowing.json b/tests/items/glow_ink_sac/glow_ink_sac_already_glowing.json new file mode 100644 index 0000000..14fa02b --- /dev/null +++ b/tests/items/glow_ink_sac/glow_ink_sac_already_glowing.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Glow Ink Sac Already Glowing", + "description": "Using a glow ink sac on sign text that already glows changes nothing and the sac is not used up.", + "tags": ["glow_ink_sac", "sign", "interaction", "item"], + "minecraftIds": ["minecraft:glow_ink_sac", "minecraft:oak_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -2], [0, 2, 2] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -2], [0, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 2, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 0, + "nbt": {"front_text": "{has_glowing_text: true, messages: [\"hi\", \"\", \"\", \"\"]}"} + } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 2.5], "rot": [180, 0] }, + {"at": 2, "do": "interact", "item": "minecraft:glow_ink_sac"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:oak_sign", + "nbt": {"front_text.has_glowing_text": true, "back_text.has_glowing_text": false} + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:glow_ink_sac", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/glow_ink_sac/glow_ink_sac_back_text_glows.json b/tests/items/glow_ink_sac/glow_ink_sac_back_text_glows.json new file mode 100644 index 0000000..c314480 --- /dev/null +++ b/tests/items/glow_ink_sac/glow_ink_sac_back_text_glows.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Glow Ink Sac Back Text Glows", + "description": "Using a glow ink sac from behind a sign with text on both sides makes only the back text glow and uses up the sac.", + "tags": ["glow_ink_sac", "sign", "interaction", "item"], + "minecraftIds": ["minecraft:glow_ink_sac", "minecraft:oak_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -2], [0, 2, 2] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -2], [0, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 2, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 0, + "nbt": { + "front_text": "{has_glowing_text: false, messages: [\"hi\", \"\", \"\", \"\"]}", + "back_text" : "{has_glowing_text: false, messages: [\"yo\", \"\", \"\", \"\"]}" + } + } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -1.5], "rot": [0, 0] }, + {"at": 2, "do": "interact", "item": "minecraft:glow_ink_sac"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:oak_sign", + "nbt": {"front_text.has_glowing_text": false, "back_text.has_glowing_text": true} + } + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/glow_ink_sac/glow_ink_sac_creative_keeps_stack.json b/tests/items/glow_ink_sac/glow_ink_sac_creative_keeps_stack.json new file mode 100644 index 0000000..68c9fa5 --- /dev/null +++ b/tests/items/glow_ink_sac/glow_ink_sac_creative_keeps_stack.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Glow Ink Sac Creative Keeps Stack", + "description": "In creative mode a glow ink sac makes the sign text glow without using up the sac.", + "tags": ["glow_ink_sac", "sign", "interaction", "item"], + "minecraftIds": ["minecraft:glow_ink_sac", "minecraft:oak_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -2], [0, 2, 2] ] + }, + "player": {"game_mode": "Creative"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -2], [0, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 2, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 0, + "nbt": {"front_text": "{has_glowing_text: false, messages: [\"hi\", \"\", \"\", \"\"]}"} + } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 2.5], "rot": [180, 0] }, + {"at": 2, "do": "interact", "item": "minecraft:glow_ink_sac"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:oak_sign", + "nbt": {"front_text.has_glowing_text": true, "back_text.has_glowing_text": false} + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:glow_ink_sac", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/glow_ink_sac/glow_ink_sac_empty_text.json b/tests/items/glow_ink_sac/glow_ink_sac_empty_text.json new file mode 100644 index 0000000..fde1246 --- /dev/null +++ b/tests/items/glow_ink_sac/glow_ink_sac_empty_text.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Glow Ink Sac Empty Text", + "description": "Using a glow ink sac on a sign side with no text does not make it glow and the sac is not used up.", + "tags": ["glow_ink_sac", "sign", "interaction", "item"], + "minecraftIds": ["minecraft:glow_ink_sac", "minecraft:oak_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -2], [0, 2, 2] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -2], [0, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 2, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 0, + "nbt": {"front_text": "{has_glowing_text: false, messages: [\"\", \"\", \"\", \"\"]}"} + } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 2.5], "rot": [180, 0] }, + {"at": 2, "do": "interact", "item": "minecraft:glow_ink_sac"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:oak_sign", + "nbt": {"front_text.has_glowing_text": false, "back_text.has_glowing_text": false} + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:glow_ink_sac", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/glow_ink_sac/glow_ink_sac_front_text_glows.json b/tests/items/glow_ink_sac/glow_ink_sac_front_text_glows.json new file mode 100644 index 0000000..cf4b6ed --- /dev/null +++ b/tests/items/glow_ink_sac/glow_ink_sac_front_text_glows.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Glow Ink Sac Front Text Glows", + "description": "Using a glow ink sac on the front of an unwaxed sign with text makes the front text glow and uses up the sac.", + "tags": ["glow_ink_sac", "sign", "interaction", "item"], + "minecraftIds": ["minecraft:glow_ink_sac", "minecraft:oak_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -2], [0, 2, 2] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -2], [0, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 2, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 0, + "nbt": {"front_text": "{has_glowing_text: false, messages: [\"hi\", \"\", \"\", \"\"]}"} + } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 2.5], "rot": [180, 0] }, + {"at": 2, "do": "interact", "item": "minecraft:glow_ink_sac"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:oak_sign", + "nbt": {"front_text.has_glowing_text": true, "back_text.has_glowing_text": false} + } + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/glow_ink_sac/glow_ink_sac_non_sign_block.json b/tests/items/glow_ink_sac/glow_ink_sac_non_sign_block.json new file mode 100644 index 0000000..e0dc51e --- /dev/null +++ b/tests/items/glow_ink_sac/glow_ink_sac_non_sign_block.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Glow Ink Sac Non Sign Block", + "description": "Using a glow ink sac on a stone block does nothing and the sac is not used up.", + "tags": ["glow_ink_sac", "sign", "interaction", "item"], + "minecraftIds": ["minecraft:glow_ink_sac", "minecraft:oak_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -2], [0, 2, 2] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -2], [0, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 2.5], "rot": [180, 0] }, + {"at": 2, "do": "interact", "item": "minecraft:glow_ink_sac"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone" } }, + { "is": {"id": "minecraft:glow_ink_sac", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/glow_ink_sac/glow_ink_sac_waxed_sign.json b/tests/items/glow_ink_sac/glow_ink_sac_waxed_sign.json new file mode 100644 index 0000000..398aeb9 --- /dev/null +++ b/tests/items/glow_ink_sac/glow_ink_sac_waxed_sign.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "Glow Ink Sac Waxed Sign", + "description": "Using a glow ink sac on a waxed sign does not make the text glow and the sac is not used up.", + "tags": ["glow_ink_sac", "sign", "interaction", "item"], + "minecraftIds": ["minecraft:glow_ink_sac", "minecraft:oak_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -2], [0, 2, 2] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, -2], [0, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 0, + "do": "place", + "pos": [0, 2, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 0, + "nbt": { + "front_text": "{has_glowing_text: false, messages: [\"hi\", \"\", \"\", \"\"]}", + "is_waxed" : "1b" + } + } + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 2.5], "rot": [180, 0] }, + {"at": 2, "do": "interact", "item": "minecraft:glow_ink_sac"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:oak_sign", + "nbt": {"front_text.has_glowing_text": false, "back_text.has_glowing_text": false} + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:glow_ink_sac", "count": 1} } + ] + } + ], + "breakpoints": [] +} + From 489e2a0d74de345ed8538862618bce0a9b53065c Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Sun, 1 Nov 2026 06:28:29 +0100 Subject: [PATCH 69/85] Add Flint tests for glow_lichen (1 blocks) --- ...glow_lichen_bonemeal_no_spread_target.json | 69 ++++++++++++++++ ..._lichen_bonemeal_spreads_to_neighbour.json | 81 +++++++++++++++++++ .../glow_lichen_bonemeal_spreads_to_wall.json | 68 ++++++++++++++++ .../glow_lichen_destroyed_by_piston.json | 61 ++++++++++++++ ...glow_lichen_face_removed_with_support.json | 79 ++++++++++++++++++ ...ichen_placement_adds_face_to_existing.json | 65 +++++++++++++++ .../glow_lichen_placement_on_ceiling.json | 65 +++++++++++++++ ...en_placement_rejected_on_partial_face.json | 49 +++++++++++ .../glow_lichen_placement_waterlogged.json | 54 +++++++++++++ ...ow_lichen_replaced_by_block_placement.json | 54 +++++++++++++ .../glow_lichen_support_loss_to_slab.json | 57 +++++++++++++ .../glow_lichen_waterlogged_support_loss.json | 60 ++++++++++++++ 12 files changed, 762 insertions(+) create mode 100644 tests/vegetation/glow_lichen/glow_lichen_bonemeal_no_spread_target.json create mode 100644 tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_neighbour.json create mode 100644 tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_wall.json create mode 100644 tests/vegetation/glow_lichen/glow_lichen_destroyed_by_piston.json create mode 100644 tests/vegetation/glow_lichen/glow_lichen_face_removed_with_support.json create mode 100644 tests/vegetation/glow_lichen/glow_lichen_placement_adds_face_to_existing.json create mode 100644 tests/vegetation/glow_lichen/glow_lichen_placement_on_ceiling.json create mode 100644 tests/vegetation/glow_lichen/glow_lichen_placement_rejected_on_partial_face.json create mode 100644 tests/vegetation/glow_lichen/glow_lichen_placement_waterlogged.json create mode 100644 tests/vegetation/glow_lichen/glow_lichen_replaced_by_block_placement.json create mode 100644 tests/vegetation/glow_lichen/glow_lichen_support_loss_to_slab.json create mode 100644 tests/vegetation/glow_lichen/glow_lichen_waterlogged_support_loss.json diff --git a/tests/vegetation/glow_lichen/glow_lichen_bonemeal_no_spread_target.json b/tests/vegetation/glow_lichen/glow_lichen_bonemeal_no_spread_target.json new file mode 100644 index 0000000..595af71 --- /dev/null +++ b/tests/vegetation/glow_lichen/glow_lichen_bonemeal_no_spread_target.json @@ -0,0 +1,69 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "glow_lichen_bonemeal_no_spread_target", + "description": "Bone meal on a glow lichen with nowhere to spread is not a valid target: the lichen is unchanged and no bone meal is consumed.", + "tags": ["vegetation", "glow-lichen", "bone-meal", "spread", "player"], + "minecraftIds": ["minecraft:glow_lichen", "minecraft:bone_meal", "minecraft:stone", "minecraft:stone_slab"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:glow_lichen", "down": true} }, + { "at": 4, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 4, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 4, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 4, "do": "place", "pos": [0, 1, -1], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:glow_lichen", + "down": true, + "north": false, + "south": false, + "east": false, + "west": false, + "up": false + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:bone_meal", "count": 2} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_neighbour.json b/tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_neighbour.json new file mode 100644 index 0000000..e92998d --- /dev/null +++ b/tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_neighbour.json @@ -0,0 +1,81 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "glow_lichen_bonemeal_spreads_to_neighbour", + "description": "Bone meal on a floor glow lichen whose only possible spread is onto the floor of the open east neighbour places a new lichen with the down face there, leaves the source unchanged and consumes one bone meal.", + "tags": ["vegetation", "glow-lichen", "bone-meal", "spread", "player"], + "minecraftIds": ["minecraft:glow_lichen", "minecraft:bone_meal", "minecraft:stone", "minecraft:stone_slab"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:glow_lichen", "down": true} }, + { "at": 4, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 4, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 4, "do": "place", "pos": [0, 1, -1], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 4, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:air"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:glow_lichen", + "down": true, + "north": false, + "south": false, + "east": false, + "west": false, + "up": false + } + }, + { + "pos": [1, 1, 0], + "is": { + "id": "minecraft:glow_lichen", + "down": true, + "north": false, + "south": false, + "east": false, + "west": false, + "up": false + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:bone_meal", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_wall.json b/tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_wall.json new file mode 100644 index 0000000..f2cfa97 --- /dev/null +++ b/tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_wall.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "glow_lichen_bonemeal_spreads_to_wall", + "description": "Bone meal on a floor glow lichen whose only possible spread is onto the stone north wall adds the north face to the same block and consumes one bone meal.", + "tags": ["vegetation", "glow-lichen", "bone-meal", "spread", "player"], + "minecraftIds": ["minecraft:glow_lichen", "minecraft:bone_meal", "minecraft:stone", "minecraft:stone_slab"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:glow_lichen", "down": true} }, + { "at": 4, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 4, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 4, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:glow_lichen", + "down": true, + "north": true, + "south": false, + "east": false, + "west": false, + "up": false + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:bone_meal", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/glow_lichen/glow_lichen_destroyed_by_piston.json b/tests/vegetation/glow_lichen/glow_lichen_destroyed_by_piston.json new file mode 100644 index 0000000..f001351 --- /dev/null +++ b/tests/vegetation/glow_lichen/glow_lichen_destroyed_by_piston.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "glow_lichen_destroyed_by_piston", + "description": "An extending piston destroys a glow lichen in front of it instead of pushing it, leaving only the piston head with nothing behind it.", + "tags": ["vegetation", "glow-lichen", "piston", "push-reaction", "redstone"], + "minecraftIds": [ + "minecraft:glow_lichen" , "minecraft:piston" , "minecraft:piston_head" , "minecraft:redstone_block", + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 3, 2] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [4, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:piston", "facing": "east", "extended": false} + }, + { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:glow_lichen", "down": true} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston" , "extended": false } }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:glow_lichen", "down": true} } + ] + }, + { "at": 2, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston" , "extended": true, "facing": "east"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/glow_lichen/glow_lichen_face_removed_with_support.json b/tests/vegetation/glow_lichen/glow_lichen_face_removed_with_support.json new file mode 100644 index 0000000..755e3a4 --- /dev/null +++ b/tests/vegetation/glow_lichen/glow_lichen_face_removed_with_support.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "glow_lichen_face_removed_with_support", + "description": "A glow lichen with up and north faces loses only the north face when the north wall is removed, and becomes air when the ceiling is removed too.", + "tags": ["vegetation", "glow-lichen", "support", "neighbor-update"], + "minecraftIds": ["minecraft:glow_lichen", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 0, 0], [0, 2, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place", + "pos": [0, 2, 0], + "block": {"id": "minecraft:glow_lichen", "up": true, "north": true} + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:glow_lichen", "up": true, "north": true} } + ] + }, + { "at": 5, "do": "remove", "pos": [0, 2, -1] }, + { + "at": 7, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:glow_lichen", + "up": true, + "north": false, + "south": false, + "east": false, + "west": false, + "down": false + } + } + ] + }, + { "at": 7, "do": "remove", "pos": [0, 3, 0] }, + { + "at": 9, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/glow_lichen/glow_lichen_placement_adds_face_to_existing.json b/tests/vegetation/glow_lichen/glow_lichen_placement_adds_face_to_existing.json new file mode 100644 index 0000000..36bb24b --- /dev/null +++ b/tests/vegetation/glow_lichen/glow_lichen_placement_adds_face_to_existing.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "glow_lichen_placement_adds_face_to_existing", + "description": "Using glow lichen on the ceiling of a block that already has a north lichen face adds the up face to the same block and keeps the north face, consuming one item.", + "tags": ["vegetation", "glow-lichen", "placement", "player"], + "minecraftIds": ["minecraft:glow_lichen", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:glow_lichen", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 0, 0], [0, 2, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:glow_lichen", "north": true} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 5, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:glow_lichen", + "up": true, + "north": true, + "down": false, + "south": false, + "east": false, + "west": false + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:glow_lichen", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/glow_lichen/glow_lichen_placement_on_ceiling.json b/tests/vegetation/glow_lichen/glow_lichen_placement_on_ceiling.json new file mode 100644 index 0000000..ebd774e --- /dev/null +++ b/tests/vegetation/glow_lichen/glow_lichen_placement_on_ceiling.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "glow_lichen_placement_on_ceiling", + "description": "Using glow lichen on the underside of a stone ceiling places a lichen with only the up face and consumes one item.", + "tags": ["vegetation", "glow-lichen", "placement", "player"], + "minecraftIds": ["minecraft:glow_lichen", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:glow_lichen", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 0, 0], [0, 2, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 5, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:glow_lichen", + "up": true, + "down": false, + "north": false, + "south": false, + "east": false, + "west": false, + "waterlogged": false + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:glow_lichen", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/glow_lichen/glow_lichen_placement_rejected_on_partial_face.json b/tests/vegetation/glow_lichen/glow_lichen_placement_rejected_on_partial_face.json new file mode 100644 index 0000000..f38a3d1 --- /dev/null +++ b/tests/vegetation/glow_lichen/glow_lichen_placement_rejected_on_partial_face.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "glow_lichen_placement_rejected_on_partial_face", + "description": "Using glow lichen on the top of a bottom slab places nothing because the slab top is not a full face, and no item is consumed.", + "tags": ["vegetation", "glow-lichen", "placement", "player", "support"], + "minecraftIds": ["minecraft:glow_lichen", "minecraft:stone_slab", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:glow_lichen", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} }, + { "is": {"id": "minecraft:glow_lichen", "count": 2} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/glow_lichen/glow_lichen_placement_waterlogged.json b/tests/vegetation/glow_lichen/glow_lichen_placement_waterlogged.json new file mode 100644 index 0000000..c00bf6b --- /dev/null +++ b/tests/vegetation/glow_lichen/glow_lichen_placement_waterlogged.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "glow_lichen_placement_waterlogged", + "description": "Using glow lichen on the floor through a water source places a lichen with the down face that is waterlogged.", + "tags": ["vegetation", "glow-lichen", "placement", "waterlogged", "player"], + "minecraftIds": ["minecraft:glow_lichen", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:glow_lichen", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:glow_lichen", "down": true, "waterlogged": true} }, + { "slot": "hotbar1", "is": {"id": "minecraft:glow_lichen", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/glow_lichen/glow_lichen_replaced_by_block_placement.json b/tests/vegetation/glow_lichen/glow_lichen_replaced_by_block_placement.json new file mode 100644 index 0000000..fb7962f --- /dev/null +++ b/tests/vegetation/glow_lichen/glow_lichen_replaced_by_block_placement.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "glow_lichen_replaced_by_block_placement", + "description": "Using a stone block on a floor glow lichen replaces the lichen, because glow lichen is replaceable by a block other than lichen, and consumes one item.", + "tags": ["vegetation", "glow-lichen", "replaceable", "placement", "player"], + "minecraftIds": ["minecraft:glow_lichen", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:glow_lichen", "down": true} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone" } }, + { "is": {"id": "minecraft:stone", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/glow_lichen/glow_lichen_support_loss_to_slab.json b/tests/vegetation/glow_lichen/glow_lichen_support_loss_to_slab.json new file mode 100644 index 0000000..0dde851 --- /dev/null +++ b/tests/vegetation/glow_lichen/glow_lichen_support_loss_to_slab.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "glow_lichen_support_loss_to_slab", + "description": "A glow lichen on a stone floor becomes air when the stone is replaced by a bottom slab, but survives under a bottom slab whose underside is a full face.", + "tags": ["vegetation", "glow-lichen", "support", "neighbor-update"], + "minecraftIds": ["minecraft:glow_lichen", "minecraft:stone", "minecraft:stone_slab"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [2, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:glow_lichen", "down": true } }, + { "pos": [2, 2, 0], "block": {"id": "minecraft:glow_lichen", "up": true} } + ] + }, + { "at": 5, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 5, "do": "place", "pos": [2, 3, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [2, 2, 0], "is": {"id": "minecraft:glow_lichen", "up": true} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/glow_lichen/glow_lichen_waterlogged_support_loss.json b/tests/vegetation/glow_lichen/glow_lichen_waterlogged_support_loss.json new file mode 100644 index 0000000..7e6cbad --- /dev/null +++ b/tests/vegetation/glow_lichen/glow_lichen_waterlogged_support_loss.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "glow_lichen_waterlogged_support_loss", + "description": "A waterlogged glow lichen with a single face is replaced by a water source, not air, when the block it is attached to is removed (Block.updateOrDestroy destroys it and Level.destroyBlock leaves the fluid).", + "tags": ["vegetation", "glow-lichen", "waterlogged", "support", "neighbor-update"], + "minecraftIds": ["minecraft:glow_lichen", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 3, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:glow_lichen", "down": true, "waterlogged": true} + }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:glow_lichen", "down": true, "waterlogged": true} } + ] + }, + { "at": 5, "do": "remove", "pos": [0, 0, 0] }, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} } + ] + } + ], + "breakpoints": [] +} + From 3c566eb6017dde9667d5371f9f106b3fbab32deb Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 2 Nov 2026 04:34:03 +0100 Subject: [PATCH 70/85] Add Flint tests for golden_dandelion (1 blocks) --- .../golden_dandelion_flower_pot.json | 44 +++++++++++++++++++ ...golden_dandelion_flower_pot_take_back.json | 31 +++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 tests/vegetation/golden_dandelion/golden_dandelion_flower_pot.json create mode 100644 tests/vegetation/golden_dandelion/golden_dandelion_flower_pot_take_back.json diff --git a/tests/vegetation/golden_dandelion/golden_dandelion_flower_pot.json b/tests/vegetation/golden_dandelion/golden_dandelion_flower_pot.json new file mode 100644 index 0000000..725d7b4 --- /dev/null +++ b/tests/vegetation/golden_dandelion/golden_dandelion_flower_pot.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "golden_dandelion_flower_pot", + "description": "Using a golden dandelion on an empty flower pot turns it into a potted golden dandelion and consumes one item, while using a second golden dandelion on the filled pot changes nothing and keeps the item.", + "tags": ["vegetation", "golden_dandelion", "flower", "flower-pot", "player"], + "minecraftIds": ["minecraft:golden_dandelion", "minecraft:flower_pot", "minecraft:potted_golden_dandelion"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [2, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:golden_dandelion", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:flower_pot"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_golden_dandelion" } }, + { "is": {"id": "minecraft:golden_dandelion" , "count": 1}, "slot": "hotbar1" } + ] + }, + {"at": 4, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_golden_dandelion" } }, + { "is": {"id": "minecraft:golden_dandelion" , "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/golden_dandelion/golden_dandelion_flower_pot_take_back.json b/tests/vegetation/golden_dandelion/golden_dandelion_flower_pot_take_back.json new file mode 100644 index 0000000..d44ba10 --- /dev/null +++ b/tests/vegetation/golden_dandelion/golden_dandelion_flower_pot_take_back.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "golden_dandelion_flower_pot_take_back", + "description": "Using an empty hand on a potted golden dandelion gives the player one golden dandelion and turns the pot back into an empty flower pot.", + "tags": ["vegetation", "golden_dandelion", "flower", "flower-pot", "player"], + "minecraftIds": ["minecraft:golden_dandelion", "minecraft:flower_pot", "minecraft:potted_golden_dandelion"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [2, 3, 1] ] + }, + "player": {"inventory": {}, "selected_hotbar": 1, "game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:potted_golden_dandelion"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:flower_pot" } }, + { "is": {"id": "minecraft:golden_dandelion", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + From f6aed9ada25f02f194c3ae9c73663ee5b19a8e68 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 2 Nov 2026 04:53:41 +0100 Subject: [PATCH 71/85] Add Flint tests for grass_block (1 blocks) --- ...ss_block_bone_meal_grows_plants_above.json | 79 ++++++++++++++++++ ...block_bone_meal_ignores_covered_grass.json | 45 ++++++++++ ...ass_block_does_not_spread_in_darkness.json | 67 +++++++++++++++ ...ss_block_does_not_spread_out_of_range.json | 69 +++++++++++++++ ...ck_does_not_spread_to_blocked_targets.json | 80 ++++++++++++++++++ .../grass_block_explosion_drops_dirt.json | 58 +++++++++++++ .../grass_block_hoe_ignores_bottom_face.json | 43 ++++++++++ ...s_block_hoe_ignores_covered_side_face.json | 45 ++++++++++ .../grass_block/grass_block_hoe_top_face.json | 43 ++++++++++ ...block_item_placed_under_snow_is_snowy.json | 45 ++++++++++ ...rass_block_shovel_ignores_bottom_face.json | 43 ++++++++++ ...lock_shovel_ignores_covered_side_face.json | 45 ++++++++++ .../grass_block_shovel_top_face.json | 43 ++++++++++ ...grass_block_snowy_follows_block_above.json | 83 +++++++++++++++++++ .../grass_block_spreads_to_dirt_in_range.json | 74 +++++++++++++++++ ...ck_survives_under_light_passing_block.json | 61 ++++++++++++++ ...ck_turns_to_dirt_under_covering_block.json | 61 ++++++++++++++ ..._block_unchanged_without_random_ticks.json | 61 ++++++++++++++ 18 files changed, 1045 insertions(+) create mode 100644 tests/vegetation/grass_block/grass_block_bone_meal_grows_plants_above.json create mode 100644 tests/vegetation/grass_block/grass_block_bone_meal_ignores_covered_grass.json create mode 100644 tests/vegetation/grass_block/grass_block_does_not_spread_in_darkness.json create mode 100644 tests/vegetation/grass_block/grass_block_does_not_spread_out_of_range.json create mode 100644 tests/vegetation/grass_block/grass_block_does_not_spread_to_blocked_targets.json create mode 100644 tests/vegetation/grass_block/grass_block_explosion_drops_dirt.json create mode 100644 tests/vegetation/grass_block/grass_block_hoe_ignores_bottom_face.json create mode 100644 tests/vegetation/grass_block/grass_block_hoe_ignores_covered_side_face.json create mode 100644 tests/vegetation/grass_block/grass_block_hoe_top_face.json create mode 100644 tests/vegetation/grass_block/grass_block_item_placed_under_snow_is_snowy.json create mode 100644 tests/vegetation/grass_block/grass_block_shovel_ignores_bottom_face.json create mode 100644 tests/vegetation/grass_block/grass_block_shovel_ignores_covered_side_face.json create mode 100644 tests/vegetation/grass_block/grass_block_shovel_top_face.json create mode 100644 tests/vegetation/grass_block/grass_block_snowy_follows_block_above.json create mode 100644 tests/vegetation/grass_block/grass_block_spreads_to_dirt_in_range.json create mode 100644 tests/vegetation/grass_block/grass_block_survives_under_light_passing_block.json create mode 100644 tests/vegetation/grass_block/grass_block_turns_to_dirt_under_covering_block.json create mode 100644 tests/vegetation/grass_block/grass_block_unchanged_without_random_ticks.json diff --git a/tests/vegetation/grass_block/grass_block_bone_meal_grows_plants_above.json b/tests/vegetation/grass_block/grass_block_bone_meal_grows_plants_above.json new file mode 100644 index 0000000..720715a --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_bone_meal_grows_plants_above.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_bone_meal_grows_plants_above", + "description": "Bone meal on the top face of a grass block with air above is consumed and puts a plant on the block above: short grass, tall grass or a flower from the plains flower list (the test world is assumed to be a plains-like biome; the first of the 16 attempts that start above the block places short grass with probability 7/8 and the rest tries flowers, so the cell cannot realistically stay air). The grass block is kept; the block above that is air or the upper half of tall grass.", + "tags": ["vegetation", "grass-block", "bone-meal", "player"], + "minecraftIds": [ + "minecraft:grass_block" , "minecraft:bone_meal" , "minecraft:short_grass" , "minecraft:tall_grass" , + "minecraft:dandelion" , "minecraft:orange_tulip", "minecraft:red_tulip" , "minecraft:pink_tulip" , + "minecraft:white_tulip" , "minecraft:poppy" , "minecraft:azure_bluet" , "minecraft:oxeye_daisy" , + "minecraft:cornflower" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 4, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 7, "do": "interact"}, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, + { + "pos": [0, 1, 0], + "is": [ + {"id": "minecraft:short_grass" }, + {"id": "minecraft:tall_grass" , "half": "lower"}, + {"id": "minecraft:dandelion" }, + {"id": "minecraft:orange_tulip" }, + {"id": "minecraft:red_tulip" }, + {"id": "minecraft:pink_tulip" }, + {"id": "minecraft:white_tulip" }, + {"id": "minecraft:poppy" }, + {"id": "minecraft:azure_bluet" }, + {"id": "minecraft:oxeye_daisy" }, + {"id": "minecraft:cornflower" } + ] + }, + { + "pos": [ 0 , 2 , 0 ], + "is" : [ {"id": "minecraft:air"}, {"id": "minecraft:tall_grass", "half": "upper"} ] + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_bone_meal_ignores_covered_grass.json b/tests/vegetation/grass_block/grass_block_bone_meal_ignores_covered_grass.json new file mode 100644 index 0000000..f50381e --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_bone_meal_ignores_covered_grass.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_bone_meal_ignores_covered_grass", + "description": "Bone meal on the side face of a grass block with stone above is not valid: nothing grows, the grass block and the stone stay, and the bone meal is not consumed.", + "tags": ["vegetation", "grass-block", "bone-meal", "player"], + "minecraftIds": ["minecraft:grass_block", "minecraft:bone_meal", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -2, -1], [2, 1, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [1, -2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [1.5, -1, 0.5], "rot": [90, 0] }, + {"at": 3, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone"} }, + { "is": {"id": "minecraft:bone_meal", "count": 1} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_does_not_spread_in_darkness.json b/tests/vegetation/grass_block/grass_block_does_not_spread_in_darkness.json new file mode 100644 index 0000000..613855b --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_does_not_spread_in_darkness.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_does_not_spread_in_darkness", + "description": "In a sealed, unlit stone box a grass block with air above survives but never spreads onto adjacent dirt, because the light level above it stays below 9 (the same layout with a glowstone is grass_block_spreads_to_dirt_in_range). Nothing happens with a high random tick speed over 200 ticks.", + "tags": ["vegetation", "grass-block", "random-tick", "spread", "modifies-gamerule"], + "minecraftIds": ["minecraft:grass_block", "minecraft:dirt", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -3], [4, 9, 3] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -3], [4, 9, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [-3, 1, -2], [3, 8, 2] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 5, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [ 1, 5, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [-1, 5, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 0, 5, 1], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 0, 4, -1], "block": {"id": "minecraft:dirt" } } + ] + }, + { + "at": 100, + "do": "assert", + "checks": [ + { "pos": [0, 5, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} } + ] + }, + { + "at": 200, + "do": "assert", + "checks": [ + { "pos": [ 0, 5, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, + { "pos": [ 1, 5, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [-1, 5, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [ 0, 5, 1], "is": {"id": "minecraft:dirt" } }, + { "pos": [ 0, 4, -1], "is": {"id": "minecraft:dirt" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_does_not_spread_out_of_range.json b/tests/vegetation/grass_block/grass_block_does_not_spread_out_of_range.json new file mode 100644 index 0000000..b35f164 --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_does_not_spread_out_of_range.json @@ -0,0 +1,69 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_does_not_spread_out_of_range", + "description": "With a high random tick speed and light from a glowstone, a grass block spreads onto dirt next to it (control) but never onto dirt two blocks away horizontally, two blocks above or four blocks below, and neither does the new grass of the control. Everything sits in a sealed stone box. The control stays dirt for 196 ticks with a probability of roughly 1e-5.", + "tags": ["vegetation", "grass-block", "random-tick", "spread", "modifies-gamerule"], + "minecraftIds": ["minecraft:grass_block", "minecraft:dirt", "minecraft:stone", "minecraft:glowstone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -3], [4, 9, 3] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -3], [4, 9, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [-3, 1, -2], [3, 8, 2] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 5, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [-1, 5, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 2, 5, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 0, 5, 2], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 0, 7, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 0, 9, 0], "block": {"id": "minecraft:glowstone" } } + ] + }, + { + "at": 100, + "do": "assert", + "checks": [ + { "pos": [0, 5, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} } + ] + }, + { + "at": 200, + "do": "assert", + "checks": [ + { "pos": [-1, 5, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, + { "pos": [ 2, 5, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [ 0, 5, 2], "is": {"id": "minecraft:dirt" } }, + { "pos": [ 0, 7, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:dirt" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_does_not_spread_to_blocked_targets.json b/tests/vegetation/grass_block/grass_block_does_not_spread_to_blocked_targets.json new file mode 100644 index 0000000..afcee98 --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_does_not_spread_to_blocked_targets.json @@ -0,0 +1,80 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_does_not_spread_to_blocked_targets", + "description": "With a high random tick speed and light from a glowstone, a grass block spreads onto a plain dirt control but not onto coarse dirt, dirt under stone, dirt under a snow block or dirt under a water source, all of which are in range. The water source is enclosed by glass. The control stays dirt for 196 ticks with a probability of roughly 1e-5.", + "tags": ["vegetation", "grass-block", "random-tick", "spread", "modifies-gamerule"], + "minecraftIds": [ + "minecraft:grass_block", "minecraft:dirt" , "minecraft:stone" , "minecraft:glowstone" , + "minecraft:coarse_dirt", "minecraft:snow_block" , "minecraft:water" , "minecraft:glass" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -3], [4, 9, 3] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -3], [4, 9, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [-3, 1, -2], [3, 8, 2] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 5, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [ 0, 5, -1], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 1, 5, 0], "block": {"id": "minecraft:coarse_dirt" } }, + { "pos": [-1, 5, 0], "block": {"id": "minecraft:dirt" } }, + { "pos": [-1, 6, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 5, 1], "block": {"id": "minecraft:dirt" } }, + { "pos": [-1, 6, 1], "block": {"id": "minecraft:snow_block" } }, + { "pos": [ 1, 5, 1], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 1, 6, 1], "block": {"id": "minecraft:water" , "level": 0} }, + { "pos": [ 0, 6, 1], "block": {"id": "minecraft:glass" } }, + { "pos": [ 2, 6, 1], "block": {"id": "minecraft:glass" } }, + { "pos": [ 1, 6, 0], "block": {"id": "minecraft:glass" } }, + { "pos": [ 1, 6, 2], "block": {"id": "minecraft:glass" } }, + { "pos": [ 1, 7, 1], "block": {"id": "minecraft:glass" } }, + { "pos": [ 0, 9, 0], "block": {"id": "minecraft:glowstone" } } + ] + }, + { + "at": 100, + "do": "assert", + "checks": [ + { "pos": [0, 5, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} } + ] + }, + { + "at": 200, + "do": "assert", + "checks": [ + { "pos": [ 0, 5, -1], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, + { "pos": [ 1, 5, 0], "is": {"id": "minecraft:coarse_dirt" } }, + { "pos": [-1, 5, 0], "is": {"id": "minecraft:dirt" } }, + { "pos": [-1, 5, 1], "is": {"id": "minecraft:dirt" } }, + { "pos": [ 1, 5, 1], "is": {"id": "minecraft:dirt" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_explosion_drops_dirt.json b/tests/vegetation/grass_block/grass_block_explosion_drops_dirt.json new file mode 100644 index 0000000..e083aff --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_explosion_drops_dirt.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_explosion_drops_dirt", + "description": "A grass block destroyed by a TNT explosion drops exactly one item entity, a single dirt (without Silk Touch its loot table gives dirt, not the grass block). The floor is obsidian so that nothing else drops, and the player is moved away so it cannot pick the item up.", + "tags": ["vegetation", "grass-block", "drops", "explosion", "tnt"], + "minecraftIds": [ + "minecraft:grass_block", "minecraft:tnt" , "minecraft:obsidian" , "minecraft:dirt" , + "minecraft:item" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 3, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:grass_block", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 2] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 1, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:grass_block"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 12, 0.5], "rot": [0, 0] }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [3.5, 1, 1.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:dirt", "Item.count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_hoe_ignores_bottom_face.json b/tests/vegetation/grass_block/grass_block_hoe_ignores_bottom_face.json new file mode 100644 index 0000000..46bcc29 --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_hoe_ignores_bottom_face.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_hoe_ignores_bottom_face", + "description": "Using an iron hoe on the bottom face of a grass block with air above does nothing, because the bottom face is excluded.", + "tags": ["vegetation", "grass-block", "hoe", "interaction", "player"], + "minecraftIds": ["minecraft:grass_block", "minecraft:iron_hoe", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [0, 3, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 3, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:grass_block" } }, + { "is": {"id": "minecraft:iron_hoe" , "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_hoe_ignores_covered_side_face.json b/tests/vegetation/grass_block/grass_block_hoe_ignores_covered_side_face.json new file mode 100644 index 0000000..c367f2f --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_hoe_ignores_covered_side_face.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_hoe_ignores_covered_side_face", + "description": "Using an iron hoe on the side face of a grass block with stone above does nothing: the grass block and the stone stay.", + "tags": ["vegetation", "grass-block", "hoe", "interaction", "player"], + "minecraftIds": ["minecraft:grass_block", "minecraft:iron_hoe", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -2, -1], [2, 1, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [1, -2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [1.5, -1, 0.5], "rot": [90, 0] }, + {"at": 3, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone" } }, + { "is": {"id": "minecraft:iron_hoe" , "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_hoe_top_face.json b/tests/vegetation/grass_block/grass_block_hoe_top_face.json new file mode 100644 index 0000000..7e3a02c --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_hoe_top_face.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_hoe_top_face", + "description": "Using an iron hoe on the top face of a grass block with air above tills it into farmland and keeps the hoe in the hotbar.", + "tags": ["vegetation", "grass-block", "hoe", "interaction", "player"], + "minecraftIds": ["minecraft:grass_block", "minecraft:iron_hoe", "minecraft:farmland"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_hoe", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:iron_hoe", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_item_placed_under_snow_is_snowy.json b/tests/vegetation/grass_block/grass_block_item_placed_under_snow_is_snowy.json new file mode 100644 index 0000000..06f4c1a --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_item_placed_under_snow_is_snowy.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_item_placed_under_snow_is_snowy", + "description": "A player placing a grass block item into a space with a snow block directly above gets a grass block with snowy=true, and the item is consumed.", + "tags": ["vegetation", "grass-block", "snowy", "placement", "player"], + "minecraftIds": ["minecraft:grass_block", "minecraft:snow_block", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -2, -1], [1, 1, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:grass_block", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [-2, -2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:snow_block"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [-1.5, -1, 0.5], "rot": [-90, 0] }, + {"at": 3, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "true"} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:snow_block"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_shovel_ignores_bottom_face.json b/tests/vegetation/grass_block/grass_block_shovel_ignores_bottom_face.json new file mode 100644 index 0000000..fc4e343 --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_shovel_ignores_bottom_face.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_shovel_ignores_bottom_face", + "description": "Using an iron shovel on the bottom face of a grass block with air above does nothing, because the bottom face is excluded.", + "tags": ["vegetation", "grass-block", "shovel", "interaction", "player"], + "minecraftIds": ["minecraft:grass_block", "minecraft:iron_shovel", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [0, 3, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 3, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:grass_block" } }, + { "is": {"id": "minecraft:iron_shovel", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_shovel_ignores_covered_side_face.json b/tests/vegetation/grass_block/grass_block_shovel_ignores_covered_side_face.json new file mode 100644 index 0000000..7b72dbc --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_shovel_ignores_covered_side_face.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_shovel_ignores_covered_side_face", + "description": "Using an iron shovel on the side face of a grass block with stone above does nothing: the grass block and the stone stay.", + "tags": ["vegetation", "grass-block", "shovel", "interaction", "player"], + "minecraftIds": ["minecraft:grass_block", "minecraft:iron_shovel", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -2, -1], [2, 1, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [1, -2, 0], "block": {"id": "minecraft:stone"} }, + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [1.5, -1, 0.5], "rot": [90, 0] }, + {"at": 3, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone" } }, + { "is": {"id": "minecraft:iron_shovel", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_shovel_top_face.json b/tests/vegetation/grass_block/grass_block_shovel_top_face.json new file mode 100644 index 0000000..1150506 --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_shovel_top_face.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_shovel_top_face", + "description": "Using an iron shovel on the top face of a grass block with air above flattens it into a dirt path and keeps the shovel in the hotbar.", + "tags": ["vegetation", "grass-block", "shovel", "interaction", "player"], + "minecraftIds": ["minecraft:grass_block", "minecraft:iron_shovel", "minecraft:dirt_path"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:iron_shovel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 90] }, + {"at": 3, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt_path" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:iron_shovel", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_snowy_follows_block_above.json b/tests/vegetation/grass_block/grass_block_snowy_follows_block_above.json new file mode 100644 index 0000000..b790145 --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_snowy_follows_block_above.json @@ -0,0 +1,83 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_snowy_follows_block_above", + "description": "A grass block gets snowy=true when a snow layer, snow block or powder snow is placed directly above it, keeps snowy=false under stone or glass, and returns to snowy=false when the snow block above is removed again.", + "tags": ["vegetation", "grass-block", "snowy", "neighbor-update"], + "minecraftIds": [ + "minecraft:grass_block", "minecraft:snow" , "minecraft:snow_block" , "minecraft:powder_snow", + "minecraft:stone" , "minecraft:glass" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [8, 1, 0] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [6, 0, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [8, 0, 0], "block": {"id": "minecraft:grass_block"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, + { "pos": [8, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} } + ] + }, + { + "at": 2, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:snow" } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:snow_block" } }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:powder_snow"} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:glass" } } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "true" } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "true" } }, + { "pos": [4, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "true" } }, + { "pos": [6, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, + { "pos": [8, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} } + ] + }, + { "at": 4, "do": "remove", "pos": [0, 1, 0] }, + { "at": 4, "do": "remove", "pos": [2, 1, 0] }, + { "at": 4, "do": "remove", "pos": [4, 1, 0] }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, + { "pos": [4, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, + { "pos": [6, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_spreads_to_dirt_in_range.json b/tests/vegetation/grass_block/grass_block_spreads_to_dirt_in_range.json new file mode 100644 index 0000000..3f65316 --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_spreads_to_dirt_in_range.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_spreads_to_dirt_in_range", + "description": "With a high random tick speed and light from a glowstone, a grass block with air above spreads onto dirt that lies within one block horizontally and from three blocks below to one block above, including dirt under a single snow layer, which becomes grass with snowy=true. Everything sits in a sealed stone box. Each target is picked by a given random tick attempt with probability about 1/45, so a target stays dirt for 196 ticks with a probability of roughly 1e-5.", + "tags": ["vegetation", "grass-block", "random-tick", "spread", "modifies-gamerule"], + "minecraftIds": [ + "minecraft:grass_block", "minecraft:dirt" , "minecraft:stone" , "minecraft:glowstone" , + "minecraft:snow" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -3], [4, 9, 3] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -3], [4, 9, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [-3, 1, -2], [3, 8, 2] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 5, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [ 1, 6, 1], "block": {"id": "minecraft:dirt" } }, + { "pos": [-1, 2, -1], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 1, 5, -1], "block": {"id": "minecraft:dirt" } }, + { "pos": [ 0, 3, 1], "block": {"id": "minecraft:dirt" } }, + { "pos": [-1, 5, 1], "block": {"id": "minecraft:dirt" } }, + { "pos": [-1, 6, 1], "block": {"id": "minecraft:snow" , "layers": 1} }, + { "pos": [ 0, 9, 0], "block": {"id": "minecraft:glowstone" } } + ] + }, + { + "at": 100, + "do": "assert", + "checks": [ + { "pos": [0, 5, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} } + ] + }, + { + "at": 200, + "do": "assert", + "checks": [ + { "pos": [ 1, 6, 1], "is": {"id": "minecraft:grass_block", "snowy": "false" } }, + { "pos": [-1, 2, -1], "is": {"id": "minecraft:grass_block", "snowy": "false" } }, + { "pos": [ 1, 5, -1], "is": {"id": "minecraft:grass_block", "snowy": "false" } }, + { "pos": [ 0, 3, 1], "is": {"id": "minecraft:grass_block", "snowy": "false" } }, + { "pos": [-1, 5, 1], "is": {"id": "minecraft:grass_block", "snowy": "true" } }, + { "pos": [-1, 6, 1], "is": {"id": "minecraft:snow" , "layers": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_survives_under_light_passing_block.json b/tests/vegetation/grass_block/grass_block_survives_under_light_passing_block.json new file mode 100644 index 0000000..b084315 --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_survives_under_light_passing_block.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_survives_under_light_passing_block", + "description": "With a high random tick speed a grass block stays grass under air, glass, a top slab or a single snow layer (which becomes snowy=true), while a grass block under stone turns into dirt in the same time as a control. The sites are walled in by stone and two blocks apart. Failing to turn the control into dirt in 38 ticks has a probability of roughly 1e-16.", + "tags": ["vegetation", "grass-block", "random-tick", "light", "modifies-gamerule"], + "minecraftIds": [ + "minecraft:grass_block", "minecraft:dirt" , "minecraft:stone" , "minecraft:glass" , + "minecraft:stone_slab" , "minecraft:snow" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 3, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [9, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 2, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [0, 2, 0], "block": {"id": "minecraft:air" } }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [2, 2, 0], "block": {"id": "minecraft:glass" } }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [4, 2, 0], "block": {"id": "minecraft:stone_slab" , "type": "top" } }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:grass_block" } }, + { "pos": [6, 2, 0], "block": {"id": "minecraft:snow" , "layers": 1} }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:grass_block" } } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:grass_block", "snowy": "true" } }, + { "pos": [8, 1, 0], "is": {"id": "minecraft:dirt" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_turns_to_dirt_under_covering_block.json b/tests/vegetation/grass_block/grass_block_turns_to_dirt_under_covering_block.json new file mode 100644 index 0000000..22c4067 --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_turns_to_dirt_under_covering_block.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_turns_to_dirt_under_covering_block", + "description": "With a high random tick speed a grass block turns into dirt when it is covered by stone, a bottom slab, a water source, two snow layers or a snow block, because each of these dampens the light entering from above fully or is a full fluid. The sites are walled in by stone and two blocks apart. A random tick hits a given block with probability about 0.63 per game tick, so failing to turn any one of them in 38 ticks has a probability of roughly 1e-16.", + "tags": ["vegetation", "grass-block", "random-tick", "light", "modifies-gamerule"], + "minecraftIds": [ + "minecraft:grass_block", "minecraft:dirt" , "minecraft:stone" , "minecraft:stone_slab" , + "minecraft:water" , "minecraft:snow" , "minecraft:snow_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 3, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 4096 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [9, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 2, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [2, 2, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "pos": [4, 2, 0], "block": {"id": "minecraft:water", "level": 0} }, + { "pos": [6, 2, 0], "block": {"id": "minecraft:snow", "layers": 2} }, + { "pos": [8, 2, 0], "block": {"id": "minecraft:snow_block"} } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:dirt"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:dirt"} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:dirt"} }, + { "pos": [8, 1, 0], "is": {"id": "minecraft:dirt"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/grass_block/grass_block_unchanged_without_random_ticks.json b/tests/vegetation/grass_block/grass_block_unchanged_without_random_ticks.json new file mode 100644 index 0000000..33cee8b --- /dev/null +++ b/tests/vegetation/grass_block/grass_block_unchanged_without_random_ticks.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grass_block_unchanged_without_random_ticks", + "description": "With random tick speed 0 a grass block stays grass for 100 ticks even when it is covered by stone, a bottom slab, a water source, two snow layers or a snow block, which shows that grass only turns into dirt through random ticks (the same layout with a high random tick speed is grass_block_turns_to_dirt_under_covering_block).", + "tags": ["vegetation", "grass-block", "random-tick", "modifies-gamerule"], + "minecraftIds": [ + "minecraft:grass_block", "minecraft:dirt" , "minecraft:stone" , "minecraft:stone_slab" , + "minecraft:water" , "minecraft:snow" , "minecraft:snow_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [9, 3, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [9, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 2, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:grass_block"} }, + { "pos": [2, 2, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "pos": [4, 2, 0], "block": {"id": "minecraft:water", "level": 0} }, + { "pos": [6, 2, 0], "block": {"id": "minecraft:snow", "layers": 2} }, + { "pos": [8, 2, 0], "block": {"id": "minecraft:snow_block"} } + ] + }, + { + "at": 100, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:grass_block"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:grass_block"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:grass_block"} }, + { "pos": [6, 1, 0], "is": {"id": "minecraft:grass_block"} }, + { "pos": [8, 1, 0], "is": {"id": "minecraft:grass_block"} } + ] + } + ], + "breakpoints": [] +} + From 0ecd62381a4c196d12b3087a9224578d0a5aca0a Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 2 Nov 2026 04:58:48 +0100 Subject: [PATCH 72/85] Add Flint tests for gravel (1 blocks) --- .../gravel/gravel_column_falls_together.json | 43 ++++++++++++++++ .../gravel_explosion_drops_one_item.json | 41 +++++++++++++++ ...l_falling_onto_bottom_slab_drops_item.json | 36 +++++++++++++ .../gravel_falling_onto_torch_drops_item.json | 36 +++++++++++++ .../gravel/gravel_falls_into_water_pool.json | 41 +++++++++++++++ .../gravel/gravel_falls_onto_floor.json | 41 +++++++++++++++ .../gravel_falls_when_support_removed.json | 50 +++++++++++++++++++ .../gravel/gravel_replaces_short_grass.json | 41 +++++++++++++++ .../gravel/gravel_rests_on_bottom_slab.json | 34 +++++++++++++ .../gravity/gravel/gravel_rests_on_torch.json | 34 +++++++++++++ .../gravel_sets_note_block_instrument.json | 34 +++++++++++++ .../gravel/gravel_stays_on_solid_ground.json | 40 +++++++++++++++ .../gravel/gravel_survival_placement.json | 47 +++++++++++++++++ 13 files changed, 518 insertions(+) create mode 100644 tests/gravity/gravel/gravel_column_falls_together.json create mode 100644 tests/gravity/gravel/gravel_explosion_drops_one_item.json create mode 100644 tests/gravity/gravel/gravel_falling_onto_bottom_slab_drops_item.json create mode 100644 tests/gravity/gravel/gravel_falling_onto_torch_drops_item.json create mode 100644 tests/gravity/gravel/gravel_falls_into_water_pool.json create mode 100644 tests/gravity/gravel/gravel_falls_onto_floor.json create mode 100644 tests/gravity/gravel/gravel_falls_when_support_removed.json create mode 100644 tests/gravity/gravel/gravel_replaces_short_grass.json create mode 100644 tests/gravity/gravel/gravel_rests_on_bottom_slab.json create mode 100644 tests/gravity/gravel/gravel_rests_on_torch.json create mode 100644 tests/gravity/gravel/gravel_sets_note_block_instrument.json create mode 100644 tests/gravity/gravel/gravel_stays_on_solid_ground.json create mode 100644 tests/gravity/gravel/gravel_survival_placement.json diff --git a/tests/gravity/gravel/gravel_column_falls_together.json b/tests/gravity/gravel/gravel_column_falls_together.json new file mode 100644 index 0000000..7438086 --- /dev/null +++ b/tests/gravity/gravel/gravel_column_falls_together.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "gravel_column_falls_together", + "description": "A filled column of gravel over air falls and lands as an intact column on the floor.", + "tags": ["gravity", "gravel", "falling"], + "minecraftIds": ["minecraft:gravel", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 9, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [2, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [1, 5, 1], [1, 7, 1] ], + "with": {"id": "minecraft:gravel"} + }, + { + "at": 60, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:gravel"} }, + { "pos": [1, 2, 1], "is": {"id": "minecraft:gravel"} }, + { "pos": [1, 3, 1], "is": {"id": "minecraft:gravel"} }, + { "pos": [1, 4, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 5, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 6, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 7, 1], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/gravel/gravel_explosion_drops_one_item.json b/tests/gravity/gravel/gravel_explosion_drops_one_item.json new file mode 100644 index 0000000..b8f7591 --- /dev/null +++ b/tests/gravity/gravel/gravel_explosion_drops_one_item.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "gravel_explosion_drops_one_item", + "description": "Gravel destroyed by a TNT explosion on an obsidian floor disappears and drops exactly one item entity (the loot is random, so which item it is is not asserted).", + "tags": ["gravity", "gravel", "drops", "explosion"], + "minecraftIds": ["minecraft:gravel", "minecraft:obsidian", "minecraft:tnt", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [14, 4, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [10, 0, 0], [13, 0, 2] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 1, "do": "place", "pos": [12, 1, 1], "block": {"id": "minecraft:gravel"} }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [12.5, 1, 2.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 60, + "do": "assert", + "checks": [ + { "pos": [12, 1, 1], "is": {"id": "minecraft:air"} }, + { "is": "minecraft:item" , "exists": true, "count": 1 } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/gravel/gravel_falling_onto_bottom_slab_drops_item.json b/tests/gravity/gravel/gravel_falling_onto_bottom_slab_drops_item.json new file mode 100644 index 0000000..d69e216 --- /dev/null +++ b/tests/gravity/gravel/gravel_falling_onto_bottom_slab_drops_item.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "gravel_falling_onto_bottom_slab_drops_item", + "description": "Gravel falling onto a bottom slab cannot replace it and does not settle on the half block, so it breaks into a gravel item.", + "tags": ["gravity", "gravel", "falling", "drops", "slab"], + "minecraftIds": ["minecraft:gravel", "minecraft:stone", "minecraft:stone_slab", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [14, 6, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [10, 0, 0], [12, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [11, 1, 1], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 1, "do": "place", "pos": [11, 5, 1], "block": {"id": "minecraft:gravel"} }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [11, 5, 1], "is": {"id": "minecraft:air"} } , + { "pos": [11, 1, 1], "is": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "pos": [11, 2, 1], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/gravel/gravel_falling_onto_torch_drops_item.json b/tests/gravity/gravel/gravel_falling_onto_torch_drops_item.json new file mode 100644 index 0000000..d4cf8bd --- /dev/null +++ b/tests/gravity/gravel/gravel_falling_onto_torch_drops_item.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "gravel_falling_onto_torch_drops_item", + "description": "Gravel falling onto a floor torch cannot replace it, so it breaks into a gravel item and the torch survives.", + "tags": ["gravity", "gravel", "falling", "drops"], + "minecraftIds": ["minecraft:gravel", "minecraft:stone", "minecraft:torch", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [14, 6, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [10, 0, 0], [12, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [11, 1, 1], "block": {"id": "minecraft:torch"} }, + { "at": 1, "do": "place", "pos": [11, 5, 1], "block": {"id": "minecraft:gravel"} }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [11, 5, 1], "is": {"id": "minecraft:air"} }, + { "pos": [11, 1, 1], "is": {"id": "minecraft:torch"} }, + { "pos": [11, 2, 1], "is": {"id": "minecraft:air"} }, + { "is": "minecraft:item" , "exists": true, "count": 1 } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/gravel/gravel_falls_into_water_pool.json b/tests/gravity/gravel/gravel_falls_into_water_pool.json new file mode 100644 index 0000000..80c6b20 --- /dev/null +++ b/tests/gravity/gravel/gravel_falls_into_water_pool.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "gravel_falls_into_water_pool", + "description": "Falling gravel passes through water, sinks to the pool floor, and replaces the bottom water block while the water above remains.", + "tags": ["gravity", "gravel", "falling", "water"], + "minecraftIds": ["minecraft:gravel", "minecraft:stone", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 8, 3] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 3, 3] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [0, 1, 0], [2, 3, 2] ], + "with": {"id": "minecraft:water", "level": 0} + }, + { "at": 3, "do": "place", "pos": [1, 7, 1], "block": {"id": "minecraft:gravel"} }, + { + "at": 60, + "do": "assert", + "checks": [ + { "pos": [1, 7, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:gravel"} }, + { "pos": [1, 2, 1], "is": {"id": "minecraft:water" } }, + { "pos": [1, 3, 1], "is": {"id": "minecraft:water" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/gravel/gravel_falls_onto_floor.json b/tests/gravity/gravel/gravel_falls_onto_floor.json new file mode 100644 index 0000000..3de0a04 --- /dev/null +++ b/tests/gravity/gravel/gravel_falls_onto_floor.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "gravel_falls_onto_floor", + "description": "Gravel placed over air stays for the 2-tick schedule delay, then falls and lands on stone as gravel, leaving its starting position empty.", + "tags": ["gravity", "gravel", "falling"], + "minecraftIds": ["minecraft:gravel", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 6, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [2, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [1, 5, 1], "block": {"id": "minecraft:gravel"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 5, 1], "is": {"id": "minecraft:gravel"} } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [1, 5, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:gravel"} }, + { "pos": [1, 0, 1], "is": {"id": "minecraft:stone" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/gravel/gravel_falls_when_support_removed.json b/tests/gravity/gravel/gravel_falls_when_support_removed.json new file mode 100644 index 0000000..3cf5c7e --- /dev/null +++ b/tests/gravity/gravel/gravel_falls_when_support_removed.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "gravel_falls_when_support_removed", + "description": "Resting gravel falls to the next solid floor after the stone supporting it is removed.", + "tags": ["gravity", "gravel", "support", "neighbor-update"], + "minecraftIds": ["minecraft:gravel", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 6, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [2, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [1, 1, 1], [1, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [1, 4, 1], "block": {"id": "minecraft:gravel"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 4, 1], "is": {"id": "minecraft:gravel"} } + ] + }, + { "at": 11, "do": "remove", "pos": [1, 3, 1] }, + { "at": 11, "do": "remove", "pos": [1, 2, 1] }, + { "at": 11, "do": "remove", "pos": [1, 1, 1] }, + { + "at": 50, + "do": "assert", + "checks": [ + { "pos": [1, 4, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:gravel"} }, + { "pos": [1, 2, 1], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/gravel/gravel_replaces_short_grass.json b/tests/gravity/gravel/gravel_replaces_short_grass.json new file mode 100644 index 0000000..c5ae35b --- /dev/null +++ b/tests/gravity/gravel/gravel_replaces_short_grass.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "gravel_replaces_short_grass", + "description": "Falling gravel lands in the position of short grass, replacing it, because short grass is replaceable.", + "tags": ["gravity", "gravel", "falling", "replaceable"], + "minecraftIds": ["minecraft:gravel", "minecraft:stone", "minecraft:short_grass"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 6, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [2, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:short_grass"} }, + { "at": 1, "do": "place", "pos": [1, 5, 1], "block": {"id": "minecraft:gravel"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:short_grass"} } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [1, 5, 1], "is": {"id": "minecraft:air" } }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:gravel"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/gravel/gravel_rests_on_bottom_slab.json b/tests/gravity/gravel/gravel_rests_on_bottom_slab.json new file mode 100644 index 0000000..450a7b2 --- /dev/null +++ b/tests/gravity/gravel/gravel_rests_on_bottom_slab.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "gravel_rests_on_bottom_slab", + "description": "Gravel placed on top of a bottom slab stays where it is because the slab is not free space.", + "tags": ["gravity", "gravel", "support", "slab"], + "minecraftIds": ["minecraft:gravel", "minecraft:stone", "minecraft:stone_slab"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 4, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [2, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 1, "do": "place", "pos": [1, 2, 1], "block": {"id": "minecraft:gravel"} }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [1, 2, 1], "is": {"id": "minecraft:gravel" } }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:stone_slab", "type": "bottom"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/gravel/gravel_rests_on_torch.json b/tests/gravity/gravel/gravel_rests_on_torch.json new file mode 100644 index 0000000..b5a49da --- /dev/null +++ b/tests/gravity/gravel/gravel_rests_on_torch.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "gravel_rests_on_torch", + "description": "Gravel placed on top of a torch is not on free space (a torch is not replaceable), so it stays and the torch survives.", + "tags": ["gravity", "gravel", "support"], + "minecraftIds": ["minecraft:gravel", "minecraft:stone", "minecraft:torch"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 4, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [2, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:torch"} }, + { "at": 1, "do": "place", "pos": [1, 2, 1], "block": {"id": "minecraft:gravel"} }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [1, 2, 1], "is": {"id": "minecraft:gravel"} }, + { "pos": [1, 1, 1], "is": {"id": "minecraft:torch" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/gravel/gravel_sets_note_block_instrument.json b/tests/gravity/gravel/gravel_sets_note_block_instrument.json new file mode 100644 index 0000000..c23b778 --- /dev/null +++ b/tests/gravity/gravel/gravel_sets_note_block_instrument.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "gravel_sets_note_block_instrument", + "description": "A note block above gravel switches to the snare instrument once gravel is placed below it.", + "tags": ["gravity", "gravel", "note-block", "neighbor-update"], + "minecraftIds": ["minecraft:gravel", "minecraft:stone", "minecraft:note_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 4, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [2, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [1, 2, 1], "block": {"id": "minecraft:note_block"} }, + { "at": 1, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:gravel"} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:gravel" } }, + { "pos": [1, 2, 1], "is": {"id": "minecraft:note_block", "instrument": "snare"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/gravel/gravel_stays_on_solid_ground.json b/tests/gravity/gravel/gravel_stays_on_solid_ground.json new file mode 100644 index 0000000..ea7adbe --- /dev/null +++ b/tests/gravity/gravel/gravel_stays_on_solid_ground.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "gravel_stays_on_solid_ground", + "description": "Gravel placed directly on stone does not fall and is still there later.", + "tags": ["gravity", "gravel", "support"], + "minecraftIds": ["minecraft:gravel", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [2, 3, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [2, 0, 2] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:gravel"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:gravel"} } + ] + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:gravel"} }, + { "pos": [1, 2, 1], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/gravity/gravel/gravel_survival_placement.json b/tests/gravity/gravel/gravel_survival_placement.json new file mode 100644 index 0000000..bd134d5 --- /dev/null +++ b/tests/gravity/gravel/gravel_survival_placement.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "gravel_survival_placement", + "description": "Gravel placed by a survival player onto stone stays in place, does not fall, and consumes the item.", + "tags": ["gravity", "gravel", "placement", "player"], + "minecraftIds": ["minecraft:gravel", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:gravel", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:gravel" } }, + { "is": {"id": "minecraft:air" , "count": 0}, "slot": "hotbar1" } + ] + }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:gravel"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + From c5ba6654f6f5f94f8ce03c82987c8c085b0ca4fc Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 2 Nov 2026 05:04:26 +0100 Subject: [PATCH 73/85] Add Flint tests for grindstone (1 blocks) --- .../grindstone_blocks_piston_push.json | 41 +++++++++++++++ .../grindstone_ceiling_placement_facing.json | 44 ++++++++++++++++ .../grindstone/grindstone_default_state.json | 26 ++++++++++ .../grindstone_explosion_drops_item.json | 46 ++++++++++++++++ .../grindstone_floor_placement_facing.json | 52 +++++++++++++++++++ ...dstone_placement_follows_clicked_face.json | 44 ++++++++++++++++ ...stone_placement_on_non_sturdy_support.json | 44 ++++++++++++++++ .../grindstone_survives_support_removal.json | 51 ++++++++++++++++++ .../grindstone_wall_placement_facing.json | 52 +++++++++++++++++++ 9 files changed, 400 insertions(+) create mode 100644 tests/decoration/grindstone/grindstone_blocks_piston_push.json create mode 100644 tests/decoration/grindstone/grindstone_ceiling_placement_facing.json create mode 100644 tests/decoration/grindstone/grindstone_default_state.json create mode 100644 tests/decoration/grindstone/grindstone_explosion_drops_item.json create mode 100644 tests/decoration/grindstone/grindstone_floor_placement_facing.json create mode 100644 tests/decoration/grindstone/grindstone_placement_follows_clicked_face.json create mode 100644 tests/decoration/grindstone/grindstone_placement_on_non_sturdy_support.json create mode 100644 tests/decoration/grindstone/grindstone_survives_support_removal.json create mode 100644 tests/decoration/grindstone/grindstone_wall_placement_facing.json diff --git a/tests/decoration/grindstone/grindstone_blocks_piston_push.json b/tests/decoration/grindstone/grindstone_blocks_piston_push.json new file mode 100644 index 0000000..6cb1ca9 --- /dev/null +++ b/tests/decoration/grindstone/grindstone_blocks_piston_push.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grindstone_blocks_piston_push", + "description": "A powered piston facing a grindstone cannot extend and the grindstone does not move, while an identical piston facing stone extends and pushes it.", + "tags": ["grindstone", "piston", "push-reaction"], + "minecraftIds": ["minecraft:grindstone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 2, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston", "facing": "east", "extended": false} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:grindstone", "face": "floor", "facing": "north"} }, + { "pos": [0, 1, 4], "block": {"id": "minecraft:piston", "facing": "east", "extended": false} }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { "at": 1, "do": "place", "pos": [0, 2, 4], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": false} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:grindstone", "face": "floor", "facing": "north"} }, + { "pos": [0, 1, 4], "is": {"id": "minecraft:piston", "facing": "east", "extended": true} }, + { "pos": [1, 1, 4], "is": {"id": "minecraft:piston_head", "facing": "east"} }, + { "pos": [2, 1, 4], "is": {"id": "minecraft:stone"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/grindstone/grindstone_ceiling_placement_facing.json b/tests/decoration/grindstone/grindstone_ceiling_placement_facing.json new file mode 100644 index 0000000..3a1cfc4 --- /dev/null +++ b/tests/decoration/grindstone/grindstone_ceiling_placement_facing.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grindstone_ceiling_placement_facing", + "description": "A survival player looking straight up at the underside of a block places a face=ceiling grindstone whose facing is the player's horizontal direction, consuming one item each time.", + "tags": ["grindstone", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:grindstone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:grindstone", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 3, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 3, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 0, 0.5], "rot": [90, -90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:grindstone", "face": "ceiling", "facing": "south"} }, + { "pos": [4, 2, 0], "is": {"id": "minecraft:grindstone", "face": "ceiling", "facing": "west"} } , + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/grindstone/grindstone_default_state.json b/tests/decoration/grindstone/grindstone_default_state.json new file mode 100644 index 0000000..098d0fe --- /dev/null +++ b/tests/decoration/grindstone/grindstone_default_state.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grindstone_default_state", + "description": "A grindstone placed without properties has the default state face=wall, facing=north.", + "tags": ["grindstone", "placement", "block-state"], + "minecraftIds": ["minecraft:grindstone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:grindstone"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:grindstone", "face": "wall", "facing": "north"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/grindstone/grindstone_explosion_drops_item.json b/tests/decoration/grindstone/grindstone_explosion_drops_item.json new file mode 100644 index 0000000..23a4f40 --- /dev/null +++ b/tests/decoration/grindstone/grindstone_explosion_drops_item.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grindstone_explosion_drops_item", + "description": "A grindstone destroyed by an explosion drops exactly one grindstone item (loot table survives_explosion, no tool required for explosion drops).", + "tags": ["grindstone", "drops", "explosion"], + "minecraftIds": ["minecraft:grindstone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [14, 3, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [8, 0, 0], [14, 0, 4] ], + "with": {"id": "minecraft:obsidian"} + }, + { + "at": 1, + "do": "place", + "pos": [11, 1, 2], + "block": {"id": "minecraft:grindstone", "face": "floor", "facing": "north"} + }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [12.5, 1, 2.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [11, 1, 2], "is": {"id": "minecraft:air"} }, + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:grindstone", "Item.count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/grindstone/grindstone_floor_placement_facing.json b/tests/decoration/grindstone/grindstone_floor_placement_facing.json new file mode 100644 index 0000000..559bf9b --- /dev/null +++ b/tests/decoration/grindstone/grindstone_floor_placement_facing.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grindstone_floor_placement_facing", + "description": "A survival player looking straight down at the top of a block places a face=floor grindstone whose facing is the player's horizontal direction (yaw 0 = south, 90 = west, 180 = north, -90 = east), consuming one item each time.", + "tags": ["grindstone", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:grindstone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [13, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:grindstone", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 4, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 8, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [12, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 4, 0.5], "rot": [90, 90] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [8.5, 4, 0.5], "rot": [180, 90] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [12.5, 4, 0.5], "rot": [-90, 90] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:grindstone", "face": "floor", "facing": "south"} }, + { "pos": [4, 2, 0], "is": {"id": "minecraft:grindstone", "face": "floor", "facing": "west"} } , + { "pos": [8, 2, 0], "is": {"id": "minecraft:grindstone", "face": "floor", "facing": "north"} }, + { "pos": [12, 2, 0], "is": {"id": "minecraft:grindstone", "face": "floor", "facing": "east"} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/grindstone/grindstone_placement_follows_clicked_face.json b/tests/decoration/grindstone/grindstone_placement_follows_clicked_face.json new file mode 100644 index 0000000..4c1ce0c --- /dev/null +++ b/tests/decoration/grindstone/grindstone_placement_follows_clicked_face.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grindstone_placement_follows_clicked_face", + "description": "The clicked face takes priority over the look direction: clicking the top of a block at a shallow pitch still gives a face=floor grindstone facing the player's horizontal direction, and clicking the side of a block at a steep pitch still gives a face=wall grindstone facing away from that side.", + "tags": ["grindstone", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:grindstone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 3, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:grindstone", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, -2.5], "rot": [0, 36] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.05, 2.5, 0.5], "rot": [-90, 70] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:grindstone", "face": "floor", "facing": "south"} }, + { "pos": [3, 1, 0], "is": {"id": "minecraft:grindstone", "face": "wall", "facing": "west"} } , + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/grindstone/grindstone_placement_on_non_sturdy_support.json b/tests/decoration/grindstone/grindstone_placement_on_non_sturdy_support.json new file mode 100644 index 0000000..205f71b --- /dev/null +++ b/tests/decoration/grindstone/grindstone_placement_on_non_sturdy_support.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grindstone_placement_on_non_sturdy_support", + "description": "A grindstone can be placed against the side of blocks with no sturdy face, such as a glass pane or a fence, because canSurvive always returns true.", + "tags": ["grindstone", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:grindstone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -2], [5, 2, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:grindstone", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:glass_pane"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:oak_fence" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, -3.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 0, -3.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, -1], "is": {"id": "minecraft:grindstone", "face": "wall", "facing": "north"} }, + { "pos": [4, 1, -1], "is": {"id": "minecraft:grindstone", "face": "wall", "facing": "north"} }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/grindstone/grindstone_survives_support_removal.json b/tests/decoration/grindstone/grindstone_survives_support_removal.json new file mode 100644 index 0000000..fd88bf7 --- /dev/null +++ b/tests/decoration/grindstone/grindstone_survives_support_removal.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grindstone_survives_support_removal", + "description": "Wall, floor and ceiling grindstones stay in place with their state unchanged after the block they are attached to is removed, because canSurvive always returns true.", + "tags": ["grindstone", "block-state", "support"], + "minecraftIds": ["minecraft:grindstone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [8, 3, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 3, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:grindstone", "face": "wall" , "facing": "north"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:grindstone", "face": "floor" , "facing": "east" } }, + { "pos": [8, 2, 0], "block": {"id": "minecraft:grindstone", "face": "ceiling", "facing": "west" } } + ] + }, + { "at": 2, "do": "remove", "pos": [0, 1, 1] }, + { "at": 2, "do": "remove", "pos": [4, 0, 0] }, + { "at": 2, "do": "remove", "pos": [8, 3, 0] }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 1, 1], "is": {"id": "minecraft:air" } }, + { "pos": [4, 0, 0], "is": {"id": "minecraft:air" } }, + { "pos": [8, 3, 0], "is": {"id": "minecraft:air" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:grindstone", "face": "wall" , "facing": "north"} }, + { "pos": [4, 1, 0], "is": {"id": "minecraft:grindstone", "face": "floor" , "facing": "east" } }, + { "pos": [8, 2, 0], "is": {"id": "minecraft:grindstone", "face": "ceiling", "facing": "west" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/grindstone/grindstone_wall_placement_facing.json b/tests/decoration/grindstone/grindstone_wall_placement_facing.json new file mode 100644 index 0000000..3a41cdd --- /dev/null +++ b/tests/decoration/grindstone/grindstone_wall_placement_facing.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "grindstone_wall_placement_facing", + "description": "A survival player looking level at the side of a block places a face=wall grindstone against that side, facing away from the block toward the player.", + "tags": ["grindstone", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:grindstone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 2, 7] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:grindstone", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 6], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 6], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, -3.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 0, 3.5], "rot": [180, 0] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [-3.5, 0, 6.5], "rot": [-90, 0] }, + {"at": 3, "do": "interact"}, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [7.5, 0, 6.5], "rot": [90, 0] }, + {"at": 4, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, -1], "is": {"id": "minecraft:grindstone", "face": "wall", "facing": "north"} }, + { "pos": [4, 1, 1], "is": {"id": "minecraft:grindstone", "face": "wall", "facing": "south"} } , + { "pos": [-1, 1, 6], "is": {"id": "minecraft:grindstone", "face": "wall", "facing": "west"} } , + { "pos": [5, 1, 6], "is": {"id": "minecraft:grindstone", "face": "wall", "facing": "east"} } , + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + From 23c0f8c089acd344bf0a776ff7ee890589677d88 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 2 Nov 2026 05:09:42 +0100 Subject: [PATCH 74/85] Add Flint tests for hanging_roots (1 blocks) --- ...g_roots_breaks_under_non_sturdy_block.json | 46 ++++++++++++ .../hanging_roots_destroyed_by_explosion.json | 63 ++++++++++++++++ .../hanging_roots_destroyed_by_piston.json | 66 +++++++++++++++++ ...roots_flowing_water_does_not_waterlog.json | 55 ++++++++++++++ .../hanging_roots_lava_does_not_destroy.json | 55 ++++++++++++++ ...ing_roots_placement_rejected_on_floor.json | 54 ++++++++++++++ .../hanging_roots_placement_slab_support.json | 72 +++++++++++++++++++ .../hanging_roots_placement_under_block.json | 53 ++++++++++++++ .../hanging_roots_placement_waterlogged.json | 54 ++++++++++++++ .../hanging_roots_replaced_by_block.json | 61 ++++++++++++++++ .../hanging_roots_support_loss.json | 53 ++++++++++++++ ...nging_roots_waterlogged_spreads_water.json | 49 +++++++++++++ ...anging_roots_waterlogged_support_loss.json | 55 ++++++++++++++ 13 files changed, 736 insertions(+) create mode 100644 tests/vegetation/hanging_roots/hanging_roots_breaks_under_non_sturdy_block.json create mode 100644 tests/vegetation/hanging_roots/hanging_roots_destroyed_by_explosion.json create mode 100644 tests/vegetation/hanging_roots/hanging_roots_destroyed_by_piston.json create mode 100644 tests/vegetation/hanging_roots/hanging_roots_flowing_water_does_not_waterlog.json create mode 100644 tests/vegetation/hanging_roots/hanging_roots_lava_does_not_destroy.json create mode 100644 tests/vegetation/hanging_roots/hanging_roots_placement_rejected_on_floor.json create mode 100644 tests/vegetation/hanging_roots/hanging_roots_placement_slab_support.json create mode 100644 tests/vegetation/hanging_roots/hanging_roots_placement_under_block.json create mode 100644 tests/vegetation/hanging_roots/hanging_roots_placement_waterlogged.json create mode 100644 tests/vegetation/hanging_roots/hanging_roots_replaced_by_block.json create mode 100644 tests/vegetation/hanging_roots/hanging_roots_support_loss.json create mode 100644 tests/vegetation/hanging_roots/hanging_roots_waterlogged_spreads_water.json create mode 100644 tests/vegetation/hanging_roots/hanging_roots_waterlogged_support_loss.json diff --git a/tests/vegetation/hanging_roots/hanging_roots_breaks_under_non_sturdy_block.json b/tests/vegetation/hanging_roots/hanging_roots_breaks_under_non_sturdy_block.json new file mode 100644 index 0000000..4d61215 --- /dev/null +++ b/tests/vegetation/hanging_roots/hanging_roots_breaks_under_non_sturdy_block.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hanging_roots_breaks_under_non_sturdy_block", + "description": "Hanging roots break when the block above is replaced by an oak fence, whose underside is not sturdy, but survive when it is replaced by oak planks.", + "tags": ["vegetation", "hanging-roots", "support", "neighbor-update", "fence"], + "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone", "minecraft:oak_fence", "minecraft:oak_planks"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 3, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, + { "at": 1, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, + { "at": 3, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:oak_fence"} }, + { "at": 3, "do": "place", "pos": [2, 2, 0], "block": {"id": "minecraft:oak_planks"} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:oak_fence" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [2, 2, 0], "is": {"id": "minecraft:oak_planks" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:hanging_roots"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/hanging_roots/hanging_roots_destroyed_by_explosion.json b/tests/vegetation/hanging_roots/hanging_roots_destroyed_by_explosion.json new file mode 100644 index 0000000..4ace04c --- /dev/null +++ b/tests/vegetation/hanging_roots/hanging_roots_destroyed_by_explosion.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hanging_roots_destroyed_by_explosion", + "description": "An explosion next to hanging roots destroys them and, with no shears involved, leaves no item behind.", + "tags": ["vegetation", "hanging-roots", "explosion", "drops"], + "minecraftIds": ["minecraft:hanging_roots", "minecraft:obsidian", "minecraft:tnt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 2, 1] ], + "with": {"id": "minecraft:obsidian"} + }, + { + "at": 1, + "do": "fill", + "region": [ [1, 1, 0], [1, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 2, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:hanging_roots"} } + ] + }, + { + "at": 4, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [1.5, 1, 0.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, + { "pos": [0, 2, 0], "is": {"id": "minecraft:obsidian"} }, + { "is": "minecraft:item" , "exists": false } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/hanging_roots/hanging_roots_destroyed_by_piston.json b/tests/vegetation/hanging_roots/hanging_roots_destroyed_by_piston.json new file mode 100644 index 0000000..2cae155 --- /dev/null +++ b/tests/vegetation/hanging_roots/hanging_roots_destroyed_by_piston.json @@ -0,0 +1,66 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hanging_roots_destroyed_by_piston", + "description": "An extending piston destroys hanging roots in front of it instead of pushing them, so the air behind the piston head stays empty.", + "tags": ["vegetation", "hanging-roots", "piston", "push-reaction", "redstone"], + "minecraftIds": [ + "minecraft:hanging_roots" , "minecraft:piston" , "minecraft:piston_head" , "minecraft:redstone_block", + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [4, 3, 2] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [4, 3, 2] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [2, 1, 0], [2, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 2, + "do": "place", + "pos": [0, 1, 0], + "block": {"id": "minecraft:piston", "facing": "east", "extended": false} + }, + { "at": 2, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston" , "extended": false} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:hanging_roots" } } + ] + }, + { "at": 4, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 14, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston" , "extended": true, "facing": "east"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/hanging_roots/hanging_roots_flowing_water_does_not_waterlog.json b/tests/vegetation/hanging_roots/hanging_roots_flowing_water_does_not_waterlog.json new file mode 100644 index 0000000..7128a73 --- /dev/null +++ b/tests/vegetation/hanging_roots/hanging_roots_flowing_water_does_not_waterlog.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hanging_roots_flowing_water_does_not_waterlog", + "description": "Flowing water from a source next to dry hanging roots neither waterlogs nor destroys them and does not pass through them to the air behind.", + "tags": ["vegetation", "hanging-roots", "waterlogged", "fluid"], + "minecraftIds": ["minecraft:hanging_roots", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [3, 2, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -1], [3, 2, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 1, 0], [0, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "fill", + "region": [ [2, 1, 0], [2, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 2, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, + { "at": 4, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [ 2, 1, 0], "is": {"id": "minecraft:water" } }, + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:hanging_roots", "waterlogged": false} }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/hanging_roots/hanging_roots_lava_does_not_destroy.json b/tests/vegetation/hanging_roots/hanging_roots_lava_does_not_destroy.json new file mode 100644 index 0000000..82d7a5e --- /dev/null +++ b/tests/vegetation/hanging_roots/hanging_roots_lava_does_not_destroy.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hanging_roots_lava_does_not_destroy", + "description": "Lava next to hanging roots spreads elsewhere but cannot enter the roots, so they stay and the air behind them stays empty.", + "tags": ["vegetation", "hanging-roots", "fluid", "lava"], + "minecraftIds": ["minecraft:hanging_roots", "minecraft:lava", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [3, 2, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -1], [3, 2, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [-1, 1, 0], [0, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "fill", + "region": [ [2, 1, 0], [2, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 2, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, + { "at": 4, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:lava", "level": 0} }, + { + "at": 80, + "do": "assert", + "checks": [ + { "pos": [ 2, 1, 0], "is": {"id": "minecraft:lava" } }, + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:hanging_roots"} }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/hanging_roots/hanging_roots_placement_rejected_on_floor.json b/tests/vegetation/hanging_roots/hanging_roots_placement_rejected_on_floor.json new file mode 100644 index 0000000..a6bedd6 --- /dev/null +++ b/tests/vegetation/hanging_roots/hanging_roots_placement_rejected_on_floor.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hanging_roots_placement_rejected_on_floor", + "description": "Hanging roots used on the top face of a block place nothing because the roots would have no sturdy block above them, and the item is kept.", + "tags": ["vegetation", "hanging-roots", "placement", "support", "player"], + "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:hanging_roots", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 1, 0], [0, 4, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:hanging_roots", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/hanging_roots/hanging_roots_placement_slab_support.json b/tests/vegetation/hanging_roots/hanging_roots_placement_slab_support.json new file mode 100644 index 0000000..55c828b --- /dev/null +++ b/tests/vegetation/hanging_roots/hanging_roots_placement_slab_support.json @@ -0,0 +1,72 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hanging_roots_placement_slab_support", + "description": "Hanging roots used under a top slab place nothing because its underside is not sturdy, while under a bottom slab they are placed.", + "tags": ["vegetation", "hanging-roots", "placement", "support", "slab", "player"], + "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone", "minecraft:stone_slab"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [5, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:hanging_roots", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [5, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [0, 0, 0], [0, 2, 0] ], + "with": {"id": "minecraft:air"} + }, + { + "at": 1, + "do": "fill", + "region": [ [3, 0, 0], [3, 2, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 2, "do": "place", "pos": [0, 3, 0], "block": {"id": "minecraft:stone_slab", "type": "top"} }, + { "at": 2, "do": "place", "pos": [3, 3, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 5, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:hanging_roots", "count": 2}, "slot": "hotbar1" } + ] + }, + { "at": 10, "do": "tp", "entity_alias": "player", "pos": [3.5, 0, 0.5], "rot": [0, -90] }, + {"at": 10, "do": "interact"}, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, + { "pos": [3, 2, 0], "is": {"id": "minecraft:hanging_roots" } }, + { "is": {"id": "minecraft:hanging_roots", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/hanging_roots/hanging_roots_placement_under_block.json b/tests/vegetation/hanging_roots/hanging_roots_placement_under_block.json new file mode 100644 index 0000000..a335f40 --- /dev/null +++ b/tests/vegetation/hanging_roots/hanging_roots_placement_under_block.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hanging_roots_placement_under_block", + "description": "Hanging roots used on the underside of a block place unwaterlogged hanging roots below it and consume one item.", + "tags": ["vegetation", "hanging-roots", "placement", "player"], + "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:hanging_roots", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 4, + "do": "fill", + "region": [ [0, 0, 0], [0, 2, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 5, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:hanging_roots", "waterlogged": false} }, + { "is": {"id": "minecraft:hanging_roots", "count": 1} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/hanging_roots/hanging_roots_placement_waterlogged.json b/tests/vegetation/hanging_roots/hanging_roots_placement_waterlogged.json new file mode 100644 index 0000000..ecc55ae --- /dev/null +++ b/tests/vegetation/hanging_roots/hanging_roots_placement_waterlogged.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hanging_roots_placement_waterlogged", + "description": "Hanging roots used under a block in a spot holding a water source are placed waterlogged.", + "tags": ["vegetation", "hanging-roots", "placement", "waterlogged", "player"], + "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone", "minecraft:water"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:hanging_roots", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [0, 0, 0], [0, 2, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:water", "level": 0} }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 5, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:hanging_roots", "waterlogged": true} }, + { "is": {"id": "minecraft:hanging_roots", "count": 1} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/hanging_roots/hanging_roots_replaced_by_block.json b/tests/vegetation/hanging_roots/hanging_roots_replaced_by_block.json new file mode 100644 index 0000000..8069adf --- /dev/null +++ b/tests/vegetation/hanging_roots/hanging_roots_replaced_by_block.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hanging_roots_replaced_by_block", + "description": "Hanging roots are replaceable, so placing stone where they hang replaces them and consumes one stone.", + "tags": ["vegetation", "hanging-roots", "placement", "replaceable", "player"], + "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 4, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 4, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [0, 0, 0], [0, 2, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:hanging_roots"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:hanging_roots"} } + ] + }, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, + {"at": 5, "do": "interact"}, + { + "at": 7, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:stone" } }, + { "is": {"id": "minecraft:stone", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/hanging_roots/hanging_roots_support_loss.json b/tests/vegetation/hanging_roots/hanging_roots_support_loss.json new file mode 100644 index 0000000..f5f0396 --- /dev/null +++ b/tests/vegetation/hanging_roots/hanging_roots_support_loss.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hanging_roots_support_loss", + "description": "Hanging roots break into air when the block above them is removed, while roots whose support stays are unaffected.", + "tags": ["vegetation", "hanging-roots", "support", "neighbor-update"], + "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 3, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, + { "at": 1, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:hanging_roots"} }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:hanging_roots"} } + ] + }, + { "at": 3, "do": "remove", "pos": [0, 2, 0] }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [2, 2, 0], "is": {"id": "minecraft:stone" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:hanging_roots"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/hanging_roots/hanging_roots_waterlogged_spreads_water.json b/tests/vegetation/hanging_roots/hanging_roots_waterlogged_spreads_water.json new file mode 100644 index 0000000..1f52c04 --- /dev/null +++ b/tests/vegetation/hanging_roots/hanging_roots_waterlogged_spreads_water.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hanging_roots_waterlogged_spreads_water", + "description": "Waterlogged hanging roots act as a water source: once a neighbor update schedules their fluid tick, water spreads into an adjacent air corridor while the roots stay.", + "tags": ["vegetation", "hanging-roots", "waterlogged", "fluid", "neighbor-update"], + "minecraftIds": ["minecraft:hanging_roots", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [3, 2, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -1], [3, 2, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "fill", + "region": [ [1, 1, 0], [2, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 2, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:hanging_roots", "waterlogged": true} }, + { "at": 4, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:hanging_roots", "waterlogged": true} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:water" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:water" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/vegetation/hanging_roots/hanging_roots_waterlogged_support_loss.json b/tests/vegetation/hanging_roots/hanging_roots_waterlogged_support_loss.json new file mode 100644 index 0000000..5f10679 --- /dev/null +++ b/tests/vegetation/hanging_roots/hanging_roots_waterlogged_support_loss.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hanging_roots_waterlogged_support_loss", + "description": "Waterlogged hanging roots that lose their support are destroyed and leave their water source behind, because breaking a block keeps its fluid.", + "tags": ["vegetation", "hanging-roots", "support", "waterlogged", "neighbor-update"], + "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 3, 1] ] + }, + "world": { + "gamerules": { + "minecraft:spawn_mobs": false, + "minecraft:advance_time": false, + "minecraft:advance_weather": false, + "minecraft:random_tick_speed": 0 + } + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 3, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:hanging_roots", "waterlogged": true} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:hanging_roots", "waterlogged": true} } + ] + }, + { "at": 3, "do": "remove", "pos": [0, 2, 0] }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} } + ] + }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} } + ] + } + ], + "breakpoints": [] +} + From a4b303dd3cea92a59209cd3cab1ba6e1e801d375 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 2 Nov 2026 05:14:03 +0100 Subject: [PATCH 75/85] Add Flint tests for hay_block (1 blocks) --- .../hay_block/hay_block_default_axis.json | 26 ++++++++++ .../hay_block_east_face_placement.json | 34 +++++++++++++ .../hay_block_explosion_drops_itself.json | 47 +++++++++++++++++ .../hay_block_north_face_placement.json | 34 +++++++++++++ ..._block_instrument_follows_block_below.json | 42 ++++++++++++++++ ...ock_note_block_placed_on_top_is_banjo.json | 34 +++++++++++++ .../hay_block_reduces_fall_damage.json | 50 +++++++++++++++++++ .../hay_block_top_face_placement.json | 34 +++++++++++++ 8 files changed, 301 insertions(+) create mode 100644 tests/decoration/hay_block/hay_block_default_axis.json create mode 100644 tests/decoration/hay_block/hay_block_east_face_placement.json create mode 100644 tests/decoration/hay_block/hay_block_explosion_drops_itself.json create mode 100644 tests/decoration/hay_block/hay_block_north_face_placement.json create mode 100644 tests/decoration/hay_block/hay_block_note_block_instrument_follows_block_below.json create mode 100644 tests/decoration/hay_block/hay_block_note_block_placed_on_top_is_banjo.json create mode 100644 tests/decoration/hay_block/hay_block_reduces_fall_damage.json create mode 100644 tests/decoration/hay_block/hay_block_top_face_placement.json diff --git a/tests/decoration/hay_block/hay_block_default_axis.json b/tests/decoration/hay_block/hay_block_default_axis.json new file mode 100644 index 0000000..e00e24b --- /dev/null +++ b/tests/decoration/hay_block/hay_block_default_axis.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hay_block_default_axis", + "description": "A hay block placed without explicit properties has the default axis y.", + "tags": ["decoration", "hay-block", "pillar", "block-state"], + "minecraftIds": ["minecraft:hay_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 0, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:hay_block"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:hay_block", "axis": "y"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/hay_block/hay_block_east_face_placement.json b/tests/decoration/hay_block/hay_block_east_face_placement.json new file mode 100644 index 0000000..7a5f796 --- /dev/null +++ b/tests/decoration/hay_block/hay_block_east_face_placement.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hay_block_east_face_placement", + "description": "A survival player placing hay against the east face of a block gets axis x and uses up the item.", + "tags": ["decoration", "hay-block", "pillar", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:hay_block", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -2], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:hay_block", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [3.5, 0, 0.5], "rot": [90, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:hay_block", "axis": "x"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/hay_block/hay_block_explosion_drops_itself.json b/tests/decoration/hay_block/hay_block_explosion_drops_itself.json new file mode 100644 index 0000000..84f0070 --- /dev/null +++ b/tests/decoration/hay_block/hay_block_explosion_drops_itself.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hay_block_explosion_drops_itself", + "description": "A hay block destroyed by a TNT explosion drops exactly one hay block item (loot table dropSelf).", + "tags": ["decoration", "hay-block", "drops", "explosion", "tnt", "entity"], + "minecraftIds": ["minecraft:hay_block", "minecraft:obsidian", "minecraft:tnt", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [12, 3, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [8, 0, 0], [12, 0, 4] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 1, "do": "place", "pos": [10, 1, 1], "block": {"id": "minecraft:hay_block", "axis": "y"} }, + { + "at": 2, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [10.5, 1, 2.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [10, 1, 1], "is": {"id": "minecraft:air"} }, + { + "is": "minecraft:item", + "exists": true, + "count": 1, + "Item.id": "minecraft:hay_block", + "Item.count": "1" + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/hay_block/hay_block_north_face_placement.json b/tests/decoration/hay_block/hay_block_north_face_placement.json new file mode 100644 index 0000000..d15b307 --- /dev/null +++ b/tests/decoration/hay_block/hay_block_north_face_placement.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hay_block_north_face_placement", + "description": "A survival player placing hay against the north face of a block gets axis z and uses up the item.", + "tags": ["decoration", "hay-block", "pillar", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:hay_block", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -2], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:hay_block", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, -2.5], "rot": [0, 0] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, -1], "is": {"id": "minecraft:hay_block", "axis": "z"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/hay_block/hay_block_note_block_instrument_follows_block_below.json b/tests/decoration/hay_block/hay_block_note_block_instrument_follows_block_below.json new file mode 100644 index 0000000..917708c --- /dev/null +++ b/tests/decoration/hay_block/hay_block_note_block_instrument_follows_block_below.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hay_block_note_block_instrument_follows_block_below", + "description": "A note block with air below plays harp; replacing the air with hay switches it to banjo, and removing the hay switches it back.", + "tags": ["decoration", "hay-block", "note-block", "instrument", "block-state"], + "minecraftIds": ["minecraft:hay_block", "minecraft:note_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:note_block"} }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:note_block", "instrument": "harp"} } + ] + }, + { "at": 2, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:hay_block"} }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:note_block", "instrument": "banjo"} } + ] + }, + { "at": 4, "do": "remove", "pos": [0, 0, 0] }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:note_block", "instrument": "harp"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/hay_block/hay_block_note_block_placed_on_top_is_banjo.json b/tests/decoration/hay_block/hay_block_note_block_placed_on_top_is_banjo.json new file mode 100644 index 0000000..7b28ecc --- /dev/null +++ b/tests/decoration/hay_block/hay_block_note_block_placed_on_top_is_banjo.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hay_block_note_block_placed_on_top_is_banjo", + "description": "A note block placed by a survival player on top of a hay block gets the banjo instrument.", + "tags": ["decoration", "hay-block", "note-block", "instrument", "placement", "player"], + "minecraftIds": ["minecraft:hay_block", "minecraft:note_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:note_block", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:hay_block"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:note_block", "instrument": "banjo"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/hay_block/hay_block_reduces_fall_damage.json b/tests/decoration/hay_block/hay_block_reduces_fall_damage.json new file mode 100644 index 0000000..6a5c503 --- /dev/null +++ b/tests/decoration/hay_block/hay_block_reduces_fall_damage.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hay_block_reduces_fall_damage", + "description": "A 15 block fall onto hay deals floor((15 - 3) * 0.2) = 2 damage, while the same fall onto stone is lethal.", + "tags": ["decoration", "hay-block", "fall-damage", "entity"], + "minecraftIds": ["minecraft:hay_block", "minecraft:stone", "minecraft:pig"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [8, 17, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [2, 0, 0], "block": {"id": "minecraft:hay_block", "axis": "y"} }, + { "at": 0, "do": "place", "pos": [6, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "summon", + "entity_alias": "pig_on_hay", + "entity_type": "minecraft:pig", + "pos": [2.5, 16, 0.5], + "Health": "10f" + }, + { + "at": 1, + "do": "summon", + "entity_alias": "pig_on_stone", + "entity_type": "minecraft:pig", + "pos": [6.5, 16, 0.5], + "Health": "10f" + }, + { + "at": 60, + "do": "assert", + "checks": [ + { + "entity_alias": "pig_on_hay", + "is": "minecraft:pig", + "pos": [2.5, 1, 0.5], + "position_tolerance": 0.5, + "Health": "8.0f" + }, + {"is": "minecraft:pig", "exists": true, "count": 1} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/hay_block/hay_block_top_face_placement.json b/tests/decoration/hay_block/hay_block_top_face_placement.json new file mode 100644 index 0000000..8dc91ba --- /dev/null +++ b/tests/decoration/hay_block/hay_block_top_face_placement.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.0.0", + "name": "hay_block_top_face_placement", + "description": "A survival player placing hay against the top face of a block gets axis y and uses up the item.", + "tags": ["decoration", "hay-block", "pillar", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:hay_block", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -2], [2, 4, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:hay_block", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:hay_block", "axis": "y"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + From 97dfc9a79be4ef11c94e5dbcdfeedfe5e4e9b522 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 2 Nov 2026 05:20:03 +0100 Subject: [PATCH 76/85] Add Flint tests for heavy_core (1 blocks) --- .../heavy_core_note_block_snare.json | 48 +++++++++++++++ .../heavy_core_place_in_flowing_water.json | 60 +++++++++++++++++++ .../heavy_core_place_in_water_source.json | 52 ++++++++++++++++ .../heavy_core/heavy_core_place_on_floor.json | 39 ++++++++++++ .../heavy_core_pushed_by_piston.json | 45 ++++++++++++++ .../heavy_core/heavy_core_rejects_rail.json | 40 +++++++++++++ .../heavy_core/heavy_core_rejects_torch.json | 40 +++++++++++++ .../heavy_core_survives_tnt_explosion.json | 48 +++++++++++++++ ..._core_waterlogged_drained_when_pushed.json | 52 ++++++++++++++++ .../heavy_core_waterlogged_spreads_water.json | 48 +++++++++++++++ 10 files changed, 472 insertions(+) create mode 100644 tests/decoration/heavy_core/heavy_core_note_block_snare.json create mode 100644 tests/decoration/heavy_core/heavy_core_place_in_flowing_water.json create mode 100644 tests/decoration/heavy_core/heavy_core_place_in_water_source.json create mode 100644 tests/decoration/heavy_core/heavy_core_place_on_floor.json create mode 100644 tests/decoration/heavy_core/heavy_core_pushed_by_piston.json create mode 100644 tests/decoration/heavy_core/heavy_core_rejects_rail.json create mode 100644 tests/decoration/heavy_core/heavy_core_rejects_torch.json create mode 100644 tests/decoration/heavy_core/heavy_core_survives_tnt_explosion.json create mode 100644 tests/decoration/heavy_core/heavy_core_waterlogged_drained_when_pushed.json create mode 100644 tests/decoration/heavy_core/heavy_core_waterlogged_spreads_water.json diff --git a/tests/decoration/heavy_core/heavy_core_note_block_snare.json b/tests/decoration/heavy_core/heavy_core_note_block_snare.json new file mode 100644 index 0000000..32016a0 --- /dev/null +++ b/tests/decoration/heavy_core/heavy_core_note_block_snare.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "heavy_core_note_block_snare", + "description": "A note block sitting on a heavy core switches its instrument to snare, and back to harp when the heavy core is removed.", + "tags": ["decoration", "heavy_core", "note_block", "instrument"], + "minecraftIds": ["minecraft:heavy_core", "minecraft:note_block", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:note_block"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:note_block", "instrument": "harp"} } + ] + }, + { "at": 3, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:heavy_core"} }, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:note_block", "instrument": "snare"} } + ] + }, + { "at": 5, "do": "remove", "pos": [0, 1, 0] }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:note_block", "instrument": "harp"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/heavy_core/heavy_core_place_in_flowing_water.json b/tests/decoration/heavy_core/heavy_core_place_in_flowing_water.json new file mode 100644 index 0000000..f53cb32 --- /dev/null +++ b/tests/decoration/heavy_core/heavy_core_place_in_flowing_water.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "heavy_core_place_in_flowing_water", + "description": "Placing a heavy core into flowing (non-source) water does not waterlog it, because placement only checks for a water source.", + "tags": ["decoration", "heavy_core", "placement", "waterlogged", "player"], + "minecraftIds": ["minecraft:heavy_core", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:heavy_core", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-1, 1, -1], [1, 2, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 2, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:water"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:water", "level": 0} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 8} } + ] + }, + { "at": 11, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 11, "do": "interact"}, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:heavy_core", "waterlogged": false} }, + { "is": {"id": "minecraft:air", "count": 0} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/heavy_core/heavy_core_place_in_water_source.json b/tests/decoration/heavy_core/heavy_core_place_in_water_source.json new file mode 100644 index 0000000..f80b5fd --- /dev/null +++ b/tests/decoration/heavy_core/heavy_core_place_in_water_source.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "heavy_core_place_in_water_source", + "description": "Placing a heavy core into a water source block makes it waterlogged.", + "tags": ["decoration", "heavy_core", "placement", "waterlogged", "player"], + "minecraftIds": ["minecraft:heavy_core", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:heavy_core", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:water"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:water"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:heavy_core", "waterlogged": true} }, + { "is": {"id": "minecraft:air", "count": 0} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/heavy_core/heavy_core_place_on_floor.json b/tests/decoration/heavy_core/heavy_core_place_on_floor.json new file mode 100644 index 0000000..c665716 --- /dev/null +++ b/tests/decoration/heavy_core/heavy_core_place_on_floor.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "heavy_core_place_on_floor", + "description": "A survival player placing a heavy core on stone creates a non-waterlogged heavy core and uses up the item.", + "tags": ["decoration", "heavy_core", "placement", "player"], + "minecraftIds": ["minecraft:heavy_core", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 2, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:heavy_core", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:heavy_core", "waterlogged": false} }, + { "is": {"id": "minecraft:air", "count": 0} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/heavy_core/heavy_core_pushed_by_piston.json b/tests/decoration/heavy_core/heavy_core_pushed_by_piston.json new file mode 100644 index 0000000..aee85ef --- /dev/null +++ b/tests/decoration/heavy_core/heavy_core_pushed_by_piston.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "heavy_core_pushed_by_piston", + "description": "A piston extending into a heavy core pushes it one block instead of destroying it.", + "tags": ["decoration", "heavy_core", "piston", "push-reaction"], + "minecraftIds": [ + "minecraft:heavy_core" , "minecraft:piston" , "minecraft:piston_head" , "minecraft:redstone_block", + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [3, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-1, 1, 0], "block": {"id": "minecraft:piston" , "facing": "east" } }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:heavy_core", "waterlogged": false} } + ] + }, + { "at": 2, "do": "place", "pos": [-1, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [-1, 1, 0], "is": {"id": "minecraft:piston", "extended": true, "facing": "east"} }, + { "pos": [0, 1, 0] , "is": {"id": "minecraft:piston_head", "facing": "east"} }, + { "pos": [1, 1, 0] , "is": {"id": "minecraft:heavy_core", "waterlogged": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/heavy_core/heavy_core_rejects_rail.json b/tests/decoration/heavy_core/heavy_core_rejects_rail.json new file mode 100644 index 0000000..effc0ad --- /dev/null +++ b/tests/decoration/heavy_core/heavy_core_rejects_rail.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "heavy_core_rejects_rail", + "description": "A rail cannot be placed on top of a heavy core: its collision shape is only 8/16 tall, so VoxelShape.getFaceShape(UP) is empty, SupportType.RIGID fails in BaseRailBlock.canSurvive via Block.canSupportRigidBlock, and the rail item is not used up.", + "tags": ["decoration", "heavy_core", "placement", "support", "player"], + "minecraftIds": ["minecraft:heavy_core", "minecraft:rail", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:rail", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:heavy_core"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:rail", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/heavy_core/heavy_core_rejects_torch.json b/tests/decoration/heavy_core/heavy_core_rejects_torch.json new file mode 100644 index 0000000..b1f3e4b --- /dev/null +++ b/tests/decoration/heavy_core/heavy_core_rejects_torch.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "heavy_core_rejects_torch", + "description": "A torch cannot be placed on top of a heavy core: its collision shape is only 8/16 tall, so VoxelShape.getFaceShape(UP) is empty, SupportType.CENTER fails in BaseTorchBlock.canSurvive via Block.canSupportCenter, and the torch item is not used up.", + "tags": ["decoration", "heavy_core", "placement", "support", "player"], + "minecraftIds": ["minecraft:heavy_core", "minecraft:torch", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:torch", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:heavy_core"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:torch", "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/heavy_core/heavy_core_survives_tnt_explosion.json b/tests/decoration/heavy_core/heavy_core_survives_tnt_explosion.json new file mode 100644 index 0000000..d787d38 --- /dev/null +++ b/tests/decoration/heavy_core/heavy_core_survives_tnt_explosion.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "heavy_core_survives_tnt_explosion", + "description": "A heavy core next to exploding TNT survives because of its explosion resistance, while a dirt block on the other side of the TNT is destroyed.", + "tags": ["decoration", "heavy_core", "explosion", "resistance"], + "minecraftIds": ["minecraft:heavy_core", "minecraft:dirt", "minecraft:obsidian", "minecraft:tnt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [3, 2, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:obsidian"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:heavy_core"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:dirt" } } + ] + }, + { + "at": 1, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [1.5, 1, 0.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:heavy_core"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/heavy_core/heavy_core_waterlogged_drained_when_pushed.json b/tests/decoration/heavy_core/heavy_core_waterlogged_drained_when_pushed.json new file mode 100644 index 0000000..692e584 --- /dev/null +++ b/tests/decoration/heavy_core/heavy_core_waterlogged_drained_when_pushed.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "heavy_core_waterlogged_drained_when_pushed", + "description": "A waterlogged heavy core pushed by a piston arrives at its destination no longer waterlogged, because the piston clears the waterlogged state.", + "tags": ["decoration", "heavy_core", "piston", "waterlogged", "push-reaction"], + "minecraftIds": [ + "minecraft:heavy_core" , "minecraft:piston" , "minecraft:piston_head" , "minecraft:redstone_block", + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [3, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-1, 1, 0], "block": {"id": "minecraft:piston" , "facing": "east" } }, + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:heavy_core", "waterlogged": true} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:heavy_core", "waterlogged": true} } + ] + }, + { "at": 2, "do": "place", "pos": [-1, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [-1, 1, 0], "is": {"id": "minecraft:piston", "extended": true, "facing": "east"} }, + { "pos": [0, 1, 0] , "is": {"id": "minecraft:piston_head", "facing": "east"} }, + { "pos": [1, 1, 0] , "is": {"id": "minecraft:heavy_core", "waterlogged": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/heavy_core/heavy_core_waterlogged_spreads_water.json b/tests/decoration/heavy_core/heavy_core_waterlogged_spreads_water.json new file mode 100644 index 0000000..a14a119 --- /dev/null +++ b/tests/decoration/heavy_core/heavy_core_waterlogged_spreads_water.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "heavy_core_waterlogged_spreads_water", + "description": "A waterlogged heavy core acts as a water source: it spreads water into adjacent empty space while staying waterlogged.", + "tags": ["decoration", "heavy_core", "waterlogged", "block-state", "fluid"], + "minecraftIds": ["minecraft:heavy_core", "minecraft:water", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, -1], [3, 1, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-3, 0, -1], [3, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-3, 1, -1], [3, 1, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "fill", + "region": [ [-2, 1, 0], [2, 1, 0] ], + "with": {"id": "minecraft:air"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:heavy_core", "waterlogged": true} }, + { + "at": 30, + "do": "assert", + "checks": [ + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:heavy_core", "waterlogged": true } }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:water" , "level": 1} }, + { "pos": [ 1, 1, 0], "is": {"id": "minecraft:water" , "level": 1} }, + { "pos": [-2, 1, 0], "is": {"id": "minecraft:water" , "level": 2} }, + { "pos": [ 2, 1, 0], "is": {"id": "minecraft:water" , "level": 2} } + ] + } + ], + "breakpoints": [] +} + From c8a8d0cb8d957505aa3bb4a5b445cf8888e65ae0 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 2 Nov 2026 05:23:07 +0100 Subject: [PATCH 77/85] Add Flint tests for honey_block (1 blocks) --- ...honey_block_does_not_drag_slime_block.json | 38 ++++++++++++++ ...y_block_drags_adjacent_block_sideways.json | 38 ++++++++++++++ .../honey_block_pushes_slime_block_ahead.json | 37 ++++++++++++++ .../piston_pushes_honey_block.json | 36 ++++++++++++++ .../honey_block/place_honey_block.json | 31 ++++++++++++ .../snow_layer_placed_on_honey_block.json | 32 ++++++++++++ ...pulls_honey_block_with_attached_block.json | 49 +++++++++++++++++++ .../tnt_explosion_drops_honey_block.json | 42 ++++++++++++++++ 8 files changed, 303 insertions(+) create mode 100644 tests/decoration/honey_block/honey_block_does_not_drag_slime_block.json create mode 100644 tests/decoration/honey_block/honey_block_drags_adjacent_block_sideways.json create mode 100644 tests/decoration/honey_block/honey_block_pushes_slime_block_ahead.json create mode 100644 tests/decoration/honey_block/piston_pushes_honey_block.json create mode 100644 tests/decoration/honey_block/place_honey_block.json create mode 100644 tests/decoration/honey_block/snow_layer_placed_on_honey_block.json create mode 100644 tests/decoration/honey_block/sticky_piston_pulls_honey_block_with_attached_block.json create mode 100644 tests/decoration/honey_block/tnt_explosion_drops_honey_block.json diff --git a/tests/decoration/honey_block/honey_block_does_not_drag_slime_block.json b/tests/decoration/honey_block/honey_block_does_not_drag_slime_block.json new file mode 100644 index 0000000..1f96e16 --- /dev/null +++ b/tests/decoration/honey_block/honey_block_does_not_drag_slime_block.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honey_block_does_not_drag_slime_block", + "description": "A slime block beside a honey block is not dragged along when a piston pushes the honey block, because honey and slime do not stick together.", + "tags": ["decoration", "honey-block", "slime", "piston", "sticky", "push-reaction"], + "minecraftIds": ["minecraft:honey_block", "minecraft:slime_block", "minecraft:piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 1, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:piston" , "facing": "east"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:honey_block" } }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:slime_block" } } + ] + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:piston_head"} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:honey_block"} }, + { "pos": [1, 0, 1], "is": {"id": "minecraft:slime_block"} }, + { "pos": [2, 0, 1], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/honey_block/honey_block_drags_adjacent_block_sideways.json b/tests/decoration/honey_block/honey_block_drags_adjacent_block_sideways.json new file mode 100644 index 0000000..fa0e66e --- /dev/null +++ b/tests/decoration/honey_block/honey_block_drags_adjacent_block_sideways.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honey_block_drags_adjacent_block_sideways", + "description": "A block beside a honey block is dragged along when a piston pushes the honey block, because honey is sticky.", + "tags": ["decoration", "honey-block", "piston", "sticky", "push-reaction"], + "minecraftIds": ["minecraft:honey_block", "minecraft:stone", "minecraft:piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 1, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:piston" , "facing": "east"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:honey_block" } }, + { "pos": [1, 0, 1], "block": {"id": "minecraft:stone" } } + ] + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:piston_head"} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:honey_block"} }, + { "pos": [1, 0, 1], "is": {"id": "minecraft:air" } }, + { "pos": [2, 0, 1], "is": {"id": "minecraft:stone" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/honey_block/honey_block_pushes_slime_block_ahead.json b/tests/decoration/honey_block/honey_block_pushes_slime_block_ahead.json new file mode 100644 index 0000000..61f89b2 --- /dev/null +++ b/tests/decoration/honey_block/honey_block_pushes_slime_block_ahead.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honey_block_pushes_slime_block_ahead", + "description": "A honey block pushed by a piston still pushes a slime block directly ahead of it in the push direction.", + "tags": ["decoration", "honey-block", "slime", "piston", "push-reaction"], + "minecraftIds": ["minecraft:honey_block", "minecraft:slime_block", "minecraft:piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:piston" , "facing": "east"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:honey_block" } }, + { "pos": [2, 0, 0], "block": {"id": "minecraft:slime_block" } } + ] + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [1, 0, 0], "is": {"id": "minecraft:piston_head"} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:honey_block"} }, + { "pos": [3, 0, 0], "is": {"id": "minecraft:slime_block"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/honey_block/piston_pushes_honey_block.json b/tests/decoration/honey_block/piston_pushes_honey_block.json new file mode 100644 index 0000000..88d151b --- /dev/null +++ b/tests/decoration/honey_block/piston_pushes_honey_block.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "piston_pushes_honey_block", + "description": "A piston powered by a redstone block pushes a honey block one block forward and its head takes the old position.", + "tags": ["decoration", "honey-block", "piston", "push-reaction"], + "minecraftIds": ["minecraft:honey_block", "minecraft:piston", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 1, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:piston" , "facing": "east"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:honey_block" } } + ] + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": true} }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:piston_head", "facing": "east", "type": "normal"} }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:honey_block"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/honey_block/place_honey_block.json b/tests/decoration/honey_block/place_honey_block.json new file mode 100644 index 0000000..787fb75 --- /dev/null +++ b/tests/decoration/honey_block/place_honey_block.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "place_honey_block", + "description": "A survival player placing a honey block item on stone creates a honey block above it and consumes the item.", + "tags": ["decoration", "honey-block", "placement"], + "minecraftIds": ["minecraft:honey_block", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:honey_block", "count": 1}, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:honey_block"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/honey_block/snow_layer_placed_on_honey_block.json b/tests/decoration/honey_block/snow_layer_placed_on_honey_block.json new file mode 100644 index 0000000..d6a1b36 --- /dev/null +++ b/tests/decoration/honey_block/snow_layer_placed_on_honey_block.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "snow_layer_placed_on_honey_block", + "description": "A survival player can place a snow layer on top of a honey block, because honey is in the snow-support override tag despite its shorter collision box.", + "tags": ["decoration", "honey-block", "snow", "placement", "support"], + "minecraftIds": ["minecraft:honey_block", "minecraft:snow"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": {"game_mode": "Survival"} + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:honey_block"} }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:snow", "count": 1}, + {"at": 1, "do": "interact"}, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:snow", "layers": 1} }, + { "pos": [0, 0, 0], "is": {"id": "minecraft:honey_block"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/honey_block/sticky_piston_pulls_honey_block_with_attached_block.json b/tests/decoration/honey_block/sticky_piston_pulls_honey_block_with_attached_block.json new file mode 100644 index 0000000..bb71395 --- /dev/null +++ b/tests/decoration/honey_block/sticky_piston_pulls_honey_block_with_attached_block.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "sticky_piston_pulls_honey_block_with_attached_block", + "description": "A retracting sticky piston pulls a honey block touching its head back one block, and a block stuck to the side of the honey block is pulled along with it.", + "tags": ["decoration", "honey-block", "piston", "sticky-piston", "sticky", "push-reaction"], + "minecraftIds": [ + "minecraft:honey_block" , "minecraft:stone" , "minecraft:sticky_piston" , "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 1, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place", + "pos": [0, 0, 0], + "block": {"id": "minecraft:sticky_piston", "facing": "east", "extended": "false"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:sticky_piston", "facing": "east", "extended": "true"} }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:piston_head", "facing": "east", "type": "sticky"} } + ] + }, + { "at": 6, "do": "place", "pos": [2, 0, 0], "block": {"id": "minecraft:honey_block"} }, + { "at": 6, "do": "place", "pos": [2, 0, 1], "block": {"id": "minecraft:stone"} }, + { "at": 7, "do": "remove", "pos": [0, 1, 0] }, + { + "at": 14, + "do": "assert", + "checks": [ + { "pos": [0, 0, 0], "is": {"id": "minecraft:sticky_piston", "facing": "east", "extended": "false"} }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:honey_block" } }, + { "pos": [2, 0, 0], "is": {"id": "minecraft:air" } }, + { "pos": [1, 0, 1], "is": {"id": "minecraft:stone" } }, + { "pos": [2, 0, 1], "is": {"id": "minecraft:air" } } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/decoration/honey_block/tnt_explosion_drops_honey_block.json b/tests/decoration/honey_block/tnt_explosion_drops_honey_block.json new file mode 100644 index 0000000..ef65870 --- /dev/null +++ b/tests/decoration/honey_block/tnt_explosion_drops_honey_block.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "tnt_explosion_drops_honey_block", + "description": "A honey block destroyed by a TNT explosion drops exactly one honey block item (its loot table is drop-self).", + "tags": ["decoration", "honey-block", "drops", "explosion"], + "minecraftIds": ["minecraft:honey_block", "minecraft:obsidian", "minecraft:tnt"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [4, 3, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 2] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 0, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:honey_block"} }, + { "at": 0, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 1.5] }, + { + "at": 1, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [2.5, 1, 1.5], + "fuse": "1s" + }, + { + "at": 35, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:honey_block"} + ] + } + ], + "breakpoints": [] +} + From a0ce5d1b4632c909d4db6dee5e27e572ff85bda0 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 2 Nov 2026 05:26:15 +0100 Subject: [PATCH 78/85] Add Flint tests for honeycomb (1 blocks) --- .../honeycomb_creative_not_consumed.json | 41 +++++++++++++ .../honeycomb_dispenser_drops_on_stone.json | 51 +++++++++++++++++ ...oneycomb_dispenser_waxes_copper_block.json | 54 ++++++++++++++++++ ...oneycomb_dispenser_waxes_copper_chest.json | 57 +++++++++++++++++++ .../honeycomb/honeycomb_ignores_stone.json | 41 +++++++++++++ .../honeycomb_ignores_waxed_copper.json | 41 +++++++++++++ .../honeycomb_ignores_waxed_sign.json | 47 +++++++++++++++ .../honeycomb/honeycomb_keeps_bulb_state.json | 41 +++++++++++++ .../honeycomb_keeps_stairs_state.json | 44 ++++++++++++++ .../honeycomb_keeps_weathering_stage.json | 41 +++++++++++++ .../honeycomb_waxes_copper_block.json | 41 +++++++++++++ .../honeycomb_waxes_golem_statue.json | 51 +++++++++++++++++ .../items/honeycomb/honeycomb_waxes_sign.json | 47 +++++++++++++++ 13 files changed, 597 insertions(+) create mode 100644 tests/items/honeycomb/honeycomb_creative_not_consumed.json create mode 100644 tests/items/honeycomb/honeycomb_dispenser_drops_on_stone.json create mode 100644 tests/items/honeycomb/honeycomb_dispenser_waxes_copper_block.json create mode 100644 tests/items/honeycomb/honeycomb_dispenser_waxes_copper_chest.json create mode 100644 tests/items/honeycomb/honeycomb_ignores_stone.json create mode 100644 tests/items/honeycomb/honeycomb_ignores_waxed_copper.json create mode 100644 tests/items/honeycomb/honeycomb_ignores_waxed_sign.json create mode 100644 tests/items/honeycomb/honeycomb_keeps_bulb_state.json create mode 100644 tests/items/honeycomb/honeycomb_keeps_stairs_state.json create mode 100644 tests/items/honeycomb/honeycomb_keeps_weathering_stage.json create mode 100644 tests/items/honeycomb/honeycomb_waxes_copper_block.json create mode 100644 tests/items/honeycomb/honeycomb_waxes_golem_statue.json create mode 100644 tests/items/honeycomb/honeycomb_waxes_sign.json diff --git a/tests/items/honeycomb/honeycomb_creative_not_consumed.json b/tests/items/honeycomb/honeycomb_creative_not_consumed.json new file mode 100644 index 0000000..b9c904e --- /dev/null +++ b/tests/items/honeycomb/honeycomb_creative_not_consumed.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honeycomb_creative_not_consumed", + "description": "In creative mode waxing a copper block works but the honeycomb stack is not reduced.", + "tags": ["item", "honeycomb", "waxing", "interaction"], + "minecraftIds": ["minecraft:honeycomb", "minecraft:copper_block", "minecraft:waxed_copper_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_block"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_copper_block" } }, + { "is": {"id": "minecraft:honeycomb" , "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/honeycomb/honeycomb_dispenser_drops_on_stone.json b/tests/items/honeycomb/honeycomb_dispenser_drops_on_stone.json new file mode 100644 index 0000000..0e0e1a2 --- /dev/null +++ b/tests/items/honeycomb/honeycomb_dispenser_drops_on_stone.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honeycomb_dispenser_drops_on_stone", + "description": "A powered dispenser holding honeycomb facing stone cannot wax it, so the stone is unchanged and the honeycomb is ejected from the dispenser.", + "tags": ["item", "honeycomb", "waxing", "interaction"], + "minecraftIds": ["minecraft:honeycomb", "minecraft:dispenser", "minecraft:stone", "minecraft:redstone_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [1, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:honeycomb\"}]"} + } + }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:dispenser", "nbt": {"Items": []} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/honeycomb/honeycomb_dispenser_waxes_copper_block.json b/tests/items/honeycomb/honeycomb_dispenser_waxes_copper_block.json new file mode 100644 index 0000000..54a6bad --- /dev/null +++ b/tests/items/honeycomb/honeycomb_dispenser_waxes_copper_block.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honeycomb_dispenser_waxes_copper_block", + "description": "A powered dispenser holding honeycomb waxes the copper block in front of it and uses up the honeycomb.", + "tags": ["item", "honeycomb", "waxing", "interaction"], + "minecraftIds": [ + "minecraft:honeycomb" , "minecraft:dispenser" , "minecraft:copper_block" , + "minecraft:waxed_copper_block", "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [1, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:honeycomb\"}]"} + } + }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:copper_block"} } + ] + }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:waxed_copper_block"} }, + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:dispenser", "nbt": {"Items": []} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/honeycomb/honeycomb_dispenser_waxes_copper_chest.json b/tests/items/honeycomb/honeycomb_dispenser_waxes_copper_chest.json new file mode 100644 index 0000000..6738c9f --- /dev/null +++ b/tests/items/honeycomb/honeycomb_dispenser_waxes_copper_chest.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honeycomb_dispenser_waxes_copper_chest", + "description": "A powered dispenser holding honeycomb waxes a single copper chest in front of it and keeps its facing.", + "tags": ["item", "honeycomb", "waxing", "interaction"], + "minecraftIds": [ + "minecraft:honeycomb" , "minecraft:dispenser" , "minecraft:copper_chest" , + "minecraft:waxed_copper_chest", "minecraft:redstone_block" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [1, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:honeycomb\"}]"} + } + }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:copper_chest", "facing": "north", "type": "single"} } + ] + }, + { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { + "pos": [1, 1, 0], + "is": {"id": "minecraft:waxed_copper_chest", "facing": "north", "type": "single"} + }, + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:dispenser", "nbt": {"Items": []} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/honeycomb/honeycomb_ignores_stone.json b/tests/items/honeycomb/honeycomb_ignores_stone.json new file mode 100644 index 0000000..72256d8 --- /dev/null +++ b/tests/items/honeycomb/honeycomb_ignores_stone.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honeycomb_ignores_stone", + "description": "Using honeycomb on a non-copper block does nothing and keeps the honeycomb.", + "tags": ["item", "honeycomb", "waxing", "interaction"], + "minecraftIds": ["minecraft:honeycomb", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:stone" } }, + { "is": {"id": "minecraft:honeycomb", "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/honeycomb/honeycomb_ignores_waxed_copper.json b/tests/items/honeycomb/honeycomb_ignores_waxed_copper.json new file mode 100644 index 0000000..e2da393 --- /dev/null +++ b/tests/items/honeycomb/honeycomb_ignores_waxed_copper.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honeycomb_ignores_waxed_copper", + "description": "Using honeycomb on an already waxed copper block does nothing and keeps the honeycomb.", + "tags": ["item", "honeycomb", "waxing", "interaction"], + "minecraftIds": ["minecraft:honeycomb", "minecraft:waxed_copper_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:waxed_copper_block"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_copper_block" } }, + { "is": {"id": "minecraft:honeycomb" , "count": 2}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/honeycomb/honeycomb_ignores_waxed_sign.json b/tests/items/honeycomb/honeycomb_ignores_waxed_sign.json new file mode 100644 index 0000000..523266b --- /dev/null +++ b/tests/items/honeycomb/honeycomb_ignores_waxed_sign.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honeycomb_ignores_waxed_sign", + "description": "Using honeycomb on an already waxed oak sign changes nothing and keeps the honeycomb.", + "tags": ["item", "honeycomb", "waxing", "interaction"], + "minecraftIds": ["minecraft:honeycomb", "minecraft:oak_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { "id": "minecraft:oak_sign", "rotation": "0", "nbt": {"is_waxed": "1b"} } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:oak_sign", "rotation": "0", "nbt": {"is_waxed": "1b"} } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 2} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/honeycomb/honeycomb_keeps_bulb_state.json b/tests/items/honeycomb/honeycomb_keeps_bulb_state.json new file mode 100644 index 0000000..e25dd51 --- /dev/null +++ b/tests/items/honeycomb/honeycomb_keeps_bulb_state.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honeycomb_keeps_bulb_state", + "description": "Waxing a lit unpowered copper bulb keeps its lit and powered properties.", + "tags": ["item", "honeycomb", "waxing", "interaction"], + "minecraftIds": ["minecraft:honeycomb", "minecraft:copper_bulb", "minecraft:waxed_copper_bulb"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_bulb", "lit": "true", "powered": "false"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_copper_bulb", "lit": "true", "powered": "false"} }, + { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/honeycomb/honeycomb_keeps_stairs_state.json b/tests/items/honeycomb/honeycomb_keeps_stairs_state.json new file mode 100644 index 0000000..b9b8255 --- /dev/null +++ b/tests/items/honeycomb/honeycomb_keeps_stairs_state.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honeycomb_keeps_stairs_state", + "description": "Waxing cut copper stairs keeps the facing and half properties.", + "tags": ["item", "honeycomb", "waxing", "interaction"], + "minecraftIds": ["minecraft:honeycomb", "minecraft:cut_copper_stairs", "minecraft:waxed_cut_copper_stairs"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:cut_copper_stairs", "facing": "east", "half": "top"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": {"id": "minecraft:waxed_cut_copper_stairs", "facing": "east", "half": "top"} + }, + { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/honeycomb/honeycomb_keeps_weathering_stage.json b/tests/items/honeycomb/honeycomb_keeps_weathering_stage.json new file mode 100644 index 0000000..aaab402 --- /dev/null +++ b/tests/items/honeycomb/honeycomb_keeps_weathering_stage.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honeycomb_keeps_weathering_stage", + "description": "Using honeycomb on weathered cut copper gives waxed weathered cut copper, so the weathering stage is kept.", + "tags": ["item", "honeycomb", "waxing", "interaction"], + "minecraftIds": ["minecraft:honeycomb", "minecraft:weathered_cut_copper", "minecraft:waxed_weathered_cut_copper"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:weathered_cut_copper"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_weathered_cut_copper"} }, + { "is": {"id": "minecraft:honeycomb", "count": 1} , "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/honeycomb/honeycomb_waxes_copper_block.json b/tests/items/honeycomb/honeycomb_waxes_copper_block.json new file mode 100644 index 0000000..9731d89 --- /dev/null +++ b/tests/items/honeycomb/honeycomb_waxes_copper_block.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honeycomb_waxes_copper_block", + "description": "Using honeycomb on a copper block turns it into a waxed copper block and uses up one honeycomb in survival.", + "tags": ["item", "honeycomb", "waxing", "interaction"], + "minecraftIds": ["minecraft:honeycomb", "minecraft:copper_block", "minecraft:waxed_copper_block"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_block"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_copper_block" } }, + { "is": {"id": "minecraft:honeycomb" , "count": 1}, "slot": "hotbar1" } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/honeycomb/honeycomb_waxes_golem_statue.json b/tests/items/honeycomb/honeycomb_waxes_golem_statue.json new file mode 100644 index 0000000..51e3054 --- /dev/null +++ b/tests/items/honeycomb/honeycomb_waxes_golem_statue.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honeycomb_waxes_golem_statue", + "description": "Using honeycomb on a copper golem statue waxes it instead of changing its pose.", + "tags": ["item", "honeycomb", "waxing", "interaction"], + "minecraftIds": ["minecraft:honeycomb", "minecraft:copper_golem_statue", "minecraft:waxed_copper_golem_statue"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": {"id": "minecraft:copper_golem_statue", "facing": "north", "copper_golem_pose": "standing"} + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id" : "minecraft:waxed_copper_golem_statue", + "facing" : "north" , + "copper_golem_pose": "standing" + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/items/honeycomb/honeycomb_waxes_sign.json b/tests/items/honeycomb/honeycomb_waxes_sign.json new file mode 100644 index 0000000..94b28d8 --- /dev/null +++ b/tests/items/honeycomb/honeycomb_waxes_sign.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "honeycomb_waxes_sign", + "description": "Using honeycomb on an unwaxed oak sign sets is_waxed and uses up one honeycomb.", + "tags": ["item", "honeycomb", "waxing", "interaction"], + "minecraftIds": ["minecraft:honeycomb", "minecraft:oak_sign"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { "id": "minecraft:oak_sign", "rotation": "0", "nbt": {"is_waxed": "0b"} } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:oak_sign", "rotation": "0", "nbt": {"is_waxed": "1b"} } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 1} } + ] + } + ], + "breakpoints": [] +} + From 786f5847fd71d2d1037bcffc71536de907d03ab5 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 2 Nov 2026 05:30:39 +0100 Subject: [PATCH 79/85] Add Flint tests for ink_sac (1 blocks) --- .../ink_sac_adventure_cannot_apply.json | 52 ++++++++++++++++ .../ink_sac_creative_not_consumed.json | 55 +++++++++++++++++ .../ink_sac_ignores_empty_glowing_sign.json | 52 ++++++++++++++++ .../ink_sac/ink_sac_ignores_waxed_sign.json | 53 ++++++++++++++++ .../ink_sac_removes_back_glow_only.json | 60 +++++++++++++++++++ .../ink_sac/ink_sac_removes_front_glow.json | 55 +++++++++++++++++ .../ink_sac/ink_sac_unlit_text_unchanged.json | 55 +++++++++++++++++ tests/items/ink_sac/ink_sac_use_on_stone.json | 40 +++++++++++++ .../ink_sac/ink_sac_wall_hanging_sign.json | 56 +++++++++++++++++ 9 files changed, 478 insertions(+) create mode 100644 tests/items/ink_sac/ink_sac_adventure_cannot_apply.json create mode 100644 tests/items/ink_sac/ink_sac_creative_not_consumed.json create mode 100644 tests/items/ink_sac/ink_sac_ignores_empty_glowing_sign.json create mode 100644 tests/items/ink_sac/ink_sac_ignores_waxed_sign.json create mode 100644 tests/items/ink_sac/ink_sac_removes_back_glow_only.json create mode 100644 tests/items/ink_sac/ink_sac_removes_front_glow.json create mode 100644 tests/items/ink_sac/ink_sac_unlit_text_unchanged.json create mode 100644 tests/items/ink_sac/ink_sac_use_on_stone.json create mode 100644 tests/items/ink_sac/ink_sac_wall_hanging_sign.json diff --git a/tests/items/ink_sac/ink_sac_adventure_cannot_apply.json b/tests/items/ink_sac/ink_sac_adventure_cannot_apply.json new file mode 100644 index 0000000..7252ade --- /dev/null +++ b/tests/items/ink_sac/ink_sac_adventure_cannot_apply.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ink_sac", "minecraft:oak_sign"], + "name": "ink_sac_adventure_cannot_apply", + "description": "An adventure mode player cannot build, so using an ink sac on a glowing sign does nothing and uses no ink sac.", + "tags": ["item", "ink_sac", "sign", "block-entity", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 3] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ink_sac", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Adventure" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 0, + "nbt": { + "front_text": "{color: \"red\", has_glowing_text: 1b, messages: [\"hi\", \"\", \"\", \"\"]}" + } + } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 2.5], "rot": [180, 30] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:oak_sign", "nbt": {"front_text.has_glowing_text": "1b"} } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:ink_sac", "count": 2} } + ] + } + ] +} + diff --git a/tests/items/ink_sac/ink_sac_creative_not_consumed.json b/tests/items/ink_sac/ink_sac_creative_not_consumed.json new file mode 100644 index 0000000..49a722b --- /dev/null +++ b/tests/items/ink_sac/ink_sac_creative_not_consumed.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ink_sac", "minecraft:oak_sign"], + "name": "ink_sac_creative_not_consumed", + "description": "A creative player using an ink sac on a glowing sign turns the glow off, but the stack keeps its size because consume skips players with infinite materials.", + "tags": ["item", "ink_sac", "sign", "block-entity", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 3] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ink_sac", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 0, + "nbt": { + "front_text": "{color: \"red\", has_glowing_text: 1b, messages: [\"hi\", \"\", \"\", \"\"]}" + } + } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 2.5], "rot": [180, 30] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:oak_sign", + "nbt": {"front_text.has_glowing_text": "0b", "front_text.color": "red"} + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:ink_sac", "count": 2} } + ] + } + ] +} + diff --git a/tests/items/ink_sac/ink_sac_ignores_empty_glowing_sign.json b/tests/items/ink_sac/ink_sac_ignores_empty_glowing_sign.json new file mode 100644 index 0000000..4eb89e3 --- /dev/null +++ b/tests/items/ink_sac/ink_sac_ignores_empty_glowing_sign.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ink_sac", "minecraft:oak_sign"], + "name": "ink_sac_ignores_empty_glowing_sign", + "description": "Using an ink sac on a glowing sign without any text does nothing: canApplyToSign needs a non-empty line, so the glow stays and no ink sac is used.", + "tags": ["item", "ink_sac", "sign", "block-entity", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 3] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ink_sac", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 0, + "nbt": { + "front_text": "{color: \"red\", has_glowing_text: 1b, messages: [\"\", \"\", \"\", \"\"]}" + } + } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 2.5], "rot": [180, 30] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:oak_sign", "nbt": {"front_text.has_glowing_text": "1b"} } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:ink_sac", "count": 2} } + ] + } + ] +} + diff --git a/tests/items/ink_sac/ink_sac_ignores_waxed_sign.json b/tests/items/ink_sac/ink_sac_ignores_waxed_sign.json new file mode 100644 index 0000000..aa733c4 --- /dev/null +++ b/tests/items/ink_sac/ink_sac_ignores_waxed_sign.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ink_sac", "minecraft:oak_sign"], + "name": "ink_sac_ignores_waxed_sign", + "description": "Using an ink sac on a waxed glowing sign does nothing: the glow stays, the sign stays waxed and no ink sac is used.", + "tags": ["item", "ink_sac", "sign", "block-entity", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 3] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ink_sac", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 0, + "nbt": { + "front_text": "{color: \"red\", has_glowing_text: 1b, messages: [\"hi\", \"\", \"\", \"\"]}", + "is_waxed": "1b" + } + } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 2.5], "rot": [180, 30] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:oak_sign", "nbt": {"front_text.has_glowing_text": "1b", "is_waxed": "1b"} } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:ink_sac", "count": 2} } + ] + } + ] +} + diff --git a/tests/items/ink_sac/ink_sac_removes_back_glow_only.json b/tests/items/ink_sac/ink_sac_removes_back_glow_only.json new file mode 100644 index 0000000..86a7fd0 --- /dev/null +++ b/tests/items/ink_sac/ink_sac_removes_back_glow_only.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ink_sac", "minecraft:oak_sign"], + "name": "ink_sac_removes_back_glow_only", + "description": "Using an ink sac from behind a sign with glowing text on both sides turns off only the back glow; the front stays glowing and one ink sac is used.", + "tags": ["item", "ink_sac", "sign", "block-entity", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, -3], [0, 2, 3] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ink_sac", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 0, -1], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 0, + "nbt": { + "front_text": "{color: \"red\", has_glowing_text: 1b, messages: [\"hi\", \"\", \"\", \"\"]}", + "back_text": "{color: \"blue\", has_glowing_text: 1b, messages: [\"hi\", \"\", \"\", \"\"]}" + } + } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -1.5], "rot": [0, 30] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:oak_sign", + "nbt": { + "back_text.has_glowing_text" : "0b" , + "back_text.color" : "blue", + "front_text.has_glowing_text": "1b" + } + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:ink_sac", "count": 1} } + ] + } + ] +} + diff --git a/tests/items/ink_sac/ink_sac_removes_front_glow.json b/tests/items/ink_sac/ink_sac_removes_front_glow.json new file mode 100644 index 0000000..7447c46 --- /dev/null +++ b/tests/items/ink_sac/ink_sac_removes_front_glow.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ink_sac", "minecraft:oak_sign"], + "name": "ink_sac_removes_front_glow", + "description": "Using an ink sac on the front of a glowing sign with text turns the glow off, keeps the dye colour and uses up one ink sac of the stack.", + "tags": ["item", "ink_sac", "sign", "block-entity", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 3] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ink_sac", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 0, + "nbt": { + "front_text": "{color: \"red\", has_glowing_text: 1b, messages: [\"hi\", \"\", \"\", \"\"]}" + } + } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 2.5], "rot": [180, 30] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:oak_sign", + "nbt": {"front_text.has_glowing_text": "0b", "front_text.color": "red", "is_waxed": "0b"} + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:ink_sac", "count": 1} } + ] + } + ] +} + diff --git a/tests/items/ink_sac/ink_sac_unlit_text_unchanged.json b/tests/items/ink_sac/ink_sac_unlit_text_unchanged.json new file mode 100644 index 0000000..0b41e21 --- /dev/null +++ b/tests/items/ink_sac/ink_sac_unlit_text_unchanged.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ink_sac", "minecraft:oak_sign"], + "name": "ink_sac_unlit_text_unchanged", + "description": "Using an ink sac on a sign whose text is not glowing changes nothing and does not use up the ink sac, because updateText reports no change.", + "tags": ["item", "ink_sac", "sign", "block-entity", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 3] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ink_sac", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 0, 2], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:oak_sign", + "rotation": 0, + "nbt": { + "front_text": "{color: \"red\", has_glowing_text: 0b, messages: [\"hi\", \"\", \"\", \"\"]}" + } + } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 2.5], "rot": [180, 30] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:oak_sign", + "nbt": {"front_text.has_glowing_text": "0b", "front_text.color": "red", "is_waxed": "0b"} + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:ink_sac", "count": 2} } + ] + } + ] +} + diff --git a/tests/items/ink_sac/ink_sac_use_on_stone.json b/tests/items/ink_sac/ink_sac_use_on_stone.json new file mode 100644 index 0000000..ab02824 --- /dev/null +++ b/tests/items/ink_sac/ink_sac_use_on_stone.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ink_sac", "minecraft:stone"], + "name": "ink_sac_use_on_stone", + "description": "Using an ink sac on a stone block does nothing: InkSacItem has no useOn behaviour, so the block and the stack stay unchanged.", + "tags": ["item", "ink_sac", "sign", "block-entity", "interaction", "player"], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 3] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ink_sac", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 2], "is": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 1], "is": {"id": "minecraft:air" } }, + { "is": {"id": "minecraft:ink_sac", "count": 2}, "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/items/ink_sac/ink_sac_wall_hanging_sign.json b/tests/items/ink_sac/ink_sac_wall_hanging_sign.json new file mode 100644 index 0000000..7b6ecff --- /dev/null +++ b/tests/items/ink_sac/ink_sac_wall_hanging_sign.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "minecraftIds": ["minecraft:ink_sac", "minecraft:oak_wall_hanging_sign"], + "name": "ink_sac_wall_hanging_sign", + "description": "Using an ink sac on the front of a glowing wall hanging sign turns the glow off and uses one ink sac, so the same SignApplicator path works for hanging signs.", + "tags": ["item", "ink_sac", "sign", "block-entity", "interaction", "player", "hanging-sign"], + "setup": { + "cleanup": { + "region": [ [-1, 0, -3], [1, 3, 3] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:ink_sac", "count": 2} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, -3], "block": {"id": "minecraft:stone"} }, + { "pos": [-1, 2, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 2, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 2, 0], + "block": { + "id": "minecraft:oak_wall_hanging_sign", + "facing": "north", + "nbt": { + "front_text": "{color: \"red\", has_glowing_text: 1b, messages: [\"hi\", \"\", \"\", \"\"]}" + } + } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, -2.5], "rot": [0, 13] }, + {"at": 2, "do": "interact"}, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:oak_wall_hanging_sign", + "nbt": {"front_text.has_glowing_text": "0b", "front_text.color": "red"} + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:ink_sac", "count": 1} } + ] + } + ] +} + From a207f478829ce3ff58d03fbaa7bde96e99cd979f Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 2 Nov 2026 05:46:07 +0100 Subject: [PATCH 80/85] Add Flint tests for jack_o_lantern (1 blocks) --- .../jack_o_lantern_destroyed_by_piston.json | 45 +++++++++++++ .../jack_o_lantern_dispenser_drops_item.json | 60 +++++++++++++++++ ...antern_no_golem_when_snow_added_below.json | 37 +++++++++++ ...antern_no_iron_golem_with_blocked_arm.json | 52 +++++++++++++++ .../jack_o_lantern_placement_facing.json | 52 +++++++++++++++ ...lantern_refacing_does_not_spawn_golem.json | 38 +++++++++++ .../jack_o_lantern_spawns_copper_golem.json | 60 +++++++++++++++++ .../jack_o_lantern_spawns_iron_golem.json | 64 ++++++++++++++++++ .../jack_o_lantern_spawns_snow_golem.json | 65 +++++++++++++++++++ ...ck_o_lantern_tnt_explosion_drops_item.json | 55 ++++++++++++++++ 10 files changed, 528 insertions(+) create mode 100644 tests/decoration/jack_o_lantern/jack_o_lantern_destroyed_by_piston.json create mode 100644 tests/decoration/jack_o_lantern/jack_o_lantern_dispenser_drops_item.json create mode 100644 tests/decoration/jack_o_lantern/jack_o_lantern_no_golem_when_snow_added_below.json create mode 100644 tests/decoration/jack_o_lantern/jack_o_lantern_no_iron_golem_with_blocked_arm.json create mode 100644 tests/decoration/jack_o_lantern/jack_o_lantern_placement_facing.json create mode 100644 tests/decoration/jack_o_lantern/jack_o_lantern_refacing_does_not_spawn_golem.json create mode 100644 tests/decoration/jack_o_lantern/jack_o_lantern_spawns_copper_golem.json create mode 100644 tests/decoration/jack_o_lantern/jack_o_lantern_spawns_iron_golem.json create mode 100644 tests/decoration/jack_o_lantern/jack_o_lantern_spawns_snow_golem.json create mode 100644 tests/decoration/jack_o_lantern/jack_o_lantern_tnt_explosion_drops_item.json diff --git a/tests/decoration/jack_o_lantern/jack_o_lantern_destroyed_by_piston.json b/tests/decoration/jack_o_lantern/jack_o_lantern_destroyed_by_piston.json new file mode 100644 index 0000000..8841974 --- /dev/null +++ b/tests/decoration/jack_o_lantern/jack_o_lantern_destroyed_by_piston.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jack_o_lantern_destroyed_by_piston", + "description": "An extending piston destroys a jack o'lantern in front of it instead of pushing it (push reaction DESTROY) and the jack o'lantern drops itself as an item.", + "tags": ["decoration", "jack-o-lantern", "piston", "push-reaction", "drops"], + "minecraftIds": ["minecraft:jack_o_lantern", "minecraft:piston", "minecraft:redstone_block", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, -2], [6, 3, 3] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:piston", "facing": "east", "extended": false} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:jack_o_lantern", "facing": "north"} } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 0], "is": {"id": "minecraft:jack_o_lantern", "facing": "north"} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { "at": 3, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "extended": true, "facing": "east"} } , + { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east"} } , + { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:jack_o_lantern"} + ] + } + ] +} + diff --git a/tests/decoration/jack_o_lantern/jack_o_lantern_dispenser_drops_item.json b/tests/decoration/jack_o_lantern/jack_o_lantern_dispenser_drops_item.json new file mode 100644 index 0000000..5ead4b0 --- /dev/null +++ b/tests/decoration/jack_o_lantern/jack_o_lantern_dispenser_drops_item.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jack_o_lantern_dispenser_drops_item", + "description": "A powered dispenser holding a jack o'lantern shoots it out as an item instead of placing it (only the carved pumpkin has a dispenser behavior), so a snow golem pattern it points at is not completed and no golem spawns.", + "tags": ["decoration", "jack-o-lantern", "dispenser", "golem", "redstone"], + "minecraftIds": [ + "minecraft:jack_o_lantern", "minecraft:dispenser" , "minecraft:snow_block" , "minecraft:redstone_block", + "minecraft:snow_golem" , "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [2, 3, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [1, -1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:snow_block"} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:snow_block"} }, + { + "pos": [0, 2, 0], + "block": { + "id": "minecraft:dispenser", + "facing": "east", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:jack_o_lantern\"}]"} + } + } + ] + }, + { "at": 2, "do": "place", "pos": [0, 3, 0], "block": {"id": "minecraft:redstone_block"} }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [1, 2, 0], "is": {"id": "minecraft:air"} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:snow_block"} }, + { "pos": [1, 0, 0], "is": {"id": "minecraft:snow_block"} }, + { + "pos": [0, 2, 0], + "is": { "id": "minecraft:dispenser", "nbt": {"Items": []} } + }, + { + "is": "minecraft:item", + "exists": true, + "count": 1, + "pos": [1.5, 2.5, 0.5], + "position_tolerance": 3, + "Item.id": "minecraft:jack_o_lantern" + }, + { "is": "minecraft:snow_golem", "exists": false, "pos": [1.5, 0.5, 0.5], "position_tolerance": 5 } + ] + } + ] +} + diff --git a/tests/decoration/jack_o_lantern/jack_o_lantern_no_golem_when_snow_added_below.json b/tests/decoration/jack_o_lantern/jack_o_lantern_no_golem_when_snow_added_below.json new file mode 100644 index 0000000..0ec3319 --- /dev/null +++ b/tests/decoration/jack_o_lantern/jack_o_lantern_no_golem_when_snow_added_below.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jack_o_lantern_no_golem_when_snow_added_below", + "description": "Building a snow golem pattern under an already placed jack o'lantern does nothing: CarvedPumpkinBlock only checks for golems in onPlace, so the jack o'lantern and the snow blocks stay and no snow golem spawns.", + "tags": ["decoration", "jack-o-lantern", "golem", "snow-golem", "placement-order"], + "minecraftIds": ["minecraft:jack_o_lantern", "minecraft:snow_block", "minecraft:snow_golem", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [1, 3, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, -1, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 2, 3], "block": {"id": "minecraft:jack_o_lantern"} } + ] + }, + { "at": 1, "do": "place", "pos": [0, 1, 3], "block": {"id": "minecraft:snow_block"} }, + { "at": 2, "do": "place", "pos": [0, 0, 3], "block": {"id": "minecraft:snow_block"} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 3], "is": {"id": "minecraft:jack_o_lantern"} } , + { "pos": [0, 1, 3], "is": {"id": "minecraft:snow_block"} } , + { "pos": [0, 0, 3], "is": {"id": "minecraft:snow_block"} } , + { "is": "minecraft:snow_golem", "exists": false, "pos": [0.5, 0.05, 3.5], "position_tolerance": 5 } + ] + } + ] +} + diff --git a/tests/decoration/jack_o_lantern/jack_o_lantern_no_iron_golem_with_blocked_arm.json b/tests/decoration/jack_o_lantern/jack_o_lantern_no_iron_golem_with_blocked_arm.json new file mode 100644 index 0000000..204f2ef --- /dev/null +++ b/tests/decoration/jack_o_lantern/jack_o_lantern_no_iron_golem_with_blocked_arm.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jack_o_lantern_no_iron_golem_with_blocked_arm", + "description": "A jack o'lantern placed on a T of iron blocks does nothing when one of the air spaces beside the lower iron block is filled: the pattern requires air there, so the blocks stay and no iron golem spawns.", + "tags": ["decoration", "jack-o-lantern", "golem", "iron-golem", "player"], + "minecraftIds": ["minecraft:jack_o_lantern", "minecraft:iron_block", "minecraft:iron_golem", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, 0], [1, 3, 6] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:jack_o_lantern", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, -1, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 0, 5], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [-1, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 0, 3], "block": {"id": "minecraft:iron_block"} }, + { "pos": [-1, 1, 3], "block": {"id": "minecraft:iron_block"} }, + { "pos": [ 0, 1, 3], "block": {"id": "minecraft:iron_block"} }, + { "pos": [ 1, 1, 3], "block": {"id": "minecraft:iron_block"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 5.5], "rot": [180, 0] }, + {"at": 2, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 2, 3], "is": {"id": "minecraft:jack_o_lantern", "facing": "south"} } , + { "pos": [0, 0, 3], "is": {"id": "minecraft:iron_block"} } , + { "pos": [-1, 1, 3], "is": {"id": "minecraft:iron_block"} } , + { "pos": [0, 1, 3], "is": {"id": "minecraft:iron_block"} } , + { "pos": [1, 1, 3], "is": {"id": "minecraft:iron_block"} } , + { "pos": [-1, 0, 3], "is": {"id": "minecraft:stone"} } , + {"slot": "hotbar1", "is": "empty"} , + { "is": "minecraft:iron_golem", "exists": false, "pos": [0.5, 0.05, 3.5], "position_tolerance": 5 } + ] + } + ] +} + diff --git a/tests/decoration/jack_o_lantern/jack_o_lantern_placement_facing.json b/tests/decoration/jack_o_lantern/jack_o_lantern_placement_facing.json new file mode 100644 index 0000000..143cb0b --- /dev/null +++ b/tests/decoration/jack_o_lantern/jack_o_lantern_placement_facing.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jack_o_lantern_placement_facing", + "description": "A jack o'lantern placed by a player faces back towards the player: CarvedPumpkinBlock.getStateForPlacement uses the opposite of the player's horizontal direction.", + "tags": ["decoration", "jack-o-lantern", "placement", "block-state", "player"], + "minecraftIds": ["minecraft:jack_o_lantern", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -2], [2, 2, 2] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:jack_o_lantern", "count": 4} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, -1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [-2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [ 0, 1, -2], "block": {"id": "minecraft:stone"} }, + { "pos": [ 2, 1, 0], "block": {"id": "minecraft:stone"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, + {"at": 2, "do": "interact"}, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [90, 0] }, + {"at": 4, "do": "interact"}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [180, 0] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [-90, 0] }, + {"at": 8, "do": "interact"}, + { + "at": 9, + "do": "assert", + "checks": [ + { "pos": [ 0, 1, 1], "is": {"id": "minecraft:jack_o_lantern", "facing": "north"} }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:jack_o_lantern", "facing": "east"} }, + { "pos": [ 0, 1, -1], "is": {"id": "minecraft:jack_o_lantern", "facing": "south"} }, + { "pos": [ 1, 1, 0], "is": {"id": "minecraft:jack_o_lantern", "facing": "west"} }, + { "is": "empty" , "slot": "hotbar1" } + ] + } + ] +} + diff --git a/tests/decoration/jack_o_lantern/jack_o_lantern_refacing_does_not_spawn_golem.json b/tests/decoration/jack_o_lantern/jack_o_lantern_refacing_does_not_spawn_golem.json new file mode 100644 index 0000000..af9941a --- /dev/null +++ b/tests/decoration/jack_o_lantern/jack_o_lantern_refacing_does_not_spawn_golem.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jack_o_lantern_refacing_does_not_spawn_golem", + "description": "Replacing a jack o'lantern on top of a complete snow golem pattern with a jack o'lantern facing another way only changes its facing: onPlace skips the golem check when the old state was already the same block.", + "tags": ["decoration", "jack-o-lantern", "golem", "snow-golem", "block-state"], + "minecraftIds": ["minecraft:jack_o_lantern", "minecraft:snow_block", "minecraft:snow_golem", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [1, 3, 4] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, -1, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 2, 3], "block": {"id": "minecraft:jack_o_lantern", "facing": "north"} } + ] + }, + { "at": 1, "do": "place", "pos": [0, 1, 3], "block": {"id": "minecraft:snow_block"} }, + { "at": 2, "do": "place", "pos": [0, 0, 3], "block": {"id": "minecraft:snow_block"} }, + { "at": 3, "do": "place", "pos": [0, 2, 3], "block": {"id": "minecraft:jack_o_lantern", "facing": "east"} }, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 2, 3], "is": {"id": "minecraft:jack_o_lantern", "facing": "east"} } , + { "pos": [0, 1, 3], "is": {"id": "minecraft:snow_block"} } , + { "pos": [0, 0, 3], "is": {"id": "minecraft:snow_block"} } , + { "is": "minecraft:snow_golem", "exists": false, "pos": [0.5, 0.05, 3.5], "position_tolerance": 5 } + ] + } + ] +} + diff --git a/tests/decoration/jack_o_lantern/jack_o_lantern_spawns_copper_golem.json b/tests/decoration/jack_o_lantern/jack_o_lantern_spawns_copper_golem.json new file mode 100644 index 0000000..9742d10 --- /dev/null +++ b/tests/decoration/jack_o_lantern/jack_o_lantern_spawns_copper_golem.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jack_o_lantern_spawns_copper_golem", + "description": "Placing a jack o'lantern on a copper block removes the jack o'lantern, replaces the copper block with a copper chest facing the way the jack o'lantern faced, and spawns a copper golem.", + "tags": ["decoration", "jack-o-lantern", "golem", "copper-golem", "player"], + "minecraftIds": [ + "minecraft:jack_o_lantern", "minecraft:copper_block" , "minecraft:copper_chest" , "minecraft:copper_golem" , + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [1, 3, 6] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:jack_o_lantern", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 5], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:copper_block"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 5.5], "rot": [180, 0] }, + { + "at": 2, + "do": "assert", + "checks": [ + { "is": "minecraft:copper_golem", "exists": false, "pos": [0.5, 2.05, 3.5], "position_tolerance": 3 } + ] + }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 2, 3], "is": {"id": "minecraft:air"} }, + { "pos": [0, 1, 3], "is": {"id": "minecraft:copper_chest", "facing": "south", "type": "single"} }, + {"slot": "hotbar1", "is": "empty"}, + { + "is": "minecraft:copper_golem", + "exists": true, + "count": 1, + "pos": [0.5, 2.05, 3.5], + "position_tolerance": 3 + } + ] + } + ] +} + diff --git a/tests/decoration/jack_o_lantern/jack_o_lantern_spawns_iron_golem.json b/tests/decoration/jack_o_lantern/jack_o_lantern_spawns_iron_golem.json new file mode 100644 index 0000000..223908d --- /dev/null +++ b/tests/decoration/jack_o_lantern/jack_o_lantern_spawns_iron_golem.json @@ -0,0 +1,64 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jack_o_lantern_spawns_iron_golem", + "description": "Placing a jack o'lantern on the middle top of a T of four iron blocks with air around it removes the whole pattern and spawns an iron golem.", + "tags": ["decoration", "jack-o-lantern", "golem", "iron-golem", "player"], + "minecraftIds": ["minecraft:jack_o_lantern", "minecraft:iron_block", "minecraft:iron_golem", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, -1, 0], [1, 3, 6] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:jack_o_lantern", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, -1, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 0, 5], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 2, 2], "block": {"id": "minecraft:stone" } }, + { "pos": [ 0, 0, 3], "block": {"id": "minecraft:iron_block"} }, + { "pos": [-1, 1, 3], "block": {"id": "minecraft:iron_block"} }, + { "pos": [ 0, 1, 3], "block": {"id": "minecraft:iron_block"} }, + { "pos": [ 1, 1, 3], "block": {"id": "minecraft:iron_block"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 5.5], "rot": [180, 0] }, + { + "at": 2, + "do": "assert", + "checks": [ + { "is": "minecraft:iron_golem", "exists": false, "pos": [0.5, 0.05, 3.5], "position_tolerance": 3 } + ] + }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { "pos": [0, 0, 3], "is": {"id": "minecraft:air"} }, + { "pos": [-1, 1, 3], "is": {"id": "minecraft:air"} }, + { "pos": [0, 1, 3], "is": {"id": "minecraft:air"} }, + { "pos": [1, 1, 3], "is": {"id": "minecraft:air"} }, + { "pos": [0, 2, 3], "is": {"id": "minecraft:air"} }, + { "pos": [0, 2, 2], "is": {"id": "minecraft:stone"} }, + {"slot": "hotbar1", "is": "empty"}, + { + "is": "minecraft:iron_golem", + "exists": true, + "count": 1, + "pos": [0.5, 0.05, 3.5], + "position_tolerance": 3 + } + ] + } + ] +} + diff --git a/tests/decoration/jack_o_lantern/jack_o_lantern_spawns_snow_golem.json b/tests/decoration/jack_o_lantern/jack_o_lantern_spawns_snow_golem.json new file mode 100644 index 0000000..4abd683 --- /dev/null +++ b/tests/decoration/jack_o_lantern/jack_o_lantern_spawns_snow_golem.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jack_o_lantern_spawns_snow_golem", + "description": "Placing a jack o'lantern on top of two stacked snow blocks removes all three blocks and spawns a snow golem (the golem may leave a snow layer on the spot of the bottom block).", + "tags": ["decoration", "jack-o-lantern", "golem", "snow-golem", "player"], + "minecraftIds": ["minecraft:jack_o_lantern", "minecraft:snow_block", "minecraft:snow_golem", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, -1, 0], [1, 3, 6] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:jack_o_lantern", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, -1, 3], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 5], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 0, 3], "block": {"id": "minecraft:snow_block"} }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:snow_block"} }, + { "pos": [0, 2, 2], "block": {"id": "minecraft:stone" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 5.5], "rot": [180, 0] }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 0, 3], "is": {"id": "minecraft:snow_block"} } , + { "pos": [0, 1, 3], "is": {"id": "minecraft:snow_block"} } , + { "is": "minecraft:snow_golem", "exists": false, "pos": [0.5, 0.05, 3.5], "position_tolerance": 2 } + ] + }, + {"at": 3, "do": "interact"}, + { + "at": 4, + "do": "assert", + "checks": [ + { + "pos": [ 0 , 0 , 3 ], + "is" : [ {"id": "minecraft:air"}, {"id": "minecraft:snow", "layers": 1} ] + }, + { "pos": [0, 1, 3], "is": {"id": "minecraft:air"} }, + { "pos": [0, 2, 3], "is": {"id": "minecraft:air"} }, + { "pos": [0, 2, 2], "is": {"id": "minecraft:stone"} }, + {"slot": "hotbar1", "is": "empty"}, + { + "is": "minecraft:snow_golem", + "exists": true, + "count": 1, + "pos": [0.5, 0.05, 3.5], + "position_tolerance": 2 + } + ] + } + ] +} + diff --git a/tests/decoration/jack_o_lantern/jack_o_lantern_tnt_explosion_drops_item.json b/tests/decoration/jack_o_lantern/jack_o_lantern_tnt_explosion_drops_item.json new file mode 100644 index 0000000..48b4dc6 --- /dev/null +++ b/tests/decoration/jack_o_lantern/jack_o_lantern_tnt_explosion_drops_item.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jack_o_lantern_tnt_explosion_drops_item", + "description": "A jack o'lantern destroyed by a TNT explosion drops exactly one jack o'lantern item (its loot table is dropSelf).", + "tags": ["decoration", "jack-o-lantern", "drops", "explosion", "tnt"], + "minecraftIds": ["minecraft:jack_o_lantern", "minecraft:tnt", "minecraft:obsidian"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [3, 3, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [3, 0, 2] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 1, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:jack_o_lantern", "facing": "north"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:jack_o_lantern"} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { + "at": 3, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [2.5, 1, 1.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [1, 1, 1], "is": {"id": "minecraft:air"} }, + { + "is": "minecraft:item", + "exists": true, + "count": 1, + "pos": [1.5, 1.5, 1.5], + "position_tolerance": 4, + "Item.id": "minecraft:jack_o_lantern" + } + ] + } + ] +} + From 3e76842ef318a73ddb2f64975883a6c03058859e Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Mon, 2 Nov 2026 05:56:22 +0100 Subject: [PATCH 81/85] Add Flint tests for jukebox (1 blocks) --- .../jukebox_comparator_output_per_disc.json | 126 ++++++++++++++++++ .../jukebox/jukebox_disc_swap_rejected.json | 55 ++++++++ .../jukebox_eject_disc_empty_hand.json | 87 ++++++++++++ .../jukebox_explosion_drops_itself.json | 49 +++++++ .../jukebox_hopper_extracts_idle_disc.json | 49 +++++++ .../jukebox/jukebox_hopper_inserts_disc.json | 55 ++++++++ .../jukebox_hopper_rejects_non_disc.json | 45 +++++++ .../jukebox/jukebox_insert_disc_creative.json | 48 +++++++ .../jukebox/jukebox_insert_disc_survival.json | 76 +++++++++++ .../jukebox_non_disc_item_ignored.json | 42 ++++++ .../jukebox/jukebox_place_item_empty.json | 51 +++++++ .../jukebox_playing_locks_hopper_below.json | 62 +++++++++ .../jukebox_playing_weak_power_only.json | 58 ++++++++ .../jukebox/jukebox_song_end_stops_power.json | 79 +++++++++++ 14 files changed, 882 insertions(+) create mode 100644 tests/redstone/jukebox/jukebox_comparator_output_per_disc.json create mode 100644 tests/redstone/jukebox/jukebox_disc_swap_rejected.json create mode 100644 tests/redstone/jukebox/jukebox_eject_disc_empty_hand.json create mode 100644 tests/redstone/jukebox/jukebox_explosion_drops_itself.json create mode 100644 tests/redstone/jukebox/jukebox_hopper_extracts_idle_disc.json create mode 100644 tests/redstone/jukebox/jukebox_hopper_inserts_disc.json create mode 100644 tests/redstone/jukebox/jukebox_hopper_rejects_non_disc.json create mode 100644 tests/redstone/jukebox/jukebox_insert_disc_creative.json create mode 100644 tests/redstone/jukebox/jukebox_insert_disc_survival.json create mode 100644 tests/redstone/jukebox/jukebox_non_disc_item_ignored.json create mode 100644 tests/redstone/jukebox/jukebox_place_item_empty.json create mode 100644 tests/redstone/jukebox/jukebox_playing_locks_hopper_below.json create mode 100644 tests/redstone/jukebox/jukebox_playing_weak_power_only.json create mode 100644 tests/redstone/jukebox/jukebox_song_end_stops_power.json diff --git a/tests/redstone/jukebox/jukebox_comparator_output_per_disc.json b/tests/redstone/jukebox/jukebox_comparator_output_per_disc.json new file mode 100644 index 0000000..304649c --- /dev/null +++ b/tests/redstone/jukebox/jukebox_comparator_output_per_disc.json @@ -0,0 +1,126 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jukebox_comparator_output_per_disc", + "description": "A comparator reads a jukebox's stored disc rather than playback: discs 13, cat, mellohi, 5 and relic give outputs 1, 2, 7, 15 and 14, and since they were loaded without a song start the jukeboxes stay silent and adjacent lamps stay off.", + "tags": ["jukebox", "music-disc", "comparator", "redstone", "block-entity"], + "minecraftIds": [ + "minecraft:jukebox" , "minecraft:comparator" , "minecraft:redstone_lamp" , + "minecraft:stone" , "minecraft:music_disc_13" , "minecraft:music_disc_cat" , + "minecraft:music_disc_mellohi", "minecraft:music_disc_5" , "minecraft:music_disc_relic" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, 0], [1, 1, 8] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, 0], [1, 0, 8] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:comparator" , "facing": "west"} }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:redstone_lamp" } }, + { "pos": [ 1, 1, 2], "block": {"id": "minecraft:comparator" , "facing": "west"} }, + { "pos": [-1, 1, 2], "block": {"id": "minecraft:redstone_lamp" } }, + { "pos": [ 1, 1, 4], "block": {"id": "minecraft:comparator" , "facing": "west"} }, + { "pos": [-1, 1, 4], "block": {"id": "minecraft:redstone_lamp" } }, + { "pos": [ 1, 1, 6], "block": {"id": "minecraft:comparator" , "facing": "west"} }, + { "pos": [-1, 1, 6], "block": {"id": "minecraft:redstone_lamp" } }, + { "pos": [ 1, 1, 8], "block": {"id": "minecraft:comparator" , "facing": "west"} }, + { "pos": [-1, 1, 8], "block": {"id": "minecraft:redstone_lamp" } } + ] + }, + { + "at": 2, + "do": "place_each", + "blocks": [ + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:jukebox", + "has_record": true, + "nbt": {"RecordItem": "{id: \"minecraft:music_disc_13\", count: 1}"} + } + }, + { + "pos": [0, 1, 2], + "block": { + "id": "minecraft:jukebox", + "has_record": true, + "nbt": {"RecordItem": "{id: \"minecraft:music_disc_cat\", count: 1}"} + } + }, + { + "pos": [0, 1, 4], + "block": { + "id": "minecraft:jukebox", + "has_record": true, + "nbt": {"RecordItem": "{id: \"minecraft:music_disc_mellohi\", count: 1}"} + } + }, + { + "pos": [0, 1, 6], + "block": { + "id": "minecraft:jukebox", + "has_record": true, + "nbt": {"RecordItem": "{id: \"minecraft:music_disc_5\", count: 1}"} + } + }, + { + "pos": [0, 1, 8], + "block": { + "id": "minecraft:jukebox", + "has_record": true, + "nbt": {"RecordItem": "{id: \"minecraft:music_disc_relic\", count: 1}"} + } + } + ] + }, + { + "at": 7, + "do": "assert", + "checks": [ + { + "pos": [1, 1, 0], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 1} } + }, + { + "pos": [1, 1, 2], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 2} } + }, + { + "pos": [1, 1, 4], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 7} } + }, + { + "pos": [1, 1, 6], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 15} } + }, + { + "pos": [1, 1, 8], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 14} } + }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} }, + { "pos": [0, 1, 0], "is": {"id": "minecraft:jukebox", "has_record": true} }, + { "pos": [-1, 1, 2], "is": {"id": "minecraft:redstone_lamp", "lit": false} }, + { "pos": [0, 1, 2], "is": {"id": "minecraft:jukebox", "has_record": true} }, + { "pos": [-1, 1, 4], "is": {"id": "minecraft:redstone_lamp", "lit": false} }, + { "pos": [0, 1, 4], "is": {"id": "minecraft:jukebox", "has_record": true} }, + { "pos": [-1, 1, 6], "is": {"id": "minecraft:redstone_lamp", "lit": false} }, + { "pos": [0, 1, 6], "is": {"id": "minecraft:jukebox", "has_record": true} }, + { "pos": [-1, 1, 8], "is": {"id": "minecraft:redstone_lamp", "lit": false} }, + { "pos": [0, 1, 8], "is": {"id": "minecraft:jukebox", "has_record": true} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/jukebox/jukebox_disc_swap_rejected.json b/tests/redstone/jukebox/jukebox_disc_swap_rejected.json new file mode 100644 index 0000000..cd37bb1 --- /dev/null +++ b/tests/redstone/jukebox/jukebox_disc_swap_rejected.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jukebox_disc_swap_rejected", + "description": "Using a second music disc on a jukebox that already holds one ejects the stored disc instead of inserting the held one, which stays in the player's hand.", + "tags": ["jukebox", "music-disc", "block-entity", "player"], + "minecraftIds": [ + "minecraft:jukebox" , "minecraft:music_disc_cat" , "minecraft:music_disc_mellohi", + "minecraft:stone" , "minecraft:item" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:music_disc_mellohi", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "pos": [0, 1, 0], + "block": { + "id": "minecraft:jukebox", + "has_record": true, + "nbt": { + "RecordItem" : "{id: \"minecraft:music_disc_cat\", count: 1}", + "ticks_since_song_started": "0L" + } + } + } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:jukebox", "has_record": false} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:music_disc_cat"}, + { "slot": "hotbar1", "is": {"id": "minecraft:music_disc_mellohi", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/jukebox/jukebox_eject_disc_empty_hand.json b/tests/redstone/jukebox/jukebox_eject_disc_empty_hand.json new file mode 100644 index 0000000..fe8fa59 --- /dev/null +++ b/tests/redstone/jukebox/jukebox_eject_disc_empty_hand.json @@ -0,0 +1,87 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jukebox_eject_disc_empty_hand", + "description": "Using an empty hand on a jukebox playing an inserted disc pops the disc out as an item entity, sets has_record to false, clears RecordItem, turns an adjacent lamp off and drops the comparator output from 2 to 0.", + "tags": ["jukebox", "music-disc", "block-entity", "comparator", "redstone", "player"], + "minecraftIds": [ + "minecraft:jukebox" , "minecraft:music_disc_cat", "minecraft:redstone_lamp" , "minecraft:comparator" , + "minecraft:stone" , "minecraft:item" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 3, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:music_disc_cat", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:jukebox" } }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:redstone_lamp" } }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:comparator" , "facing": "west"} } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:jukebox", "has_record": false} }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 8, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:jukebox", + "has_record": true, + "nbt": {"RecordItem.id": "minecraft:music_disc_cat"} + } + }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": true} }, + { + "pos": [1, 1, 0], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 2} } + }, + {"slot": "hotbar1", "is": "empty"}, + {"is": "minecraft:item", "exists": false} + ] + }, + {"at": 9, "do": "interact"}, + { + "at": 13, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:jukebox", "has_record": false} }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} }, + { + "pos": [1, 1, 0], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 0} } + }, + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:music_disc_cat"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/jukebox/jukebox_explosion_drops_itself.json b/tests/redstone/jukebox/jukebox_explosion_drops_itself.json new file mode 100644 index 0000000..0d9e1dd --- /dev/null +++ b/tests/redstone/jukebox/jukebox_explosion_drops_itself.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jukebox_explosion_drops_itself", + "description": "A jukebox without a disc destroyed by a TNT explosion drops exactly one item, the jukebox itself.", + "tags": ["jukebox", "block-entity", "explosion", "drops", "tnt"], + "minecraftIds": ["minecraft:jukebox", "minecraft:obsidian", "minecraft:tnt", "minecraft:item"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, 0, -3], [3, 4, 3] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-3, 0, -3], [3, 0, 3] ], + "with": {"id": "minecraft:obsidian"} + }, + { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:jukebox"} }, + { + "at": 2, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:jukebox", "has_record": false} }, + { "is": "minecraft:item" , "exists": false } + ] + }, + { + "at": 3, + "do": "summon", + "entity_alias": "tnt", + "entity_type": "minecraft:tnt", + "pos": [1.5, 1, 0.5], + "nbt": {"fuse": "1s"} + }, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} } , + {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:jukebox"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/jukebox/jukebox_hopper_extracts_idle_disc.json b/tests/redstone/jukebox/jukebox_hopper_extracts_idle_disc.json new file mode 100644 index 0000000..46dfff0 --- /dev/null +++ b/tests/redstone/jukebox/jukebox_hopper_extracts_idle_disc.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jukebox_hopper_extracts_idle_disc", + "description": "A hopper below a jukebox that holds a disc without playing it pulls the disc out: has_record becomes false and the hopper holds the disc.", + "tags": ["jukebox", "hopper", "music-disc", "container", "block-entity", "item-transfer"], + "minecraftIds": ["minecraft:jukebox", "minecraft:hopper", "minecraft:music_disc_cat", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "place", + "pos": [0, 2, 0], + "block": { + "id": "minecraft:jukebox", + "has_record": true, + "nbt": {"RecordItem": "{id: \"minecraft:music_disc_cat\", count: 1}"} + } + }, + { + "at": 2, + "do": "place", + "pos": [0, 1, 0], + "block": { "id": "minecraft:hopper", "facing": "down", "nbt": {"TransferCooldown": 0} } + }, + { + "at": 12, + "do": "assert", + "checks": [ + { "pos": [0, 2, 0], "is": {"id": "minecraft:jukebox", "has_record": false} }, + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:hopper", + "nbt": {"Items[0].id": "minecraft:music_disc_cat", "Items[0].count": 1} + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/jukebox/jukebox_hopper_inserts_disc.json b/tests/redstone/jukebox/jukebox_hopper_inserts_disc.json new file mode 100644 index 0000000..dbf1e10 --- /dev/null +++ b/tests/redstone/jukebox/jukebox_hopper_inserts_disc.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jukebox_hopper_inserts_disc", + "description": "A hopper above an empty jukebox inserts the music disc it holds: the jukebox gets has_record true and the disc in RecordItem, and the hopper is left empty.", + "tags": ["jukebox", "hopper", "music-disc", "container", "block-entity", "item-transfer"], + "minecraftIds": ["minecraft:jukebox", "minecraft:hopper", "minecraft:music_disc_cat", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:jukebox"} }, + { + "pos": [0, 2, 0], + "block": { + "id": "minecraft:hopper", + "facing": "down", + "nbt": { + "Items": "[{Slot: 0b, count: 1, id: \"minecraft:music_disc_cat\"}]", + "TransferCooldown": 0 + } + } + } + ] + }, + { + "at": 10, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:jukebox", + "has_record": true, + "nbt": {"RecordItem.id": "minecraft:music_disc_cat", "RecordItem.count": 1} + } + }, + { + "pos": [0, 2, 0], + "is": { "id": "minecraft:hopper", "nbt": {"Items": []} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/jukebox/jukebox_hopper_rejects_non_disc.json b/tests/redstone/jukebox/jukebox_hopper_rejects_non_disc.json new file mode 100644 index 0000000..aaf1922 --- /dev/null +++ b/tests/redstone/jukebox/jukebox_hopper_rejects_non_disc.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jukebox_hopper_rejects_non_disc", + "description": "A hopper above an empty jukebox cannot insert a non-playable item: the stone stays in the hopper and the jukebox stays empty.", + "tags": ["jukebox", "hopper", "container", "block-entity", "item-transfer"], + "minecraftIds": ["minecraft:jukebox", "minecraft:hopper", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:jukebox"} }, + { + "pos": [0, 2, 0], + "block": { + "id": "minecraft:hopper", + "facing": "down", + "nbt": {"Items": "[{Slot: 0b, count: 1, id: \"minecraft:stone\"}]", "TransferCooldown": 0} + } + } + ] + }, + { + "at": 10, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:jukebox", "has_record": false} }, + { + "pos": [0, 2, 0], + "is": { "id": "minecraft:hopper", "nbt": {"Items[0].id": "minecraft:stone", "Items[0].count": 1} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/jukebox/jukebox_insert_disc_creative.json b/tests/redstone/jukebox/jukebox_insert_disc_creative.json new file mode 100644 index 0000000..7695cdd --- /dev/null +++ b/tests/redstone/jukebox/jukebox_insert_disc_creative.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jukebox_insert_disc_creative", + "description": "A creative player using a cat music disc on an empty jukebox inserts a copy of it: has_record becomes true and RecordItem holds the disc, but the held disc is not consumed.", + "tags": ["jukebox", "music-disc", "block-entity", "creative", "player"], + "minecraftIds": ["minecraft:jukebox", "minecraft:music_disc_cat", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:music_disc_cat", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Creative" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:jukebox"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:jukebox", + "has_record": true, + "nbt": {"RecordItem.id": "minecraft:music_disc_cat", "RecordItem.count": 1} + } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:music_disc_cat", "count": 1} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/jukebox/jukebox_insert_disc_survival.json b/tests/redstone/jukebox/jukebox_insert_disc_survival.json new file mode 100644 index 0000000..e9765e9 --- /dev/null +++ b/tests/redstone/jukebox/jukebox_insert_disc_survival.json @@ -0,0 +1,76 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jukebox_insert_disc_survival", + "description": "A survival player using a cat music disc on an empty jukebox inserts it: has_record becomes true, RecordItem holds the disc, the held disc is consumed, the playing jukebox powers an adjacent lamp, and a comparator reads the disc's output of 2.", + "tags": ["jukebox", "music-disc", "block-entity", "comparator", "redstone", "player"], + "minecraftIds": [ + "minecraft:jukebox" , "minecraft:music_disc_cat", "minecraft:redstone_lamp" , "minecraft:comparator" , + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [1, 1, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:music_disc_cat", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:jukebox" } }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:redstone_lamp" } }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:comparator" , "facing": "west"} } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:jukebox", "has_record": false} }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} }, + { + "pos": [1, 1, 0], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 0} } + }, + { "slot": "hotbar1", "is": {"id": "minecraft:music_disc_cat", "count": 1} } + ] + }, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 9, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:jukebox", + "has_record": true, + "nbt": {"RecordItem.id": "minecraft:music_disc_cat", "RecordItem.count": 1} + } + }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": true} }, + { + "pos": [1, 1, 0], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 2} } + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/jukebox/jukebox_non_disc_item_ignored.json b/tests/redstone/jukebox/jukebox_non_disc_item_ignored.json new file mode 100644 index 0000000..d8a96d7 --- /dev/null +++ b/tests/redstone/jukebox/jukebox_non_disc_item_ignored.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jukebox_non_disc_item_ignored", + "description": "Using a diamond, which is not jukebox playable, on an empty jukebox changes nothing: has_record stays false, no record is stored and the diamond stays in hand.", + "tags": ["jukebox", "block-entity", "player"], + "minecraftIds": ["minecraft:jukebox", "minecraft:diamond", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:diamond", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [0, 1, 0], "block": {"id": "minecraft:jukebox"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + {"at": 2, "do": "interact"}, + { + "at": 5, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:jukebox", "has_record": false} }, + { "slot": "hotbar1", "is": {"id": "minecraft:diamond", "count": 1} } , + {"is": "minecraft:item", "exists": false} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/jukebox/jukebox_place_item_empty.json b/tests/redstone/jukebox/jukebox_place_item_empty.json new file mode 100644 index 0000000..7ae2118 --- /dev/null +++ b/tests/redstone/jukebox/jukebox_place_item_empty.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jukebox_place_item_empty", + "description": "A survival player placing a jukebox item on stone creates a jukebox with has_record false, silent and with no comparator output, and consumes the item.", + "tags": ["jukebox", "placement", "block-entity", "comparator", "player"], + "minecraftIds": ["minecraft:jukebox", "minecraft:stone", "minecraft:comparator"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [1, 1, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:jukebox", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [1, 0, 0] ], + "with": {"id": "minecraft:stone"} + }, + { "at": 1, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:comparator", "facing": "west"} }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} } + ] + }, + {"at": 4, "do": "interact"}, + { + "at": 9, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:jukebox", "has_record": false} }, + { + "pos": [1, 1, 0], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 0} } + }, + {"slot": "hotbar1", "is": "empty"} + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/jukebox/jukebox_playing_locks_hopper_below.json b/tests/redstone/jukebox/jukebox_playing_locks_hopper_below.json new file mode 100644 index 0000000..b7aaec6 --- /dev/null +++ b/tests/redstone/jukebox/jukebox_playing_locks_hopper_below.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jukebox_playing_locks_hopper_below", + "description": "A jukebox that starts playing a disc powers the hopper below it, which locks the hopper (enabled false) so it cannot pull the disc back out.", + "tags": ["jukebox", "hopper", "music-disc", "redstone", "signal", "container", "player"], + "minecraftIds": ["minecraft:jukebox", "minecraft:hopper", "minecraft:music_disc_cat", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [0, 0, 0], [0, 2, 0] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:music_disc_cat", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 2, 0], "block": {"id": "minecraft:jukebox"} }, + { + "pos": [0, 1, 0], + "block": { "id": "minecraft:hopper", "facing": "down", "nbt": {"TransferCooldown": 0} } + } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:hopper", "enabled": true} } + ] + }, + { "at": 4, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, + {"at": 5, "do": "interact"}, + { + "at": 16, + "do": "assert", + "checks": [ + { + "pos": [0, 2, 0], + "is": { + "id": "minecraft:jukebox", + "has_record": true, + "nbt": {"RecordItem.id": "minecraft:music_disc_cat"} + } + }, + { + "pos": [0, 1, 0], + "is": { "id": "minecraft:hopper", "enabled": false, "nbt": {"Items": []} } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/jukebox/jukebox_playing_weak_power_only.json b/tests/redstone/jukebox/jukebox_playing_weak_power_only.json new file mode 100644 index 0000000..00b2c27 --- /dev/null +++ b/tests/redstone/jukebox/jukebox_playing_weak_power_only.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jukebox_playing_weak_power_only", + "description": "A jukebox playing an inserted disc weakly powers an adjacent lamp, but does not strongly power a solid block next to it, so a lamp on the far side of that block stays off.", + "tags": ["jukebox", "music-disc", "redstone", "signal", "weak-power", "player"], + "minecraftIds": ["minecraft:jukebox", "minecraft:music_disc_cat", "minecraft:redstone_lamp", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-1, 0, -1], [2, 1, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:music_disc_cat", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-1, 0, -1], [2, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 1, 0], "block": {"id": "minecraft:jukebox" } }, + { "pos": [-1, 1, 0], "block": {"id": "minecraft:redstone_lamp"} }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [ 2, 1, 0], "block": {"id": "minecraft:redstone_lamp"} } + ] + }, + { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, + { + "at": 3, + "do": "assert", + "checks": [ + { "pos": [-1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} }, + { "pos": [ 2, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} } + ] + }, + {"at": 4, "do": "interact"}, + { + "at": 8, + "do": "assert", + "checks": [ + { "pos": [ 0, 1, 0], "is": {"id": "minecraft:jukebox" , "has_record": true } }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": true } }, + { "pos": [ 2, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/jukebox/jukebox_song_end_stops_power.json b/tests/redstone/jukebox/jukebox_song_end_stops_power.json new file mode 100644 index 0000000..c768905 --- /dev/null +++ b/tests/redstone/jukebox/jukebox_song_end_stops_power.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", + "flintVersion": "1.1", + "name": "jukebox_song_end_stops_power", + "description": "A jukebox near the end of disc 11 (71 seconds, ending at tick 1440) powers an adjacent lamp until the song finishes; afterwards the lamp turns off, while the disc stays inside, has_record stays true and the comparator still reads 11.", + "tags": ["jukebox", "music-disc", "redstone", "signal", "comparator", "block-entity"], + "minecraftIds": [ + "minecraft:jukebox" , "minecraft:music_disc_11", "minecraft:redstone_lamp", "minecraft:comparator" , + "minecraft:stone" + ], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, 0, -1], [1, 1, 1] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-2, 0, -1], [1, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [-1, 1, 0], "block": {"id": "minecraft:redstone_lamp" } }, + { "pos": [ 1, 1, 0], "block": {"id": "minecraft:comparator" , "facing": "west"} } + ] + }, + { + "at": 2, + "do": "place", + "pos": [0, 1, 0], + "block": { + "id": "minecraft:jukebox", + "has_record": true, + "nbt": { + "RecordItem" : "{id: \"minecraft:music_disc_11\", count: 1}", + "ticks_since_song_started": "1420L" + } + } + }, + { "at": 3, "do": "place", "pos": [-2, 1, 0], "block": {"id": "minecraft:stone"} }, + { + "at": 6, + "do": "assert", + "checks": [ + { "pos": [-1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": true} }, + { + "pos": [1, 1, 0], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 11} } + } + ] + }, + { + "at": 40, + "do": "assert", + "checks": [ + { + "pos": [0, 1, 0], + "is": { + "id": "minecraft:jukebox", + "has_record": true, + "nbt": {"RecordItem.id": "minecraft:music_disc_11"} + } + }, + { "pos": [-1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} }, + { + "pos": [1, 1, 0], + "is": { "id": "minecraft:comparator", "nbt": {"OutputSignal": 11} } + } + ] + } + ], + "breakpoints": [] +} + From 3effbf5e4a922f6e57229f5e64fa6e40b2b474fc Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Tue, 17 Nov 2026 14:46:49 +0100 Subject: [PATCH 82/85] delete --- tests/building/slabs/copper_slab_waxing.json | 58 -- ...sed_copper_bars_axe_blocked_by_shield.json | 85 -- .../bars/exposed_copper_bars_axe_scrapes.json | 78 -- ...osed_copper_bars_connect_to_iron_bars.json | 56 -- .../exposed_copper_bars_honeycomb_waxes.json | 78 -- .../exposed_copper_bars_oxidize_randomly.json | 74 -- ...xed_exposed_copper_bars_never_oxidize.json | 105 --- .../fences/crimson_fence_not_fuel.json | 47 -- .../fences/oak_fence_furnace_fuel.json | 43 -- .../stairs_corner_between_materials.json | 45 -- .../stairs/stairs_corner_neighbor_update.json | 52 -- .../stairs/stairs_corner_placement.json | 55 -- .../stairs/stairs_shape_vertical_update.json | 36 - .../ender_chest_survives_tnt_explosion.json | 52 -- .../furnace_cooking_progress_advances.json | 49 -- .../furnace_cooking_progress_cools_down.json | 55 -- ...different_result_item_blocks_smelting.json | 50 -- ...ace_explosion_drops_self_and_contents.json | 54 -- .../furnace/furnace_fuel_burns_out.json | 85 -- ...rnace_fuel_without_input_not_consumed.json | 43 -- ...nace_full_result_slot_blocks_smelting.json | 50 -- ...rnace_lava_bucket_leaves_empty_bucket.json | 50 -- .../furnace/furnace_smelts_raw_iron.json | 69 -- .../furnace_unsmeltable_input_not_cooked.json | 48 -- ...on_effect_applied_without_level_check.json | 37 - ...el_four_primary_and_secondary_effects.json | 64 -- ..._level_four_same_effect_amplifier_one.json | 64 -- .../beacon_level_one_speed_effect.json | 37 - .../beds/bed_placement_head_space.json | 56 -- tests/decoration/beds/bed_use_night.json | 42 - ...mpfire_shovel_from_below_does_nothing.json | 66 -- .../cauldrons/cauldron_bucket_fill.json | 80 -- .../cauldron_bucket_under_water.json | 76 -- .../cauldrons/cauldron_dripstone_fill.json | 79 -- .../cauldrons/lava_cauldron_interactions.json | 91 --- .../powder_snow_cauldron_dripstone.json | 88 --- .../powder_snow_cauldron_interactions.json | 91 --- .../cauldrons/water_cauldron_buckets.json | 91 --- .../cauldrons/water_cauldron_dripstone.json | 86 --- .../copper_chain_weathers_to_oxidized.json | 53 -- ...r_grate_axe_blocked_by_offhand_shield.json | 60 -- .../copper_grate_axe_does_nothing.json | 57 -- .../copper_grate_axe_removes_wax.json | 45 -- .../copper_grate_axe_scrapes_exposed.json | 45 -- .../copper_grate_axe_scrapes_oxidized.json | 45 -- ...opper_grate_does_not_conduct_redstone.json | 72 -- .../copper_grate_honeycomb_ignores_waxed.json | 45 -- .../copper_grate_honeycomb_waxes.json | 45 -- .../copper_grate_honeycomb_waxes_exposed.json | 45 -- .../copper_grate_oxidized_stays_oxidized.json | 77 -- .../copper_grate_oxidizes_over_time.json | 78 -- .../copper_grate_passes_skylight.json | 63 -- ...d_in_flowing_water_is_not_waterlogged.json | 64 -- ...placed_in_water_source_is_waterlogged.json | 56 -- ...te_pushed_by_piston_loses_waterlogged.json | 59 -- .../copper_grate_survival_placement.json | 38 - ...ate_waterlogged_water_stays_contained.json | 81 -- .../crafting_table_burns_as_furnace_fuel.json | 42 - ...ate_explosion_drops_cobbled_deepslate.json | 51 -- .../end_rod_base_click_not_reversed.json | 56 -- .../end_rod_explosion_drops_itself.json | 59 -- .../end_rods/end_rod_pushed_by_piston.json | 60 -- .../end_rod_side_click_not_reversed.json | 66 -- .../end_rod_washed_away_by_water.json | 70 -- ...tted_closed_eyeblossom_opens_at_night.json | 36 - ...ed_eyeblossom_stays_closed_in_daytime.json | 43 -- ...ted_open_eyeblossom_closes_in_daytime.json | 36 - ...d_open_eyeblossom_stays_open_at_night.json | 43 -- ...osted_ice_ages_and_melts_in_sky_light.json | 110 --- ...ed_ice_ignores_other_neighbor_changes.json | 89 --- ...osted_ice_max_age_melts_on_first_tick.json | 79 -- .../frosted_ice_melt_chain_reaction.json | 50 -- ...ts_when_frosted_ice_placed_next_to_it.json | 74 -- .../frosted_ice_stable_at_midnight.json | 81 -- .../frosted_ice_stable_in_darkness.json | 48 -- ...osted_ice_survives_with_two_neighbors.json | 67 -- .../grindstone_explosion_drops_item.json | 46 -- .../hay_block_explosion_drops_itself.json | 47 -- .../heavy_core_survives_tnt_explosion.json | 48 -- .../tnt_explosion_drops_honey_block.json | 42 - .../hyphae/crimson_hyphae_not_fuel.json | 68 -- .../ice/ice_block_light_threshold.json | 51 -- .../decoration/ice/ice_ignores_sky_light.json | 70 -- .../decoration/ice/ice_melt_water_flows.json | 58 -- .../ice/ice_melts_in_block_light.json | 43 -- ...ck_o_lantern_tnt_explosion_drops_item.json | 55 -- ...ntern_aging_blocked_by_younger_copper.json | 70 -- .../exposed_copper_lantern_axe_scrapes.json | 53 -- ...xposed_copper_lantern_honeycomb_waxes.json | 60 -- .../exposed_copper_lantern_oxidizes.json | 64 -- .../waxed_copper_lantern_axe_removes_wax.json | 53 -- ...waxed_copper_lantern_does_not_oxidize.json | 68 -- ...axed_copper_lantern_rejects_honeycomb.json | 56 -- .../signs/lava_ignites_hanging_signs.json | 94 --- .../signs/lava_ignites_standing_signs.json | 84 -- .../lava_ignites_wall_hanging_signs.json | 92 --- .../signs/lava_ignites_wall_signs.json | 89 --- .../oak_sign_ink_wax_and_click_commands.json | 148 ---- .../stairs/copper_stairs_weathering.json | 67 -- .../stairs/oak_stairs_furnace_fuel.json | 65 -- .../wolf/wolf_collar_dye_baby_wolf.json | 36 - .../wolf/wolf_collar_dye_changes_color.json | 40 - .../wolf_collar_dye_creative_keeps_item.json | 38 - .../wolf/wolf_collar_dye_same_color_noop.json | 39 - .../wolf_collar_dye_stack_consumes_one.json | 40 - ...agon_egg_explosion_destroys_and_drops.json | 48 -- .../gravel_explosion_drops_one_item.json | 41 - .../axe_breaks_after_durability_uses.json | 104 --- tests/items/axes/wooden_axe_furnace_fuel.json | 43 -- ...ush_completion_drops_item_on_hit_face.json | 58 -- ...ush_completion_drops_item_on_top_face.json | 56 -- .../brush_creative_completes_brushing.json | 47 -- .../brush_dusting_resets_after_release.json | 55 -- .../brush_looking_at_air_does_nothing.json | 56 -- .../brush_on_ordinary_block_does_nothing.json | 59 -- .../brush/brush_progressive_dusting.json | 68 -- ..._fills_from_full_powder_snow_cauldron.json | 56 -- ...bucket_fills_from_full_water_cauldron.json | 53 -- .../bucket_fills_from_lava_cauldron.json | 53 -- ...earl_second_throw_blocked_by_cooldown.json | 47 -- ...nder_pearl_throw_again_after_cooldown.json | 37 - ...nder_pearl_throw_creative_keeps_stack.json | 38 - .../ender_pearl_throw_from_partial_stack.json | 31 - .../fishing_rod_cast_keeps_rod.json | 32 - .../hoe/hoe_blocked_by_solid_block_above.json | 82 -- .../items/hoe/hoe_breaks_after_32_tills.json | 124 --- tests/items/hoe/hoe_ignores_bottom_face.json | 56 -- .../hoe/hoe_ignores_non_tillable_blocks.json | 52 -- .../hoe_rooted_dirt_drops_hanging_roots.json | 41 - ...oe_rooted_dirt_ignores_face_and_cover.json | 60 -- tests/items/hoe/hoe_tills_dirt.json | 41 - tests/items/hoe/hoe_tills_dirt_path.json | 41 - tests/items/hoe/hoe_tills_grass_block.json | 41 - .../hoe/hoe_turns_coarse_dirt_into_dirt.json | 41 - .../shovel_breaks_after_32_flattens.json | 111 --- ...shovel_failed_uses_cost_no_durability.json | 117 --- .../end_portal_survives_explosion.json | 74 -- .../copper_bulb_axe_no_effect.json | 45 -- .../copper_bulb_honeycomb_waxes.json | 55 -- .../copper_bulb_oxidizes_over_time.json | 58 -- .../copper_bulb/exposed_bulb_axe_scrapes.json | 54 -- .../exposed_bulb_oxidizes_over_time.json | 56 -- .../oxidized_bulb_does_not_change.json | 51 -- .../waxed_bulb_does_not_oxidize.json | 51 -- .../jukebox_explosion_drops_itself.json | 49 -- .../exposed_lightning_rod_axe_scrapes.json | 76 -- ...exposed_lightning_rod_honeycomb_waxes.json | 90 --- ...sed_lightning_rod_struck_by_lightning.json | 82 -- ...ed_lightning_rod_explosion_drops_self.json | 59 -- .../exposed_lightning_rod_weathering.json | 91 --- .../waxed_lightning_rod_no_weathering.json | 52 -- .../crimson_pressure_plate_activation.json | 63 -- ..._weighted_pressure_plate_power_levels.json | 727 ------------------ .../oak_pressure_plate_stays_pressed.json | 64 -- .../bamboo/bamboo_stacking_on_stalk.json | 58 -- .../big_dripleaf_place_on_supports.json | 81 -- ...ries_without_water_but_not_with_water.json | 55 -- .../farmland_drops_dirt_when_destroyed.json | 64 -- .../farmland/farmland_hoe_tilling.json | 73 -- .../farmland_ignores_water_out_of_range.json | 56 -- .../farmland/farmland_item_placement.json | 64 -- .../farmland_stays_dry_under_fence_gate.json | 56 -- ...rmland_survives_under_non_solid_block.json | 58 -- ...mland_turns_to_dirt_under_solid_block.json | 69 -- ...dirt_when_piston_pushes_block_onto_it.json | 72 -- .../farmland_wets_from_nearby_water.json | 56 -- ...armland_wets_in_rain_when_open_to_sky.json | 56 -- .../fern/fern_explosion_drops_no_fern.json | 49 -- ...efly_bush_bonemeal_no_valid_neighbour.json | 75 -- ...efly_bush_composts_in_empty_composter.json | 58 -- .../firefly_bush_destroyed_by_piston.json | 72 -- ..._bush_not_replaced_by_block_placement.json | 60 -- ...placement_rejected_on_invalid_support.json | 56 -- .../firefly_bush_support_loss.json | 70 -- .../firefly_bush_survives_on_supports.json | 96 --- .../firefly_bush_washed_away_by_water.json | 63 -- ...glow_lichen_bonemeal_no_spread_target.json | 69 -- ..._lichen_bonemeal_spreads_to_neighbour.json | 81 -- .../glow_lichen_bonemeal_spreads_to_wall.json | 68 -- .../glow_lichen_destroyed_by_piston.json | 61 -- ...glow_lichen_face_removed_with_support.json | 79 -- ...ichen_placement_adds_face_to_existing.json | 65 -- .../glow_lichen_placement_on_ceiling.json | 65 -- ...en_placement_rejected_on_partial_face.json | 49 -- .../glow_lichen_placement_waterlogged.json | 54 -- ...ow_lichen_replaced_by_block_placement.json | 54 -- .../glow_lichen_support_loss_to_slab.json | 57 -- .../glow_lichen_waterlogged_support_loss.json | 60 -- ...ss_block_bone_meal_grows_plants_above.json | 79 -- ...block_bone_meal_ignores_covered_grass.json | 45 -- ...ass_block_does_not_spread_in_darkness.json | 67 -- ...ss_block_does_not_spread_out_of_range.json | 69 -- ...ck_does_not_spread_to_blocked_targets.json | 80 -- .../grass_block_explosion_drops_dirt.json | 58 -- .../grass_block_hoe_ignores_bottom_face.json | 43 -- ...s_block_hoe_ignores_covered_side_face.json | 45 -- .../grass_block/grass_block_hoe_top_face.json | 43 -- ...block_item_placed_under_snow_is_snowy.json | 45 -- ...rass_block_shovel_ignores_bottom_face.json | 43 -- ...lock_shovel_ignores_covered_side_face.json | 45 -- .../grass_block_shovel_top_face.json | 43 -- ...grass_block_snowy_follows_block_above.json | 83 -- .../grass_block_spreads_to_dirt_in_range.json | 74 -- ...ck_survives_under_light_passing_block.json | 61 -- ...ck_turns_to_dirt_under_covering_block.json | 61 -- ..._block_unchanged_without_random_ticks.json | 61 -- ...g_roots_breaks_under_non_sturdy_block.json | 46 -- .../hanging_roots_destroyed_by_explosion.json | 63 -- .../hanging_roots_destroyed_by_piston.json | 66 -- ...roots_flowing_water_does_not_waterlog.json | 55 -- .../hanging_roots_lava_does_not_destroy.json | 55 -- ...ing_roots_placement_rejected_on_floor.json | 54 -- .../hanging_roots_placement_slab_support.json | 72 -- .../hanging_roots_placement_under_block.json | 53 -- .../hanging_roots_placement_waterlogged.json | 54 -- .../hanging_roots_replaced_by_block.json | 61 -- .../hanging_roots_support_loss.json | 53 -- ...nging_roots_waterlogged_spreads_water.json | 49 -- ...anging_roots_waterlogged_support_loss.json | 55 -- .../copper_ore_blast_furnace_smelting.json | 75 -- .../copper_ore_furnace_smelting.json | 75 -- .../crimson_stem/crimson_stem_not_fuel.json | 47 -- .../crimson_stem_not_smelted_to_charcoal.json | 48 -- ...mond_ore_stable_with_neighbor_updates.json | 53 -- ...amond_ore_tnt_explosion_drops_diamond.json | 62 -- .../dirt_path_carpet_above_keeps_path.json | 42 - ...path_dirt_stays_after_support_removed.json | 50 -- .../dirt_path_explosion_drops_dirt.json | 56 -- ...dirt_path_fence_gate_above_keeps_path.json | 42 - .../dirt_path_hoe_blocked_by_carpet.json | 49 -- .../dirt_path_hoe_tills_to_farmland.json | 47 -- ...rt_path_ignores_side_neighbor_changes.json | 46 -- ...irt_path_item_under_solid_places_dirt.json | 48 -- .../dirt_path_solid_above_turns_to_dirt.json | 49 -- .../emerald_ore_tnt_drops_emerald.json | 54 -- .../emerald_ore_tnt_drops_no_experience.json | 43 -- .../gold_ore_explosion_drops_raw_gold.json | 42 - ..._gold_ore_explosion_drops_gold_nugget.json | 41 - .../iron_ore/iron_ore_tnt_drops_raw_iron.json | 54 -- ...apis_ore_explosion_drops_lapis_lazuli.json | 41 - ...pis_ore_explosion_drops_no_experience.json | 41 - 241 files changed, 15088 deletions(-) delete mode 100644 tests/building/slabs/copper_slab_waxing.json delete mode 100644 tests/connectible/bars/exposed_copper_bars_axe_blocked_by_shield.json delete mode 100644 tests/connectible/bars/exposed_copper_bars_axe_scrapes.json delete mode 100644 tests/connectible/bars/exposed_copper_bars_connect_to_iron_bars.json delete mode 100644 tests/connectible/bars/exposed_copper_bars_honeycomb_waxes.json delete mode 100644 tests/connectible/bars/exposed_copper_bars_oxidize_randomly.json delete mode 100644 tests/connectible/bars/waxed_exposed_copper_bars_never_oxidize.json delete mode 100644 tests/connectible/fences/crimson_fence_not_fuel.json delete mode 100644 tests/connectible/fences/oak_fence_furnace_fuel.json delete mode 100644 tests/connectible/stairs/stairs_corner_between_materials.json delete mode 100644 tests/connectible/stairs/stairs_corner_neighbor_update.json delete mode 100644 tests/connectible/stairs/stairs_corner_placement.json delete mode 100644 tests/connectible/stairs/stairs_shape_vertical_update.json delete mode 100644 tests/container/ender_chests/ender_chest_survives_tnt_explosion.json delete mode 100644 tests/container/furnace/furnace_cooking_progress_advances.json delete mode 100644 tests/container/furnace/furnace_cooking_progress_cools_down.json delete mode 100644 tests/container/furnace/furnace_different_result_item_blocks_smelting.json delete mode 100644 tests/container/furnace/furnace_explosion_drops_self_and_contents.json delete mode 100644 tests/container/furnace/furnace_fuel_burns_out.json delete mode 100644 tests/container/furnace/furnace_fuel_without_input_not_consumed.json delete mode 100644 tests/container/furnace/furnace_full_result_slot_blocks_smelting.json delete mode 100644 tests/container/furnace/furnace_lava_bucket_leaves_empty_bucket.json delete mode 100644 tests/container/furnace/furnace_smelts_raw_iron.json delete mode 100644 tests/container/furnace/furnace_unsmeltable_input_not_cooked.json delete mode 100644 tests/decoration/beacons/beacon_effect_applied_without_level_check.json delete mode 100644 tests/decoration/beacons/beacon_level_four_primary_and_secondary_effects.json delete mode 100644 tests/decoration/beacons/beacon_level_four_same_effect_amplifier_one.json delete mode 100644 tests/decoration/beacons/beacon_level_one_speed_effect.json delete mode 100644 tests/decoration/beds/bed_placement_head_space.json delete mode 100644 tests/decoration/beds/bed_use_night.json delete mode 100644 tests/decoration/campfires/campfire_shovel_from_below_does_nothing.json delete mode 100644 tests/decoration/cauldrons/cauldron_bucket_fill.json delete mode 100644 tests/decoration/cauldrons/cauldron_bucket_under_water.json delete mode 100644 tests/decoration/cauldrons/cauldron_dripstone_fill.json delete mode 100644 tests/decoration/cauldrons/lava_cauldron_interactions.json delete mode 100644 tests/decoration/cauldrons/powder_snow_cauldron_dripstone.json delete mode 100644 tests/decoration/cauldrons/powder_snow_cauldron_interactions.json delete mode 100644 tests/decoration/cauldrons/water_cauldron_buckets.json delete mode 100644 tests/decoration/cauldrons/water_cauldron_dripstone.json delete mode 100644 tests/decoration/chains/copper_chain_weathers_to_oxidized.json delete mode 100644 tests/decoration/copper_grates/copper_grate_axe_blocked_by_offhand_shield.json delete mode 100644 tests/decoration/copper_grates/copper_grate_axe_does_nothing.json delete mode 100644 tests/decoration/copper_grates/copper_grate_axe_removes_wax.json delete mode 100644 tests/decoration/copper_grates/copper_grate_axe_scrapes_exposed.json delete mode 100644 tests/decoration/copper_grates/copper_grate_axe_scrapes_oxidized.json delete mode 100644 tests/decoration/copper_grates/copper_grate_does_not_conduct_redstone.json delete mode 100644 tests/decoration/copper_grates/copper_grate_honeycomb_ignores_waxed.json delete mode 100644 tests/decoration/copper_grates/copper_grate_honeycomb_waxes.json delete mode 100644 tests/decoration/copper_grates/copper_grate_honeycomb_waxes_exposed.json delete mode 100644 tests/decoration/copper_grates/copper_grate_oxidized_stays_oxidized.json delete mode 100644 tests/decoration/copper_grates/copper_grate_oxidizes_over_time.json delete mode 100644 tests/decoration/copper_grates/copper_grate_passes_skylight.json delete mode 100644 tests/decoration/copper_grates/copper_grate_placed_in_flowing_water_is_not_waterlogged.json delete mode 100644 tests/decoration/copper_grates/copper_grate_placed_in_water_source_is_waterlogged.json delete mode 100644 tests/decoration/copper_grates/copper_grate_pushed_by_piston_loses_waterlogged.json delete mode 100644 tests/decoration/copper_grates/copper_grate_survival_placement.json delete mode 100644 tests/decoration/copper_grates/copper_grate_waterlogged_water_stays_contained.json delete mode 100644 tests/decoration/crafting_table/crafting_table_burns_as_furnace_fuel.json delete mode 100644 tests/decoration/deepslate/deepslate_explosion_drops_cobbled_deepslate.json delete mode 100644 tests/decoration/end_rods/end_rod_base_click_not_reversed.json delete mode 100644 tests/decoration/end_rods/end_rod_explosion_drops_itself.json delete mode 100644 tests/decoration/end_rods/end_rod_pushed_by_piston.json delete mode 100644 tests/decoration/end_rods/end_rod_side_click_not_reversed.json delete mode 100644 tests/decoration/end_rods/end_rod_washed_away_by_water.json delete mode 100644 tests/decoration/flower_pots/potted_closed_eyeblossom_opens_at_night.json delete mode 100644 tests/decoration/flower_pots/potted_closed_eyeblossom_stays_closed_in_daytime.json delete mode 100644 tests/decoration/flower_pots/potted_open_eyeblossom_closes_in_daytime.json delete mode 100644 tests/decoration/flower_pots/potted_open_eyeblossom_stays_open_at_night.json delete mode 100644 tests/decoration/frosted_ice/frosted_ice_ages_and_melts_in_sky_light.json delete mode 100644 tests/decoration/frosted_ice/frosted_ice_ignores_other_neighbor_changes.json delete mode 100644 tests/decoration/frosted_ice/frosted_ice_max_age_melts_on_first_tick.json delete mode 100644 tests/decoration/frosted_ice/frosted_ice_melt_chain_reaction.json delete mode 100644 tests/decoration/frosted_ice/frosted_ice_melts_when_frosted_ice_placed_next_to_it.json delete mode 100644 tests/decoration/frosted_ice/frosted_ice_stable_at_midnight.json delete mode 100644 tests/decoration/frosted_ice/frosted_ice_stable_in_darkness.json delete mode 100644 tests/decoration/frosted_ice/frosted_ice_survives_with_two_neighbors.json delete mode 100644 tests/decoration/grindstone/grindstone_explosion_drops_item.json delete mode 100644 tests/decoration/hay_block/hay_block_explosion_drops_itself.json delete mode 100644 tests/decoration/heavy_core/heavy_core_survives_tnt_explosion.json delete mode 100644 tests/decoration/honey_block/tnt_explosion_drops_honey_block.json delete mode 100644 tests/decoration/hyphae/crimson_hyphae_not_fuel.json delete mode 100644 tests/decoration/ice/ice_block_light_threshold.json delete mode 100644 tests/decoration/ice/ice_ignores_sky_light.json delete mode 100644 tests/decoration/ice/ice_melt_water_flows.json delete mode 100644 tests/decoration/ice/ice_melts_in_block_light.json delete mode 100644 tests/decoration/jack_o_lantern/jack_o_lantern_tnt_explosion_drops_item.json delete mode 100644 tests/decoration/lanterns/exposed_copper_lantern_aging_blocked_by_younger_copper.json delete mode 100644 tests/decoration/lanterns/exposed_copper_lantern_axe_scrapes.json delete mode 100644 tests/decoration/lanterns/exposed_copper_lantern_honeycomb_waxes.json delete mode 100644 tests/decoration/lanterns/exposed_copper_lantern_oxidizes.json delete mode 100644 tests/decoration/lanterns/waxed_copper_lantern_axe_removes_wax.json delete mode 100644 tests/decoration/lanterns/waxed_copper_lantern_does_not_oxidize.json delete mode 100644 tests/decoration/lanterns/waxed_copper_lantern_rejects_honeycomb.json delete mode 100644 tests/decoration/signs/lava_ignites_hanging_signs.json delete mode 100644 tests/decoration/signs/lava_ignites_standing_signs.json delete mode 100644 tests/decoration/signs/lava_ignites_wall_hanging_signs.json delete mode 100644 tests/decoration/signs/lava_ignites_wall_signs.json delete mode 100644 tests/decoration/signs/oak_sign_ink_wax_and_click_commands.json delete mode 100644 tests/decoration/stairs/copper_stairs_weathering.json delete mode 100644 tests/decoration/stairs/oak_stairs_furnace_fuel.json delete mode 100644 tests/entities/wolf/wolf_collar_dye_baby_wolf.json delete mode 100644 tests/entities/wolf/wolf_collar_dye_changes_color.json delete mode 100644 tests/entities/wolf/wolf_collar_dye_creative_keeps_item.json delete mode 100644 tests/entities/wolf/wolf_collar_dye_same_color_noop.json delete mode 100644 tests/entities/wolf/wolf_collar_dye_stack_consumes_one.json delete mode 100644 tests/gravity/dragon_egg/dragon_egg_explosion_destroys_and_drops.json delete mode 100644 tests/gravity/gravel/gravel_explosion_drops_one_item.json delete mode 100644 tests/items/axes/axe_breaks_after_durability_uses.json delete mode 100644 tests/items/axes/wooden_axe_furnace_fuel.json delete mode 100644 tests/items/brush/brush_completion_drops_item_on_hit_face.json delete mode 100644 tests/items/brush/brush_completion_drops_item_on_top_face.json delete mode 100644 tests/items/brush/brush_creative_completes_brushing.json delete mode 100644 tests/items/brush/brush_dusting_resets_after_release.json delete mode 100644 tests/items/brush/brush_looking_at_air_does_nothing.json delete mode 100644 tests/items/brush/brush_on_ordinary_block_does_nothing.json delete mode 100644 tests/items/brush/brush_progressive_dusting.json delete mode 100644 tests/items/bucket/bucket_fills_from_full_powder_snow_cauldron.json delete mode 100644 tests/items/bucket/bucket_fills_from_full_water_cauldron.json delete mode 100644 tests/items/bucket/bucket_fills_from_lava_cauldron.json delete mode 100644 tests/items/ender_pearl/ender_pearl_second_throw_blocked_by_cooldown.json delete mode 100644 tests/items/ender_pearl/ender_pearl_throw_again_after_cooldown.json delete mode 100644 tests/items/ender_pearl/ender_pearl_throw_creative_keeps_stack.json delete mode 100644 tests/items/ender_pearl/ender_pearl_throw_from_partial_stack.json delete mode 100644 tests/items/fishing_rod/fishing_rod_cast_keeps_rod.json delete mode 100644 tests/items/hoe/hoe_blocked_by_solid_block_above.json delete mode 100644 tests/items/hoe/hoe_breaks_after_32_tills.json delete mode 100644 tests/items/hoe/hoe_ignores_bottom_face.json delete mode 100644 tests/items/hoe/hoe_ignores_non_tillable_blocks.json delete mode 100644 tests/items/hoe/hoe_rooted_dirt_drops_hanging_roots.json delete mode 100644 tests/items/hoe/hoe_rooted_dirt_ignores_face_and_cover.json delete mode 100644 tests/items/hoe/hoe_tills_dirt.json delete mode 100644 tests/items/hoe/hoe_tills_dirt_path.json delete mode 100644 tests/items/hoe/hoe_tills_grass_block.json delete mode 100644 tests/items/hoe/hoe_turns_coarse_dirt_into_dirt.json delete mode 100644 tests/items/shovel/shovel_breaks_after_32_flattens.json delete mode 100644 tests/items/shovel/shovel_failed_uses_cost_no_durability.json delete mode 100644 tests/portal/end_portal/end_portal_survives_explosion.json delete mode 100644 tests/redstone/copper_bulb/copper_bulb_axe_no_effect.json delete mode 100644 tests/redstone/copper_bulb/copper_bulb_honeycomb_waxes.json delete mode 100644 tests/redstone/copper_bulb/copper_bulb_oxidizes_over_time.json delete mode 100644 tests/redstone/copper_bulb/exposed_bulb_axe_scrapes.json delete mode 100644 tests/redstone/copper_bulb/exposed_bulb_oxidizes_over_time.json delete mode 100644 tests/redstone/copper_bulb/oxidized_bulb_does_not_change.json delete mode 100644 tests/redstone/copper_bulb/waxed_bulb_does_not_oxidize.json delete mode 100644 tests/redstone/jukebox/jukebox_explosion_drops_itself.json delete mode 100644 tests/redstone/lightning_rods/exposed_lightning_rod_axe_scrapes.json delete mode 100644 tests/redstone/lightning_rods/exposed_lightning_rod_honeycomb_waxes.json delete mode 100644 tests/redstone/lightning_rods/exposed_lightning_rod_struck_by_lightning.json delete mode 100644 tests/redstone/lightning_rods/waxed_lightning_rod_explosion_drops_self.json delete mode 100644 tests/redstone/lightning_rods_gamerule/exposed_lightning_rod_weathering.json delete mode 100644 tests/redstone/lightning_rods_gamerule/waxed_lightning_rod_no_weathering.json delete mode 100644 tests/redstone/pressure_plate/crimson_pressure_plate_activation.json delete mode 100644 tests/redstone/pressure_plate/heavy_weighted_pressure_plate_power_levels.json delete mode 100644 tests/redstone/pressure_plate/oak_pressure_plate_stays_pressed.json delete mode 100644 tests/vegetation/bamboo/bamboo_stacking_on_stalk.json delete mode 100644 tests/vegetation/big_dripleaf/big_dripleaf_place_on_supports.json delete mode 100644 tests/vegetation/farmland/farmland_dries_without_water_but_not_with_water.json delete mode 100644 tests/vegetation/farmland/farmland_drops_dirt_when_destroyed.json delete mode 100644 tests/vegetation/farmland/farmland_hoe_tilling.json delete mode 100644 tests/vegetation/farmland/farmland_ignores_water_out_of_range.json delete mode 100644 tests/vegetation/farmland/farmland_item_placement.json delete mode 100644 tests/vegetation/farmland/farmland_stays_dry_under_fence_gate.json delete mode 100644 tests/vegetation/farmland/farmland_survives_under_non_solid_block.json delete mode 100644 tests/vegetation/farmland/farmland_turns_to_dirt_under_solid_block.json delete mode 100644 tests/vegetation/farmland/farmland_turns_to_dirt_when_piston_pushes_block_onto_it.json delete mode 100644 tests/vegetation/farmland/farmland_wets_from_nearby_water.json delete mode 100644 tests/vegetation/farmland/farmland_wets_in_rain_when_open_to_sky.json delete mode 100644 tests/vegetation/fern/fern_explosion_drops_no_fern.json delete mode 100644 tests/vegetation/firefly_bush/firefly_bush_bonemeal_no_valid_neighbour.json delete mode 100644 tests/vegetation/firefly_bush/firefly_bush_composts_in_empty_composter.json delete mode 100644 tests/vegetation/firefly_bush/firefly_bush_destroyed_by_piston.json delete mode 100644 tests/vegetation/firefly_bush/firefly_bush_not_replaced_by_block_placement.json delete mode 100644 tests/vegetation/firefly_bush/firefly_bush_placement_rejected_on_invalid_support.json delete mode 100644 tests/vegetation/firefly_bush/firefly_bush_support_loss.json delete mode 100644 tests/vegetation/firefly_bush/firefly_bush_survives_on_supports.json delete mode 100644 tests/vegetation/firefly_bush/firefly_bush_washed_away_by_water.json delete mode 100644 tests/vegetation/glow_lichen/glow_lichen_bonemeal_no_spread_target.json delete mode 100644 tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_neighbour.json delete mode 100644 tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_wall.json delete mode 100644 tests/vegetation/glow_lichen/glow_lichen_destroyed_by_piston.json delete mode 100644 tests/vegetation/glow_lichen/glow_lichen_face_removed_with_support.json delete mode 100644 tests/vegetation/glow_lichen/glow_lichen_placement_adds_face_to_existing.json delete mode 100644 tests/vegetation/glow_lichen/glow_lichen_placement_on_ceiling.json delete mode 100644 tests/vegetation/glow_lichen/glow_lichen_placement_rejected_on_partial_face.json delete mode 100644 tests/vegetation/glow_lichen/glow_lichen_placement_waterlogged.json delete mode 100644 tests/vegetation/glow_lichen/glow_lichen_replaced_by_block_placement.json delete mode 100644 tests/vegetation/glow_lichen/glow_lichen_support_loss_to_slab.json delete mode 100644 tests/vegetation/glow_lichen/glow_lichen_waterlogged_support_loss.json delete mode 100644 tests/vegetation/grass_block/grass_block_bone_meal_grows_plants_above.json delete mode 100644 tests/vegetation/grass_block/grass_block_bone_meal_ignores_covered_grass.json delete mode 100644 tests/vegetation/grass_block/grass_block_does_not_spread_in_darkness.json delete mode 100644 tests/vegetation/grass_block/grass_block_does_not_spread_out_of_range.json delete mode 100644 tests/vegetation/grass_block/grass_block_does_not_spread_to_blocked_targets.json delete mode 100644 tests/vegetation/grass_block/grass_block_explosion_drops_dirt.json delete mode 100644 tests/vegetation/grass_block/grass_block_hoe_ignores_bottom_face.json delete mode 100644 tests/vegetation/grass_block/grass_block_hoe_ignores_covered_side_face.json delete mode 100644 tests/vegetation/grass_block/grass_block_hoe_top_face.json delete mode 100644 tests/vegetation/grass_block/grass_block_item_placed_under_snow_is_snowy.json delete mode 100644 tests/vegetation/grass_block/grass_block_shovel_ignores_bottom_face.json delete mode 100644 tests/vegetation/grass_block/grass_block_shovel_ignores_covered_side_face.json delete mode 100644 tests/vegetation/grass_block/grass_block_shovel_top_face.json delete mode 100644 tests/vegetation/grass_block/grass_block_snowy_follows_block_above.json delete mode 100644 tests/vegetation/grass_block/grass_block_spreads_to_dirt_in_range.json delete mode 100644 tests/vegetation/grass_block/grass_block_survives_under_light_passing_block.json delete mode 100644 tests/vegetation/grass_block/grass_block_turns_to_dirt_under_covering_block.json delete mode 100644 tests/vegetation/grass_block/grass_block_unchanged_without_random_ticks.json delete mode 100644 tests/vegetation/hanging_roots/hanging_roots_breaks_under_non_sturdy_block.json delete mode 100644 tests/vegetation/hanging_roots/hanging_roots_destroyed_by_explosion.json delete mode 100644 tests/vegetation/hanging_roots/hanging_roots_destroyed_by_piston.json delete mode 100644 tests/vegetation/hanging_roots/hanging_roots_flowing_water_does_not_waterlog.json delete mode 100644 tests/vegetation/hanging_roots/hanging_roots_lava_does_not_destroy.json delete mode 100644 tests/vegetation/hanging_roots/hanging_roots_placement_rejected_on_floor.json delete mode 100644 tests/vegetation/hanging_roots/hanging_roots_placement_slab_support.json delete mode 100644 tests/vegetation/hanging_roots/hanging_roots_placement_under_block.json delete mode 100644 tests/vegetation/hanging_roots/hanging_roots_placement_waterlogged.json delete mode 100644 tests/vegetation/hanging_roots/hanging_roots_replaced_by_block.json delete mode 100644 tests/vegetation/hanging_roots/hanging_roots_support_loss.json delete mode 100644 tests/vegetation/hanging_roots/hanging_roots_waterlogged_spreads_water.json delete mode 100644 tests/vegetation/hanging_roots/hanging_roots_waterlogged_support_loss.json delete mode 100644 tests/world/copper_ore/copper_ore_blast_furnace_smelting.json delete mode 100644 tests/world/copper_ore/copper_ore_furnace_smelting.json delete mode 100644 tests/world/crimson_stem/crimson_stem_not_fuel.json delete mode 100644 tests/world/crimson_stem/crimson_stem_not_smelted_to_charcoal.json delete mode 100644 tests/world/diamond_ore/diamond_ore_stable_with_neighbor_updates.json delete mode 100644 tests/world/diamond_ore/diamond_ore_tnt_explosion_drops_diamond.json delete mode 100644 tests/world/dirt_path/dirt_path_carpet_above_keeps_path.json delete mode 100644 tests/world/dirt_path/dirt_path_dirt_stays_after_support_removed.json delete mode 100644 tests/world/dirt_path/dirt_path_explosion_drops_dirt.json delete mode 100644 tests/world/dirt_path/dirt_path_fence_gate_above_keeps_path.json delete mode 100644 tests/world/dirt_path/dirt_path_hoe_blocked_by_carpet.json delete mode 100644 tests/world/dirt_path/dirt_path_hoe_tills_to_farmland.json delete mode 100644 tests/world/dirt_path/dirt_path_ignores_side_neighbor_changes.json delete mode 100644 tests/world/dirt_path/dirt_path_item_under_solid_places_dirt.json delete mode 100644 tests/world/dirt_path/dirt_path_solid_above_turns_to_dirt.json delete mode 100644 tests/world/emerald_ore/emerald_ore_tnt_drops_emerald.json delete mode 100644 tests/world/emerald_ore/emerald_ore_tnt_drops_no_experience.json delete mode 100644 tests/world/gold_ores/gold_ore_explosion_drops_raw_gold.json delete mode 100644 tests/world/gold_ores/nether_gold_ore_explosion_drops_gold_nugget.json delete mode 100644 tests/world/iron_ore/iron_ore_tnt_drops_raw_iron.json delete mode 100644 tests/world/lapis_ores/lapis_ore_explosion_drops_lapis_lazuli.json delete mode 100644 tests/world/lapis_ores/lapis_ore_explosion_drops_no_experience.json diff --git a/tests/building/slabs/copper_slab_waxing.json b/tests/building/slabs/copper_slab_waxing.json deleted file mode 100644 index 185242d..0000000 --- a/tests/building/slabs/copper_slab_waxing.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "copper_slab_waxing", - "description": "Honeycomb waxes an exposed cut copper slab into the waxed exposed variant keeping its type and waterlogging, and does nothing to an already waxed slab.", - "tags": ["building", "slab", "copper", "wax", "honeycomb", "player"], - "minecraftIds": [ - "minecraft:exposed_cut_copper_slab" , - "minecraft:waxed_exposed_cut_copper_slab", - "minecraft:honeycomb" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [10, 3, 2] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 4} }, - "selected_hotbar": 1, - "game_mode": "Creative" - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { - "pos": [0, 1, 0], - "block": {"id": "minecraft:exposed_cut_copper_slab", "type": "top", "waterlogged": true} - }, - { "pos": [3, 1, 0], "block": {"id": "minecraft:exposed_cut_copper_slab", "type": "double"} }, - { "pos": [6, 1, 0], "block": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "bottom"} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 3, 0.5], "rot": [0, 90] }, - {"at": 2, "do": "interact"}, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [6.5, 3, 0.5], "rot": [0, 90] }, - {"at": 3, "do": "interact"}, - { - "at": 4, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "top", "waterlogged": true} - }, - { "pos": [3, 1, 0], "is": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "double"} }, - { "pos": [6, 1, 0], "is": {"id": "minecraft:waxed_exposed_cut_copper_slab", "type": "bottom"} }, - { "is": {"id": "minecraft:honeycomb", "count": 2}, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/connectible/bars/exposed_copper_bars_axe_blocked_by_shield.json b/tests/connectible/bars/exposed_copper_bars_axe_blocked_by_shield.json deleted file mode 100644 index 83d32c6..0000000 --- a/tests/connectible/bars/exposed_copper_bars_axe_blocked_by_shield.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "exposed_copper_bars_axe_blocked_by_shield", - "description": "With a shield in the off hand an axe use is passed and exposed copper bars are not scraped; once the shield is removed the same axe use scrapes them. Random ticks are disabled so the unwaxed bars cannot oxidize mid-test.", - "tags": ["connectible", "bars", "copper-bars", "axe", "scrape", "shield", "player"], - "minecraftIds": [ - "minecraft:exposed_copper_bars", "minecraft:copper_bars" , "minecraft:iron_axe" , - "minecraft:shield" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-2, 0, -1], [2, 4, 2] ] - }, - "player": { - "inventory": { - "hotbar1" : {"id": "minecraft:iron_axe", "count": 1}, - "off_hand": {"id": "minecraft:shield" , "count": 1} - }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:exposed_copper_bars"} }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [-1, 2, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [ 0, 2, 1], "block": {"id": "minecraft:stone"} } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, - {"at": 3, "do": "interact"}, - { - "at": 4, - "do": "assert", - "checks": [ - { - "pos": [0, 2, 0], - "is": { - "id" : "minecraft:exposed_copper_bars", - "north" : "false" , - "south" : "true" , - "east" : "false" , - "west" : "true" , - "waterlogged": "false" - } - } - ] - }, - {"at": 5, "do": "set_slot", "slot": "off_hand"}, - {"at": 6, "do": "interact"}, - { - "at": 7, - "do": "assert", - "checks": [ - { - "pos": [0, 2, 0], - "is": { - "id" : "minecraft:copper_bars", - "north" : "false" , - "south" : "true" , - "east" : "false" , - "west" : "true" , - "waterlogged": "false" - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/connectible/bars/exposed_copper_bars_axe_scrapes.json b/tests/connectible/bars/exposed_copper_bars_axe_scrapes.json deleted file mode 100644 index a5c3253..0000000 --- a/tests/connectible/bars/exposed_copper_bars_axe_scrapes.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "exposed_copper_bars_axe_scrapes", - "description": "Using an axe on exposed copper bars scrapes them back to copper bars, keeping their connection and waterlogged properties. Random ticks are disabled so the unwaxed bars cannot oxidize mid-test.", - "tags": ["connectible", "bars", "copper-bars", "axe", "scrape", "player"], - "minecraftIds": ["minecraft:exposed_copper_bars", "minecraft:copper_bars", "minecraft:iron_axe"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-2, 0, -1], [2, 4, 2] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:exposed_copper_bars"} }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [-1, 2, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [ 0, 2, 1], "block": {"id": "minecraft:stone"} } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, - { - "at": 3, - "do": "assert", - "checks": [ - { - "pos": [0, 2, 0], - "is": { - "id" : "minecraft:exposed_copper_bars", - "north" : "false" , - "south" : "true" , - "east" : "false" , - "west" : "true" , - "waterlogged": "false" - } - } - ] - }, - {"at": 4, "do": "interact"}, - { - "at": 5, - "do": "assert", - "checks": [ - { - "pos": [0, 2, 0], - "is": { - "id" : "minecraft:copper_bars", - "north" : "false" , - "south" : "true" , - "east" : "false" , - "west" : "true" , - "waterlogged": "false" - } - }, - { "slot": "hotbar1", "is": {"id": "minecraft:iron_axe", "count": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/connectible/bars/exposed_copper_bars_connect_to_iron_bars.json b/tests/connectible/bars/exposed_copper_bars_connect_to_iron_bars.json deleted file mode 100644 index 32753b9..0000000 --- a/tests/connectible/bars/exposed_copper_bars_connect_to_iron_bars.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "exposed_copper_bars_connect_to_iron_bars", - "description": "Exposed copper bars connect to an adjacent iron bars block and vice versa (any bars block counts as an attachment target), and not to the empty sides. Random ticks are disabled so the unwaxed bars cannot oxidize mid-test.", - "tags": ["connectible", "bars", "copper-bars", "iron-bars", "block-state", "neighbor-update"], - "minecraftIds": ["minecraft:exposed_copper_bars", "minecraft:iron_bars"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-2, 0, -1], [2, 2, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:exposed_copper_bars"} }, - { "at": 1, "do": "place", "pos": [-1, 0, 0], "block": {"id": "minecraft:iron_bars"} }, - { - "at": 2, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id" : "minecraft:exposed_copper_bars", - "north" : "false" , - "south" : "false" , - "east" : "false" , - "west" : "true" , - "waterlogged": "false" - } - }, - { - "pos": [-1, 0, 0], - "is": { - "id" : "minecraft:iron_bars", - "north" : "false" , - "south" : "false" , - "east" : "true" , - "west" : "false" , - "waterlogged": "false" - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/connectible/bars/exposed_copper_bars_honeycomb_waxes.json b/tests/connectible/bars/exposed_copper_bars_honeycomb_waxes.json deleted file mode 100644 index b02d998..0000000 --- a/tests/connectible/bars/exposed_copper_bars_honeycomb_waxes.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "exposed_copper_bars_honeycomb_waxes", - "description": "Using honeycomb on exposed copper bars turns them into waxed exposed copper bars with the same properties and consumes one honeycomb. Random ticks are disabled so the unwaxed bars cannot oxidize mid-test.", - "tags": ["connectible", "bars", "copper-bars", "honeycomb", "waxed", "player"], - "minecraftIds": ["minecraft:exposed_copper_bars", "minecraft:waxed_exposed_copper_bars", "minecraft:honeycomb"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-2, 0, -1], [2, 4, 2] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:exposed_copper_bars"} }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [-1, 2, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [ 0, 2, 1], "block": {"id": "minecraft:stone"} } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, - { - "at": 3, - "do": "assert", - "checks": [ - { - "pos": [0, 2, 0], - "is": { - "id" : "minecraft:exposed_copper_bars", - "north" : "false" , - "south" : "true" , - "east" : "false" , - "west" : "true" , - "waterlogged": "false" - } - } - ] - }, - {"at": 4, "do": "interact"}, - { - "at": 5, - "do": "assert", - "checks": [ - { - "pos": [0, 2, 0], - "is": { - "id" : "minecraft:waxed_exposed_copper_bars", - "north" : "false" , - "south" : "true" , - "east" : "false" , - "west" : "true" , - "waterlogged": "false" - } - }, - { "slot": "hotbar1", "is": {"id": "minecraft:air", "count": 0} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/connectible/bars/exposed_copper_bars_oxidize_randomly.json b/tests/connectible/bars/exposed_copper_bars_oxidize_randomly.json deleted file mode 100644 index 01ad2a9..0000000 --- a/tests/connectible/bars/exposed_copper_bars_oxidize_randomly.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "exposed_copper_bars_oxidize_randomly", - "description": "With a high random tick speed, a lone exposed copper bars block oxidizes to weathered or oxidized copper bars and keeps its connection properties.", - "tags": ["connectible", "bars", "copper-bars", "oxidation", "random-tick"], - "minecraftIds": [ - "minecraft:exposed_copper_bars" , "minecraft:weathered_copper_bars", "minecraft:oxidized_copper_bars" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-2, 0, -1], [2, 2, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:exposed_copper_bars"} }, - { "at": 1, "do": "place", "pos": [-1, 0, 0], "block": {"id": "minecraft:stone"} }, - { - "at": 2, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id" : "minecraft:exposed_copper_bars", - "north" : "false" , - "south" : "false" , - "east" : "false" , - "west" : "true" , - "waterlogged": "false" - } - } - ] - }, - { - "at": 150, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": [ - { - "id" : "minecraft:weathered_copper_bars", - "north" : "false" , - "south" : "false" , - "east" : "false" , - "west" : "true" , - "waterlogged": "false" - }, - { - "id" : "minecraft:oxidized_copper_bars", - "north" : "false" , - "south" : "false" , - "east" : "false" , - "west" : "true" , - "waterlogged": "false" - } - ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/connectible/bars/waxed_exposed_copper_bars_never_oxidize.json b/tests/connectible/bars/waxed_exposed_copper_bars_never_oxidize.json deleted file mode 100644 index b7c55b4..0000000 --- a/tests/connectible/bars/waxed_exposed_copper_bars_never_oxidize.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "waxed_exposed_copper_bars_never_oxidize", - "description": "With a high random tick speed, waxed exposed copper bars never change and do not hold back an adjacent unwaxed exposed copper bars, which oxidizes further.", - "tags": ["connectible", "bars", "copper-bars", "waxed", "oxidation", "random-tick"], - "minecraftIds": [ - "minecraft:waxed_exposed_copper_bars", - "minecraft:exposed_copper_bars" , - "minecraft:weathered_copper_bars" , - "minecraft:oxidized_copper_bars" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-2, 0, -1], [2, 2, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:waxed_exposed_copper_bars"} }, - { "pos": [1, 0, 0], "block": {"id": "minecraft:exposed_copper_bars" } } - ] - }, - { - "at": 1, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id" : "minecraft:waxed_exposed_copper_bars", - "north" : "false" , - "south" : "false" , - "east" : "true" , - "west" : "false" , - "waterlogged": "false" - } - }, - { - "pos": [1, 0, 0], - "is": { - "id" : "minecraft:exposed_copper_bars", - "north" : "false" , - "south" : "false" , - "east" : "false" , - "west" : "true" , - "waterlogged": "false" - } - } - ] - }, - { - "at": 150, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id" : "minecraft:waxed_exposed_copper_bars", - "north" : "false" , - "south" : "false" , - "east" : "true" , - "west" : "false" , - "waterlogged": "false" - } - }, - { - "pos": [1, 0, 0], - "is": [ - { - "id" : "minecraft:weathered_copper_bars", - "north" : "false" , - "south" : "false" , - "east" : "false" , - "west" : "true" , - "waterlogged": "false" - }, - { - "id" : "minecraft:oxidized_copper_bars", - "north" : "false" , - "south" : "false" , - "east" : "false" , - "west" : "true" , - "waterlogged": "false" - } - ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/connectible/fences/crimson_fence_not_fuel.json b/tests/connectible/fences/crimson_fence_not_fuel.json deleted file mode 100644 index a674772..0000000 --- a/tests/connectible/fences/crimson_fence_not_fuel.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "Crimson Fence Not Fuel", - "description": "A crimson fence in a furnace fuel slot is not a valid fuel: it is not consumed and the furnace stays unlit.", - "tags": ["fence", "fuel", "furnace", "block-entity"], - "minecraftIds": ["minecraft:crimson_fence", "minecraft:furnace", "minecraft:raw_iron"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:crimson_fence\"}]" - } - } - }, - { - "at": 3, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "false", - "nbt": { - "lit_total_time": "0s", - "Items[1].id": "\"minecraft:crimson_fence\"", - "Items[1].count": 1 - } - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/connectible/fences/oak_fence_furnace_fuel.json b/tests/connectible/fences/oak_fence_furnace_fuel.json deleted file mode 100644 index 891be64..0000000 --- a/tests/connectible/fences/oak_fence_furnace_fuel.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "Oak Fence Furnace Fuel", - "description": "A wooden fence in a furnace fuel slot is consumed and lights the furnace for 300 ticks.", - "tags": ["fence", "fuel", "furnace", "block-entity"], - "minecraftIds": ["minecraft:oak_fence", "minecraft:furnace", "minecraft:raw_iron"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:oak_fence\"}]" - } - } - }, - { - "at": 3, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "true", - "nbt": {"lit_total_time": "300s", "Items[0].id": "\"minecraft:raw_iron\""} - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/connectible/stairs/stairs_corner_between_materials.json b/tests/connectible/stairs/stairs_corner_between_materials.json deleted file mode 100644 index c3c4f67..0000000 --- a/tests/connectible/stairs/stairs_corner_between_materials.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "stairs_corner_between_materials", - "description": "Stairs of different materials still form outer and inner corners with each other.", - "tags": ["connectible", "stairs", "shape", "placement", "player"], - "minecraftIds": ["minecraft:stone_stairs", "minecraft:oak_stairs", "minecraft:cut_copper_stairs"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, -1], [4, 3, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:stone_stairs", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [0, 2, 1], "block": {"id": "minecraft:oak_stairs" , "facing": "east"} }, - { "pos": [4, 2, -1], "block": {"id": "minecraft:cut_copper_stairs", "facing": "west"} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, - {"at": 2, "do": "interact"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "outerleft" } }, - { "pos": [4, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "innerright"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/connectible/stairs/stairs_corner_neighbor_update.json b/tests/connectible/stairs/stairs_corner_neighbor_update.json deleted file mode 100644 index 7e7a2dd..0000000 --- a/tests/connectible/stairs/stairs_corner_neighbor_update.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "stairs_corner_neighbor_update", - "description": "An existing straight stair turns into an outer or inner corner when a perpendicular stair appears beside it, and returns to straight when that neighbor is removed.", - "tags": ["connectible", "stairs", "shape", "neighbor-update"], - "minecraftIds": ["minecraft:stone_stairs"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, -1], [4, 2, 1] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:stone_stairs", "facing": "south"} }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:stone_stairs", "facing": "south"} } - ] - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 1], "block": {"id": "minecraft:stone_stairs", "facing": "east"} }, - { "pos": [4, 1, -1], "block": {"id": "minecraft:stone_stairs", "facing": "west"} } - ] - }, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "outerleft" } }, - { "pos": [4, 1, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "innerright"} } - ] - }, - { "at": 3, "do": "remove", "pos": [0, 1, 1] }, - { "at": 3, "do": "remove", "pos": [4, 1, -1] }, - { - "at": 4, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "straight"} }, - { "pos": [4, 1, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "straight"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/connectible/stairs/stairs_corner_placement.json b/tests/connectible/stairs/stairs_corner_placement.json deleted file mode 100644 index adb8544..0000000 --- a/tests/connectible/stairs/stairs_corner_placement.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "stairs_corner_placement", - "description": "A stair placed by a player next to a perpendicular same-half stair becomes an outer corner when that stair is in front of it and an inner corner when it is behind, left or right depending on the neighbor's facing.", - "tags": ["connectible", "stairs", "shape", "placement", "player"], - "minecraftIds": ["minecraft:stone_stairs"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, -1], [12, 3, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:stone_stairs", "count": 4} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [ 0, 1, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [ 4, 1, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [ 8, 1, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [12, 1, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [ 0, 2, 1], "block": {"id": "minecraft:stone_stairs", "facing": "east"} }, - { "pos": [ 4, 2, 1], "block": {"id": "minecraft:stone_stairs", "facing": "west"} }, - { "pos": [ 8, 2, -1], "block": {"id": "minecraft:stone_stairs", "facing": "east"} }, - { "pos": [12, 2, -1], "block": {"id": "minecraft:stone_stairs", "facing": "west"} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, - {"at": 2, "do": "interact"}, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [8.5, 3, 0.5], "rot": [0, 90] }, - {"at": 3, "do": "interact"}, - { "at": 4, "do": "tp", "entity_alias": "player", "pos": [12.5, 3, 0.5], "rot": [0, 90] }, - {"at": 4, "do": "interact"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "outerleft"} }, - { "pos": [4, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "outerright"} }, - { "pos": [8, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "innerleft"} }, - { "pos": [12, 2, 0], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "innerright"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/connectible/stairs/stairs_shape_vertical_update.json b/tests/connectible/stairs/stairs_shape_vertical_update.json deleted file mode 100644 index 991b2e1..0000000 --- a/tests/connectible/stairs/stairs_shape_vertical_update.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "stairs_shape_vertical_update", - "description": "A stair's corner shape is not changed by blocks placed directly above or below it, since only horizontal neighbor updates recompute the shape.", - "tags": ["connectible", "stairs", "shape", "neighbor-update"], - "minecraftIds": ["minecraft:stone_stairs"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [2, 3, 2] ] - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [1, 1, 2], "block": {"id": "minecraft:stone_stairs", "facing": "south"} }, - { "at": 1, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:stone_stairs", "facing": "east"} }, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [1, 1, 2], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "innerleft"} } - ] - }, - { "at": 3, "do": "place", "pos": [1, 2, 2], "block": {"id": "minecraft:stone"} }, - { "at": 3, "do": "place", "pos": [1, 0, 2], "block": {"id": "minecraft:stone"} }, - { - "at": 4, - "do": "assert", - "checks": [ - { "pos": [1, 1, 2], "is": {"id": "minecraft:stone_stairs", "facing": "south", "shape": "innerleft"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/container/ender_chests/ender_chest_survives_tnt_explosion.json b/tests/container/ender_chests/ender_chest_survives_tnt_explosion.json deleted file mode 100644 index 4c55a20..0000000 --- a/tests/container/ender_chests/ender_chest_survives_tnt_explosion.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "ender_chest_survives_tnt_explosion", - "description": "An ender chest (blast resistance 600) next to a TNT explosion stays in place and drops nothing, while a glass block in the same blast is destroyed.", - "tags": ["container", "ender-chest", "tnt", "explosion", "blast-resistance"], - "minecraftIds": ["minecraft:ender_chest", "minecraft:tnt", "minecraft:obsidian", "minecraft:glass"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [6, 3, 4] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, 0], [6, 0, 4] ], - "with": {"id": "minecraft:obsidian"} - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { - "pos": [2, 1, 2], - "block": {"id": "minecraft:ender_chest", "facing": "north", "waterlogged": false} - }, - { "pos": [4, 1, 2], "block": {"id": "minecraft:glass"} } - ] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [3.5, 1, 2.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [2, 1, 2], "is": {"id": "minecraft:ender_chest", "facing": "north", "waterlogged": false} }, - { "pos": [4, 1, 2], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "exists": false} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/container/furnace/furnace_cooking_progress_advances.json b/tests/container/furnace/furnace_cooking_progress_advances.json deleted file mode 100644 index ac01767..0000000 --- a/tests/container/furnace/furnace_cooking_progress_advances.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "furnace_cooking_progress_advances", - "description": "While lit and smelting, a furnace advances cooking_time_spent every tick and keeps the result slot empty until the cooking time is reached.", - "tags": ["container", "furnace", "block-entity", "smelting"], - "minecraftIds": ["minecraft:furnace", "minecraft:raw_iron", "minecraft:coal"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "cooking_total_time": "200s", - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}]" - } - } - }, - { - "at": 20, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "true", - "nbt": { - "cooking_time_spent": "20s" , - "cooking_total_time": "200s" , - "Items[0].id" : "minecraft:raw_iron", - "Items[0].Slot" : "0b" - } - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/container/furnace/furnace_cooking_progress_cools_down.json b/tests/container/furnace/furnace_cooking_progress_cools_down.json deleted file mode 100644 index 5abf78e..0000000 --- a/tests/container/furnace/furnace_cooking_progress_cools_down.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "furnace_cooking_progress_cools_down", - "description": "An unlit furnace with no fuel loses 2 points of cooking progress per tick and stops at 0.", - "tags": ["container", "furnace", "block-entity", "smelting"], - "minecraftIds": ["minecraft:furnace", "minecraft:raw_iron"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "cooking_time_spent": "50s" , - "cooking_total_time": "200s" , - "Items" : "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}]" - } - } - }, - { - "at": 10, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { "id": "minecraft:furnace", "lit": "false", "nbt": {"cooking_time_spent": "30s"} } - } - ] - }, - { - "at": 40, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "false", - "nbt": {"cooking_time_spent": "0s", "Items[0].id": "minecraft:raw_iron"} - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/container/furnace/furnace_different_result_item_blocks_smelting.json b/tests/container/furnace/furnace_different_result_item_blocks_smelting.json deleted file mode 100644 index b55e7b8..0000000 --- a/tests/container/furnace/furnace_different_result_item_blocks_smelting.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "furnace_different_result_item_blocks_smelting", - "description": "A furnace whose result slot holds a different item than the recipe output does not smelt, stays unlit and keeps its fuel.", - "tags": ["container", "furnace", "block-entity", "smelting", "fuel"], - "minecraftIds": ["minecraft:furnace", "minecraft:raw_iron", "minecraft:coal", "minecraft:gold_ingot"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}, {Slot: 2b, count: 1, id: \"minecraft:gold_ingot\"}]" - } - } - }, - { - "at": 10, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "false", - "nbt": { - "lit_total_time": "0s", - "Items[0].id": "minecraft:raw_iron", - "Items[1].id": "minecraft:coal", - "Items[1].count": 1, - "Items[2].id": "minecraft:gold_ingot", - "Items[2].count": 1 - } - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/container/furnace/furnace_explosion_drops_self_and_contents.json b/tests/container/furnace/furnace_explosion_drops_self_and_contents.json deleted file mode 100644 index 5f87129..0000000 --- a/tests/container/furnace/furnace_explosion_drops_self_and_contents.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "furnace_explosion_drops_self_and_contents", - "description": "A furnace destroyed by an explosion drops itself as one item and spills the contents of its input, fuel and result slots, giving four item entities in total.", - "tags": ["container", "furnace", "block-entity", "drops", "explosion"], - "minecraftIds": [ - "minecraft:furnace" , "minecraft:tnt" , "minecraft:obsidian" , "minecraft:item" , - "minecraft:dirt" , "minecraft:coal" , "minecraft:iron_ingot" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [8, 4, 8] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [4, 0, 4], [8, 0, 8] ], - "with": {"id": "minecraft:obsidian"} - }, - { - "at": 1, - "do": "place", - "pos": [6, 1, 6], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:dirt\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}, {Slot: 2b, count: 1, id: \"minecraft:iron_ingot\"}]" - } - } - }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [6.5, 1, 5.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [6, 1, 6], "is": {"id": "minecraft:air"} }, - { "is": "minecraft:item" , "exists": true, "count": 4 } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/container/furnace/furnace_fuel_burns_out.json b/tests/container/furnace/furnace_fuel_burns_out.json deleted file mode 100644 index 504bf2b..0000000 --- a/tests/container/furnace/furnace_fuel_burns_out.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "furnace_fuel_burns_out", - "description": "A furnace fed one oak fence (300 ticks of fuel) smelts one of two raw iron, then turns unlit once the fuel runs out and leaves the second raw iron unsmelted.", - "tags": ["container", "furnace", "block-entity", "smelting", "fuel"], - "minecraftIds": ["minecraft:furnace", "minecraft:raw_iron", "minecraft:oak_fence", "minecraft:iron_ingot"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "cooking_total_time": "200s", - "Items": "[{Slot: 0b, count: 2, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:oak_fence\"}]" - } - } - }, - { - "at": 5, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "true", - "nbt": {"lit_total_time": "300s", "Items[0].count": 2, "Items[0].id": "minecraft:raw_iron"} - } - } - ] - }, - { - "at": 215, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "true", - "nbt": { - "Items[0].id": "minecraft:raw_iron", - "Items[0].count": 1, - "Items[1].id": "minecraft:iron_ingot", - "Items[1].count": 1 - } - } - } - ] - }, - { - "at": 330, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "false", - "nbt": { - "lit_time_remaining": "0s", - "Items[0].id": "minecraft:raw_iron", - "Items[0].count": 1, - "Items[0].Slot": "0b", - "Items[1].id": "minecraft:iron_ingot", - "Items[1].count": 1, - "Items[1].Slot": "2b" - } - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/container/furnace/furnace_fuel_without_input_not_consumed.json b/tests/container/furnace/furnace_fuel_without_input_not_consumed.json deleted file mode 100644 index ccc79ee..0000000 --- a/tests/container/furnace/furnace_fuel_without_input_not_consumed.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "furnace_fuel_without_input_not_consumed", - "description": "A furnace with fuel but an empty input slot stays unlit and keeps its fuel.", - "tags": ["container", "furnace", "block-entity", "fuel"], - "minecraftIds": ["minecraft:furnace", "minecraft:coal"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { "id": "minecraft:furnace", "nbt": {"Items": "[{Slot: 1b, count: 1, id: \"minecraft:coal\"}]"} } - }, - { - "at": 10, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "false", - "nbt": { - "lit_total_time": "0s", - "Items[0].id": "minecraft:coal", - "Items[0].Slot": "1b", - "Items[0].count": 1 - } - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/container/furnace/furnace_full_result_slot_blocks_smelting.json b/tests/container/furnace/furnace_full_result_slot_blocks_smelting.json deleted file mode 100644 index 8603863..0000000 --- a/tests/container/furnace/furnace_full_result_slot_blocks_smelting.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "furnace_full_result_slot_blocks_smelting", - "description": "A furnace whose result slot already holds a full stack of the output item does not smelt, stays unlit and keeps its fuel.", - "tags": ["container", "furnace", "block-entity", "smelting", "fuel"], - "minecraftIds": ["minecraft:furnace", "minecraft:raw_iron", "minecraft:coal", "minecraft:iron_ingot"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}, {Slot: 2b, count: 64, id: \"minecraft:iron_ingot\"}]" - } - } - }, - { - "at": 10, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "false", - "nbt": { - "lit_total_time": "0s", - "Items[0].id": "minecraft:raw_iron", - "Items[1].id": "minecraft:coal", - "Items[1].count": 1, - "Items[2].id": "minecraft:iron_ingot", - "Items[2].count": 64 - } - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/container/furnace/furnace_lava_bucket_leaves_empty_bucket.json b/tests/container/furnace/furnace_lava_bucket_leaves_empty_bucket.json deleted file mode 100644 index 80e7488..0000000 --- a/tests/container/furnace/furnace_lava_bucket_leaves_empty_bucket.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "furnace_lava_bucket_leaves_empty_bucket", - "description": "A lava bucket used as fuel lights the furnace for 20000 ticks and leaves an empty bucket in the fuel slot.", - "tags": ["container", "furnace", "block-entity", "fuel"], - "minecraftIds": ["minecraft:furnace", "minecraft:raw_iron", "minecraft:lava_bucket", "minecraft:bucket"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "cooking_total_time": "200s", - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:lava_bucket\"}]" - } - } - }, - { - "at": 5, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "true", - "nbt": { - "lit_total_time": "20000s", - "Items[0].id": "minecraft:raw_iron", - "Items[1].id": "minecraft:bucket", - "Items[1].Slot": "1b", - "Items[1].count": 1 - } - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/container/furnace/furnace_smelts_raw_iron.json b/tests/container/furnace/furnace_smelts_raw_iron.json deleted file mode 100644 index 2ae38c9..0000000 --- a/tests/container/furnace/furnace_smelts_raw_iron.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "furnace_smelts_raw_iron", - "description": "A furnace with raw iron and coal lights on the first tick, consumes one coal, and after 200 ticks of cooking holds one iron ingot in the result slot with the input used up.", - "tags": ["container", "furnace", "smelting", "fuel", "block-entity"], - "minecraftIds": ["minecraft:furnace", "minecraft:raw_iron", "minecraft:coal", "minecraft:iron_ingot"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "cooking_total_time": "200s", - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 2, id: \"minecraft:coal\"}]" - } - } - }, - { - "at": 3, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "true", - "nbt": { - "lit_total_time": "1600s", - "Items[0].id": "minecraft:raw_iron", - "Items[1].id": "minecraft:coal", - "Items[1].count": 1 - } - } - } - ] - }, - { - "at": 210, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "true", - "nbt": { - "Items[0].id": "minecraft:coal", - "Items[0].Slot": "1b", - "Items[1].id": "minecraft:iron_ingot", - "Items[1].Slot": "2b", - "Items[1].count": 1 - } - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/container/furnace/furnace_unsmeltable_input_not_cooked.json b/tests/container/furnace/furnace_unsmeltable_input_not_cooked.json deleted file mode 100644 index 6241d38..0000000 --- a/tests/container/furnace/furnace_unsmeltable_input_not_cooked.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "furnace_unsmeltable_input_not_cooked", - "description": "A furnace with fuel and an input that has no smelting recipe stays unlit and keeps the fuel.", - "tags": ["container", "furnace", "block-entity", "smelting", "fuel"], - "minecraftIds": ["minecraft:furnace", "minecraft:dirt", "minecraft:coal"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:dirt\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}]" - } - } - }, - { - "at": 10, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "false", - "nbt": { - "lit_total_time": "0s", - "Items[0].id": "minecraft:dirt", - "Items[1].id": "minecraft:coal", - "Items[1].count": 1 - } - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/beacons/beacon_effect_applied_without_level_check.json b/tests/decoration/beacons/beacon_effect_applied_without_level_check.json deleted file mode 100644 index d15dff4..0000000 --- a/tests/decoration/beacons/beacon_effect_applied_without_level_check.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "beacon_effect_applied_without_level_check", - "description": "A level 1 beacon whose NBT sets the level 4 only Regeneration effect still applies it, since the level check is only in the menu.", - "tags": ["decoration", "beacon", "effects", "player"], - "minecraftIds": ["minecraft:beacon"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-4, 0, -4], [4, 6, 4] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 3, -1], [1, 3, 1] ], - "with": {"id": "minecraft:iron_block"} - }, - { - "at": 0, - "do": "place", - "pos": [0, 4, 0], - "block": { "id": "minecraft:beacon", "nbt": {"primary_effect": "minecraft:regeneration"} } - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 5, 0.5] }, - { - "at": 170, - "do": "assert", - "checks": [ {"is": "minecraft:player", "active_effects[0].id": "minecraft:regeneration"} ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/beacons/beacon_level_four_primary_and_secondary_effects.json b/tests/decoration/beacons/beacon_level_four_primary_and_secondary_effects.json deleted file mode 100644 index 07fe328..0000000 --- a/tests/decoration/beacons/beacon_level_four_primary_and_secondary_effects.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "beacon_level_four_primary_and_secondary_effects", - "description": "A level 4 beacon with Speed primary and Regeneration secondary gives the player both effects.", - "tags": ["decoration", "beacon", "effects", "player"], - "minecraftIds": ["minecraft:beacon"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-4, 0, -4], [4, 6, 4] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-4, 0, -4], [4, 0, 4] ], - "with": {"id": "minecraft:iron_block"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-3, 1, -3], [3, 1, 3] ], - "with": {"id": "minecraft:iron_block"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-2, 2, -2], [2, 2, 2] ], - "with": {"id": "minecraft:iron_block"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 3, -1], [1, 3, 1] ], - "with": {"id": "minecraft:iron_block"} - }, - { - "at": 0, - "do": "place", - "pos": [0, 4, 0], - "block": { - "id": "minecraft:beacon", - "nbt": {"primary_effect": "minecraft:speed", "secondary_effect": "minecraft:regeneration"} - } - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 5, 0.5] }, - { - "at": 170, - "do": "assert", - "checks": [ - { - "is" : "minecraft:player" , - "active_effects[0].id": "minecraft:speed" , - "active_effects[1].id": "minecraft:regeneration" - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/beacons/beacon_level_four_same_effect_amplifier_one.json b/tests/decoration/beacons/beacon_level_four_same_effect_amplifier_one.json deleted file mode 100644 index bbe7478..0000000 --- a/tests/decoration/beacons/beacon_level_four_same_effect_amplifier_one.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "beacon_level_four_same_effect_amplifier_one", - "description": "A level 4 beacon with Speed as both primary and secondary gives Speed at amplifier 1.", - "tags": ["decoration", "beacon", "effects", "player"], - "minecraftIds": ["minecraft:beacon"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-4, 0, -4], [4, 6, 4] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-4, 0, -4], [4, 0, 4] ], - "with": {"id": "minecraft:iron_block"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-3, 1, -3], [3, 1, 3] ], - "with": {"id": "minecraft:iron_block"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-2, 2, -2], [2, 2, 2] ], - "with": {"id": "minecraft:iron_block"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 3, -1], [1, 3, 1] ], - "with": {"id": "minecraft:iron_block"} - }, - { - "at": 0, - "do": "place", - "pos": [0, 4, 0], - "block": { - "id": "minecraft:beacon", - "nbt": {"primary_effect": "minecraft:speed", "secondary_effect": "minecraft:speed"} - } - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 5, 0.5] }, - { - "at": 170, - "do": "assert", - "checks": [ - { - "is" : "minecraft:player", - "active_effects[0].id" : "minecraft:speed" , - "active_effects[0].amplifier": "1b" - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/beacons/beacon_level_one_speed_effect.json b/tests/decoration/beacons/beacon_level_one_speed_effect.json deleted file mode 100644 index f64b699..0000000 --- a/tests/decoration/beacons/beacon_level_one_speed_effect.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "beacon_level_one_speed_effect", - "description": "A level 1 beacon with Speed as primary gives a player in range the Speed effect.", - "tags": ["decoration", "beacon", "effects", "player"], - "minecraftIds": ["minecraft:beacon"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-4, 0, -4], [4, 6, 4] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 3, -1], [1, 3, 1] ], - "with": {"id": "minecraft:iron_block"} - }, - { - "at": 0, - "do": "place", - "pos": [0, 4, 0], - "block": { "id": "minecraft:beacon", "nbt": {"primary_effect": "minecraft:speed"} } - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 5, 0.5] }, - { - "at": 170, - "do": "assert", - "checks": [ {"is": "minecraft:player", "active_effects[0].id": "minecraft:speed"} ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/beds/bed_placement_head_space.json b/tests/decoration/beds/bed_placement_head_space.json deleted file mode 100644 index c656bd8..0000000 --- a/tests/decoration/beds/bed_placement_head_space.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "bed_placement_head_space", - "description": "A bed cannot be placed when the block where its head would go is not replaceable, but it replaces a replaceable block such as short grass.", - "tags": ["decoration", "bed", "placement", "replaceable", "player"], - "minecraftIds": ["minecraft:red_bed", "minecraft:short_grass"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [6, 3, 4] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:red_bed"} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [1, 0, 1], "block": {"id": "minecraft:stone" } }, - { "pos": [1, 1, 2], "block": {"id": "minecraft:stone" } }, - { "pos": [5, 0, 1], "block": {"id": "minecraft:stone" } }, - { "pos": [5, 0, 2], "block": {"id": "minecraft:stone" } }, - { "pos": [5, 1, 2], "block": {"id": "minecraft:short_grass"} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [1.5, 3, 1.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [1, 1, 1], "is": {"id": "minecraft:air" } }, - { "pos": [1, 1, 2], "is": {"id": "minecraft:stone" } }, - { "is": {"id": "minecraft:red_bed"}, "slot": "hotbar1" } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [5.5, 3, 1.5], "rot": [0, 90] }, - {"at": 2, "do": "interact"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [5, 1, 1], "is": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} }, - { "pos": [5, 1, 2], "is": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} }, - {"is": "empty", "slot": "hotbar1"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/beds/bed_use_night.json b/tests/decoration/beds/bed_use_night.json deleted file mode 100644 index 6f88b56..0000000 --- a/tests/decoration/beds/bed_use_night.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "bed_use_night", - "description": "Using a bed at night puts the player to sleep and marks both halves as occupied.", - "tags": ["decoration", "bed", "sleeping", "player"], - "minecraftIds": ["minecraft:red_bed"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 3] ] - }, - "player": {"game_mode": "Survival"}, - "world": {"time": "minecraft:midnight"} - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": {"id": "minecraft:red_bed", "facing": "south", "part": "foot"} - }, - { - "at": 0, - "do": "place", - "pos": [0, 0, 1], - "block": {"id": "minecraft:red_bed", "facing": "south", "part": "head"} - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:red_bed", "part": "foot", "occupied": true} }, - { "pos": [0, 0, 1], "is": {"id": "minecraft:red_bed", "part": "head", "occupied": true} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/campfires/campfire_shovel_from_below_does_nothing.json b/tests/decoration/campfires/campfire_shovel_from_below_does_nothing.json deleted file mode 100644 index 77fc87d..0000000 --- a/tests/decoration/campfires/campfire_shovel_from_below_does_nothing.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "Campfire Shovel From Below Does Nothing", - "description": "Using a shovel on the bottom face of a floating lit campfire does not put it out, because ShovelItem.useOn returns PASS for a clicked face of DOWN before checking for campfires. As a reachability control, an unlit campfire at the same spot is then lit with flint and steel from the same position (flint and steel does not check the clicked face).", - "tags": ["campfire", "shovel", "edge-case", "block-state", "player"], - "minecraftIds": ["minecraft:campfire", "minecraft:iron_shovel"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, -1, 0], [0, 2, 0] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { - "pos": [0, 2, 0], - "block": { - "id": "minecraft:campfire", - "lit": true, - "waterlogged": false, - "signal_fire": false, - "facing": "north" - } - } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, - {"at": 1, "do": "interact", "item": "minecraft:iron_shovel"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:campfire", "lit": true, "waterlogged": false} } - ] - }, - { - "at": 3, - "do": "place", - "pos": [0, 2, 0], - "block": { - "id": "minecraft:campfire", - "lit": false, - "waterlogged": false, - "signal_fire": false, - "facing": "north" - } - }, - { "at": 4, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, - {"at": 4, "do": "interact", "item": "minecraft:flint_and_steel"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:campfire", "lit": true, "waterlogged": false} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/cauldrons/cauldron_bucket_fill.json b/tests/decoration/cauldrons/cauldron_bucket_fill.json deleted file mode 100644 index aa82895..0000000 --- a/tests/decoration/cauldrons/cauldron_bucket_fill.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "cauldron_bucket_fill", - "description": "Water, lava and powder snow buckets fill an empty cauldron (water and powder snow at level 3) and leave an empty bucket.", - "tags": ["decoration", "cauldron", "bucket", "interaction", "player"], - "minecraftIds": [ - "minecraft:cauldron" , "minecraft:water_cauldron" , "minecraft:lava_cauldron" , - "minecraft:powder_snow_cauldron", "minecraft:water_bucket" , "minecraft:lava_bucket" , - "minecraft:powder_snow_bucket" , "minecraft:bucket" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [5, 4, 1] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [5, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [-1, 1, 0], [5, 4, 0] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "fill", - "region": [ [-1, 2, -1], [5, 4, -1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:cauldron"} }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:cauldron"} }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:cauldron"} } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, -0.5], "rot": [0, 65] }, - {"at": 2, "do": "interact", "item": "minecraft:water_bucket"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 3} }, - { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } - ] - }, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, -0.5], "rot": [0, 65] }, - {"at": 3, "do": "interact", "item": "minecraft:lava_bucket"}, - { - "at": 4, - "do": "assert", - "checks": [ - { "pos": [2, 1, 0], "is": {"id": "minecraft:lava_cauldron"} }, - { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } - ] - }, - { "at": 4, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, -0.5], "rot": [0, 65] }, - {"at": 4, "do": "interact", "item": "minecraft:powder_snow_bucket"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [4, 1, 0], "is": {"id": "minecraft:powder_snow_cauldron", "level": 3} }, - { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/cauldrons/cauldron_bucket_under_water.json b/tests/decoration/cauldrons/cauldron_bucket_under_water.json deleted file mode 100644 index e8e42ee..0000000 --- a/tests/decoration/cauldrons/cauldron_bucket_under_water.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "cauldron_bucket_under_water", - "description": "With water directly above an empty cauldron, lava and powder snow buckets are refused, while a water bucket still fills it to level 3.", - "tags": ["decoration", "cauldron", "bucket", "water", "interaction", "player"], - "minecraftIds": [ - "minecraft:cauldron" , "minecraft:water_cauldron" , "minecraft:water" , - "minecraft:lava_bucket" , "minecraft:powder_snow_bucket", "minecraft:water_bucket" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [5, 4, 1] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [5, 2, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [-1, 3, -1], [5, 4, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:cauldron"} }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:cauldron"} }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:cauldron"} }, - { "pos": [0, 2, 0], "block": {"id": "minecraft:water" } }, - { "pos": [2, 2, 0], "block": {"id": "minecraft:water" } }, - { "pos": [4, 2, 0], "block": {"id": "minecraft:water" } } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, -0.5], "rot": [0, 72] }, - {"at": 2, "do": "interact", "item": "minecraft:lava_bucket"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:cauldron" } }, - { "is": {"id": "minecraft:lava_bucket"}, "slot": "hotbar1" } - ] - }, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 3, -0.5], "rot": [0, 72] }, - {"at": 3, "do": "interact", "item": "minecraft:powder_snow_bucket"}, - { - "at": 4, - "do": "assert", - "checks": [ - { "pos": [2, 1, 0], "is": {"id": "minecraft:cauldron" } }, - { "is": {"id": "minecraft:powder_snow_bucket"}, "slot": "hotbar1" } - ] - }, - { "at": 4, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, -0.5], "rot": [0, 72] }, - {"at": 4, "do": "interact", "item": "minecraft:water_bucket"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [4, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 3} }, - { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/cauldrons/cauldron_dripstone_fill.json b/tests/decoration/cauldrons/cauldron_dripstone_fill.json deleted file mode 100644 index df9a169..0000000 --- a/tests/decoration/cauldrons/cauldron_dripstone_fill.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "cauldron_dripstone_fill", - "description": "Pointed dripstone under a water source fills an empty cauldron with water, and one under a lava source fills it with lava.", - "tags": ["decoration", "cauldron", "dripstone", "random-tick", "empty-cauldron"], - "minecraftIds": [ - "minecraft:cauldron" , "minecraft:water_cauldron" , "minecraft:lava_cauldron" , - "minecraft:pointed_dripstone", "minecraft:dripstone_block" , "minecraft:water" , - "minecraft:lava" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 6, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 2000 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 5, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 6, -1], [3, 6, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:cauldron"} }, - { "pos": [0, 2, 0], "block": {"id": "minecraft:air"} }, - { "pos": [0, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, - { - "pos": [0, 3, 0], - "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} - }, - { "pos": [0, 5, 0], "block": {"id": "minecraft:water"} }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:cauldron"} }, - { "pos": [2, 2, 0], "block": {"id": "minecraft:air"} }, - { "pos": [2, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, - { - "pos": [2, 3, 0], - "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} - }, - { "pos": [2, 5, 0], "block": {"id": "minecraft:lava"} } - ] - }, - { - "at": 250, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": [ - {"id": "minecraft:water_cauldron", "level": 1}, - {"id": "minecraft:water_cauldron", "level": 2}, - {"id": "minecraft:water_cauldron", "level": 3} - ] - }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:lava_cauldron"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/cauldrons/lava_cauldron_interactions.json b/tests/decoration/cauldrons/lava_cauldron_interactions.json deleted file mode 100644 index d851433..0000000 --- a/tests/decoration/cauldrons/lava_cauldron_interactions.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "lava_cauldron_interactions", - "description": "An empty bucket takes the lava, water and powder snow buckets replace it with a level 3 cauldron, and bottles do nothing.", - "tags": ["decoration", "cauldron", "lava-cauldron", "bucket", "bottle", "interaction", "player"], - "minecraftIds": [ - "minecraft:lava_cauldron" , "minecraft:cauldron" , "minecraft:water_cauldron" , - "minecraft:powder_snow_cauldron", "minecraft:bucket" , "minecraft:lava_bucket" , - "minecraft:water_bucket" , "minecraft:powder_snow_bucket" , "minecraft:glass_bottle" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [7, 4, 1] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [7, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [-1, 1, 0], [7, 4, 0] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "fill", - "region": [ [-1, 2, -1], [7, 4, -1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:lava_cauldron"} }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:lava_cauldron"} }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:lava_cauldron"} }, - { "pos": [6, 1, 0], "block": {"id": "minecraft:lava_cauldron"} } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, -0.5], "rot": [0, 65] }, - {"at": 2, "do": "interact", "item": "minecraft:bucket"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:cauldron" } }, - { "is": {"id": "minecraft:lava_bucket"}, "slot": "hotbar1" } - ] - }, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, -0.5], "rot": [0, 65] }, - {"at": 3, "do": "interact", "item": "minecraft:water_bucket"}, - { - "at": 4, - "do": "assert", - "checks": [ - { "pos": [2, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 3} }, - { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } - ] - }, - { "at": 4, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, -0.5], "rot": [0, 65] }, - {"at": 4, "do": "interact", "item": "minecraft:powder_snow_bucket"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [4, 1, 0], "is": {"id": "minecraft:powder_snow_cauldron", "level": 3} }, - { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } - ] - }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, -0.5], "rot": [0, 65] }, - {"at": 5, "do": "interact", "item": "minecraft:glass_bottle"}, - { - "at": 6, - "do": "assert", - "checks": [ - { "pos": [6, 1, 0], "is": {"id": "minecraft:lava_cauldron"} }, - { "is": {"id": "minecraft:glass_bottle" }, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/cauldrons/powder_snow_cauldron_dripstone.json b/tests/decoration/cauldrons/powder_snow_cauldron_dripstone.json deleted file mode 100644 index e5579e6..0000000 --- a/tests/decoration/cauldrons/powder_snow_cauldron_dripstone.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "powder_snow_cauldron_dripstone", - "description": "Water and lava drips leave a powder snow cauldron unchanged, while an empty cauldron under the same water source does fill.", - "tags": ["decoration", "cauldron", "dripstone", "random-tick", "powder-snow-cauldron"], - "minecraftIds": [ - "minecraft:powder_snow_cauldron", "minecraft:cauldron" , "minecraft:water_cauldron" , - "minecraft:pointed_dripstone" , "minecraft:dripstone_block" , "minecraft:water" , - "minecraft:lava" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [5, 6, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 2000 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [5, 5, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 6, -1], [5, 6, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:powder_snow_cauldron", "level": 1} }, - { "pos": [0, 2, 0], "block": {"id": "minecraft:air"} }, - { "pos": [0, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, - { - "pos": [0, 3, 0], - "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} - }, - { "pos": [0, 5, 0], "block": {"id": "minecraft:water"} }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:powder_snow_cauldron", "level": 1} }, - { "pos": [2, 2, 0], "block": {"id": "minecraft:air"} }, - { "pos": [2, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, - { - "pos": [2, 3, 0], - "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} - }, - { "pos": [2, 5, 0], "block": {"id": "minecraft:lava"} }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:cauldron"} }, - { "pos": [4, 2, 0], "block": {"id": "minecraft:air"} }, - { "pos": [4, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, - { - "pos": [4, 3, 0], - "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} - }, - { "pos": [4, 5, 0], "block": {"id": "minecraft:water"} } - ] - }, - { - "at": 250, - "do": "assert", - "checks": [ - { - "pos": [4, 1, 0], - "is": [ - {"id": "minecraft:water_cauldron", "level": 1}, - {"id": "minecraft:water_cauldron", "level": 2}, - {"id": "minecraft:water_cauldron", "level": 3} - ] - }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:powder_snow_cauldron", "level": 1} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:powder_snow_cauldron", "level": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/cauldrons/powder_snow_cauldron_interactions.json b/tests/decoration/cauldrons/powder_snow_cauldron_interactions.json deleted file mode 100644 index d5524c2..0000000 --- a/tests/decoration/cauldrons/powder_snow_cauldron_interactions.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "powder_snow_cauldron_interactions", - "description": "An empty bucket only takes powder snow from a full cauldron, a water bucket turns it into a level 3 water cauldron, and glass bottles do nothing.", - "tags": ["decoration", "cauldron", "powder-snow-cauldron", "bucket", "bottle", "interaction", "player"], - "minecraftIds": [ - "minecraft:powder_snow_cauldron", "minecraft:cauldron" , "minecraft:water_cauldron" , - "minecraft:bucket" , "minecraft:powder_snow_bucket" , "minecraft:water_bucket" , - "minecraft:glass_bottle" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [7, 4, 1] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [7, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [-1, 1, 0], [7, 4, 0] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "fill", - "region": [ [-1, 2, -1], [7, 4, -1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:powder_snow_cauldron", "level": 3} }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:powder_snow_cauldron", "level": 2} }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:powder_snow_cauldron", "level": 1} }, - { "pos": [6, 1, 0], "block": {"id": "minecraft:powder_snow_cauldron", "level": 3} } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, -0.5], "rot": [0, 65] }, - {"at": 2, "do": "interact", "item": "minecraft:bucket"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:cauldron" } }, - { "is": {"id": "minecraft:powder_snow_bucket"}, "slot": "hotbar1" } - ] - }, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, -0.5], "rot": [0, 65] }, - {"at": 3, "do": "interact", "item": "minecraft:bucket"}, - { - "at": 4, - "do": "assert", - "checks": [ - { "pos": [2, 1, 0], "is": {"id": "minecraft:powder_snow_cauldron", "level": 2} }, - { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } - ] - }, - { "at": 4, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, -0.5], "rot": [0, 65] }, - {"at": 4, "do": "interact", "item": "minecraft:glass_bottle"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [4, 1, 0], "is": {"id": "minecraft:powder_snow_cauldron", "level": 1} }, - { "is": {"id": "minecraft:glass_bottle" }, "slot": "hotbar1" } - ] - }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, -0.5], "rot": [0, 65] }, - {"at": 5, "do": "interact", "item": "minecraft:water_bucket"}, - { - "at": 6, - "do": "assert", - "checks": [ - { "pos": [6, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 3} }, - { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/cauldrons/water_cauldron_buckets.json b/tests/decoration/cauldrons/water_cauldron_buckets.json deleted file mode 100644 index 3ebf9fa..0000000 --- a/tests/decoration/cauldrons/water_cauldron_buckets.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "water_cauldron_buckets", - "description": "An empty bucket only takes water from a full water cauldron, and lava or powder snow buckets replace the water cauldron's contents.", - "tags": ["decoration", "cauldron", "water-cauldron", "bucket", "interaction", "player"], - "minecraftIds": [ - "minecraft:water_cauldron" , "minecraft:cauldron" , "minecraft:lava_cauldron" , - "minecraft:powder_snow_cauldron", "minecraft:bucket" , "minecraft:water_bucket" , - "minecraft:lava_bucket" , "minecraft:powder_snow_bucket" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [7, 4, 1] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [7, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [-1, 1, 0], [7, 4, 0] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "fill", - "region": [ [-1, 2, -1], [7, 4, -1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 3} }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 2} }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 1} }, - { "pos": [6, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 2} } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, -0.5], "rot": [0, 65] }, - {"at": 2, "do": "interact", "item": "minecraft:bucket"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:cauldron" } }, - { "is": {"id": "minecraft:water_bucket"}, "slot": "hotbar1" } - ] - }, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, -0.5], "rot": [0, 65] }, - {"at": 3, "do": "interact", "item": "minecraft:bucket"}, - { - "at": 4, - "do": "assert", - "checks": [ - { "pos": [2, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 2} }, - { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } - ] - }, - { "at": 4, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, -0.5], "rot": [0, 65] }, - {"at": 4, "do": "interact", "item": "minecraft:lava_bucket"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [4, 1, 0], "is": {"id": "minecraft:lava_cauldron"} }, - { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } - ] - }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, -0.5], "rot": [0, 65] }, - {"at": 5, "do": "interact", "item": "minecraft:powder_snow_bucket"}, - { - "at": 6, - "do": "assert", - "checks": [ - { "pos": [6, 1, 0], "is": {"id": "minecraft:powder_snow_cauldron", "level": 3} }, - { "is": {"id": "minecraft:bucket" }, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/cauldrons/water_cauldron_dripstone.json b/tests/decoration/cauldrons/water_cauldron_dripstone.json deleted file mode 100644 index 7bf5f0c..0000000 --- a/tests/decoration/cauldrons/water_cauldron_dripstone.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "water_cauldron_dripstone", - "description": "A water drip raises a water cauldron's level until it is full, while a lava drip leaves a water cauldron unchanged.", - "tags": ["decoration", "cauldron", "dripstone", "random-tick", "water-cauldron"], - "minecraftIds": [ - "minecraft:water_cauldron" , "minecraft:pointed_dripstone", "minecraft:dripstone_block" , - "minecraft:water" , "minecraft:lava" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [5, 6, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 2000 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [5, 5, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 6, -1], [5, 6, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 1} }, - { "pos": [0, 2, 0], "block": {"id": "minecraft:air"} }, - { "pos": [0, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, - { - "pos": [0, 3, 0], - "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} - }, - { "pos": [0, 5, 0], "block": {"id": "minecraft:water"} }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 3} }, - { "pos": [2, 2, 0], "block": {"id": "minecraft:air"} }, - { "pos": [2, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, - { - "pos": [2, 3, 0], - "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} - }, - { "pos": [2, 5, 0], "block": {"id": "minecraft:water"} }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:water_cauldron", "level": 1} }, - { "pos": [4, 2, 0], "block": {"id": "minecraft:air"} }, - { "pos": [4, 4, 0], "block": {"id": "minecraft:dripstone_block"} }, - { - "pos": [4, 3, 0], - "block": {"id": "minecraft:pointed_dripstone", "thickness": "tip", "vertical_direction": "down"} - }, - { "pos": [4, 5, 0], "block": {"id": "minecraft:lava"} } - ] - }, - { - "at": 250, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": [ - {"id": "minecraft:water_cauldron", "level": 2}, - {"id": "minecraft:water_cauldron", "level": 3} - ] - }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 3} }, - { "pos": [4, 1, 0], "is": {"id": "minecraft:water_cauldron", "level": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/chains/copper_chain_weathers_to_oxidized.json b/tests/decoration/chains/copper_chain_weathers_to_oxidized.json deleted file mode 100644 index 3880b45..0000000 --- a/tests/decoration/chains/copper_chain_weathers_to_oxidized.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_chain_weathers_to_oxidized", - "description": "WeatheringCopperChainBlock random-ticks while a next stage exists: an isolated copper chain passes through exposed and weathered to oxidized_copper_chain keeping axis and waterlogged. A waxed copper chain (plain ChainBlock, no random ticking) placed far away under the same random tick speed stays unchanged as a control. 400 ticks are allowed (about 110 expected).", - "tags": ["chain", "copper_chain", "random-tick", "weathering", "block-state"], - "minecraftIds": [ - "minecraft:copper_chain" , "minecraft:oxidized_copper_chain", "minecraft:waxed_copper_chain" , - "minecraft:stone" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [11, 3, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 3000 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_chain", "axis": "x", "waterlogged": false} }, - { "pos": [10, 0, 0], "block": {"id": "minecraft:stone"} }, - { - "pos": [10, 1, 0], - "block": {"id": "minecraft:waxed_copper_chain", "axis": "x", "waterlogged": false} - } - ] - }, - { - "at": 400, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": {"id": "minecraft:oxidized_copper_chain", "axis": "x", "waterlogged": false} - }, - { "pos": [10, 1, 0], "is": {"id": "minecraft:waxed_copper_chain", "axis": "x", "waterlogged": false} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_axe_blocked_by_offhand_shield.json b/tests/decoration/copper_grates/copper_grate_axe_blocked_by_offhand_shield.json deleted file mode 100644 index 70e3d1b..0000000 --- a/tests/decoration/copper_grates/copper_grate_axe_blocked_by_offhand_shield.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_axe_blocked_by_offhand_shield", - "description": "An axe in the main hand does not remove wax from a waxed copper grate while a shield is held in the off hand (AxeItem.playerHasBlockingItemUseIntent), but once the shield is removed the same axe removes the wax.", - "tags": ["decoration", "copper-grate", "axe", "wax", "shield", "off-hand", "player"], - "minecraftIds": [ - "minecraft:waxed_copper_grate", "minecraft:copper_grate" , "minecraft:iron_axe" , - "minecraft:shield" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "player": {"game_mode": "Survival"}, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:waxed_copper_grate", "waterlogged": false} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "set_slot", "slot": "off_hand", "item": "minecraft:shield"}, - {"at": 2, "do": "interact", "item": "minecraft:iron_axe"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_copper_grate", "waterlogged": false} }, - { "slot": "off_hand", "is": {"id": "minecraft:shield"} } , - { "slot": "hotbar1", "is": {"id": "minecraft:iron_axe"} } - ] - }, - {"at": 4, "do": "set_slot", "slot": "off_hand"}, - {"at": 5, "do": "interact", "item": "minecraft:iron_axe"}, - { - "at": 6, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": false} }, - { "is": "empty" , "slot": "off_hand" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_axe_does_nothing.json b/tests/decoration/copper_grates/copper_grate_axe_does_nothing.json deleted file mode 100644 index ca1c5f9..0000000 --- a/tests/decoration/copper_grates/copper_grate_axe_does_nothing.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_axe_does_nothing", - "description": "An axe used on an unwaxed, unweathered copper grate does nothing: there is no earlier oxidation stage to scrape back to and no wax to remove (AxeItem.useOn passes). An oak log used with the same axe is stripped, which proves the axe interaction itself worked.", - "tags": ["decoration", "copper-grate", "axe", "weathering", "block-state", "player"], - "minecraftIds": [ - "minecraft:copper_grate" , "minecraft:iron_axe" , "minecraft:oak_log" , - "minecraft:stripped_oak_log" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [4, 1, 0] ] - }, - "player": {"game_mode": "Survival"}, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, 0], [4, 0, 0] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_grate", "waterlogged": false } }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:oak_log" , "axis": "y"} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact", "item": "minecraft:iron_axe"}, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, - {"at": 2, "do": "interact", "item": "minecraft:iron_axe"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [4, 1, 0], "is": {"id": "minecraft:stripped_oak_log", "axis": "y"} }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": false} }, - { "is": {"id": "minecraft:iron_axe"} , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_axe_removes_wax.json b/tests/decoration/copper_grates/copper_grate_axe_removes_wax.json deleted file mode 100644 index 50e765f..0000000 --- a/tests/decoration/copper_grates/copper_grate_axe_removes_wax.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_axe_removes_wax", - "description": "An axe used on a waxed copper grate removes the wax (HoneycombItem.WAX_OFF_BY_BLOCK) and gives the plain copper grate with the same waterlogged state.", - "tags": ["decoration", "copper-grate", "axe", "wax", "block-state", "player"], - "minecraftIds": ["minecraft:waxed_copper_grate", "minecraft:copper_grate", "minecraft:iron_axe"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "player": {"game_mode": "Survival"}, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:waxed_copper_grate", "waterlogged": true} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact", "item": "minecraft:iron_axe"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": true} }, - { "is": {"id": "minecraft:iron_axe" }, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_axe_scrapes_exposed.json b/tests/decoration/copper_grates/copper_grate_axe_scrapes_exposed.json deleted file mode 100644 index 160c356..0000000 --- a/tests/decoration/copper_grates/copper_grate_axe_scrapes_exposed.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_axe_scrapes_exposed", - "description": "An axe used on an exposed copper grate scrapes it back to a plain copper grate (WeatheringCopper.getPrevious) and keeps its waterlogged state; the axe is not consumed.", - "tags": ["decoration", "copper-grate", "axe", "weathering", "scrape", "block-state", "player"], - "minecraftIds": ["minecraft:exposed_copper_grate", "minecraft:copper_grate", "minecraft:iron_axe"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "player": {"game_mode": "Survival"}, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:exposed_copper_grate", "waterlogged": true} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact", "item": "minecraft:iron_axe"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": true} }, - { "is": {"id": "minecraft:iron_axe" }, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_axe_scrapes_oxidized.json b/tests/decoration/copper_grates/copper_grate_axe_scrapes_oxidized.json deleted file mode 100644 index 5ca4824..0000000 --- a/tests/decoration/copper_grates/copper_grate_axe_scrapes_oxidized.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_axe_scrapes_oxidized", - "description": "An axe used on an oxidized copper grate scrapes it back one stage to a weathered copper grate (WeatheringCopper.getPrevious) and keeps its waterlogged state.", - "tags": ["decoration", "copper-grate", "axe", "weathering", "scrape", "block-state", "player"], - "minecraftIds": ["minecraft:oxidized_copper_grate", "minecraft:weathered_copper_grate", "minecraft:iron_axe"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "player": {"game_mode": "Survival"}, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:oxidized_copper_grate", "waterlogged": true} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact", "item": "minecraft:iron_axe"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:weathered_copper_grate", "waterlogged": true} }, - { "slot": "hotbar1", "is": {"id": "minecraft:iron_axe"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_does_not_conduct_redstone.json b/tests/decoration/copper_grates/copper_grate_does_not_conduct_redstone.json deleted file mode 100644 index cdf91ee..0000000 --- a/tests/decoration/copper_grates/copper_grate_does_not_conduct_redstone.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_does_not_conduct_redstone", - "description": "A powered lever attached to a copper grate does not power a redstone lamp on the opposite side, because the grate is not a redstone conductor (isRedstoneConductor = never); the same setup with stone lights the lamp.", - "tags": ["decoration", "copper-grate", "redstone", "conductor", "lever", "redstone-lamp"], - "minecraftIds": ["minecraft:copper_grate", "minecraft:stone", "minecraft:lever", "minecraft:redstone_lamp"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, 0], [1, 1, 4] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, 0], [1, 0, 4] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [1, 1, 0], "block": {"id": "minecraft:redstone_lamp", "lit": false} }, - { "pos": [1, 1, 4], "block": {"id": "minecraft:redstone_lamp", "lit": false} }, - { - "pos": [-1, 1, 0], - "block": {"id": "minecraft:lever", "face": "wall", "facing": "west", "powered": true} - }, - { - "pos": [-1, 1, 4], - "block": {"id": "minecraft:lever", "face": "wall", "facing": "west", "powered": true} - } - ] - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_grate", "waterlogged": false} }, - { "pos": [0, 1, 4], "block": {"id": "minecraft:stone" } } - ] - }, - { - "at": 8, - "do": "assert", - "checks": [ - { - "pos": [-1, 1, 0], - "is": {"id": "minecraft:lever", "face": "wall", "facing": "west", "powered": true} - }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} }, - { - "pos": [-1, 1, 4], - "is": {"id": "minecraft:lever", "face": "wall", "facing": "west", "powered": true} - }, - { "pos": [1, 1, 4], "is": {"id": "minecraft:redstone_lamp", "lit": true} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_honeycomb_ignores_waxed.json b/tests/decoration/copper_grates/copper_grate_honeycomb_ignores_waxed.json deleted file mode 100644 index 04cc110..0000000 --- a/tests/decoration/copper_grates/copper_grate_honeycomb_ignores_waxed.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_honeycomb_ignores_waxed", - "description": "Using honeycomb on an already waxed copper grate does nothing (HoneycombItem.getWaxed finds no waxable entry): the block is unchanged and the honeycomb is not consumed.", - "tags": ["decoration", "copper-grate", "honeycomb", "wax", "block-state", "player"], - "minecraftIds": ["minecraft:waxed_copper_grate", "minecraft:honeycomb"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "player": {"game_mode": "Survival"}, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:waxed_copper_grate", "waterlogged": true} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact", "item": "minecraft:honeycomb"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_copper_grate", "waterlogged": true} }, - { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_honeycomb_waxes.json b/tests/decoration/copper_grates/copper_grate_honeycomb_waxes.json deleted file mode 100644 index 0748c5d..0000000 --- a/tests/decoration/copper_grates/copper_grate_honeycomb_waxes.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_honeycomb_waxes", - "description": "Using honeycomb on a copper grate turns it into a waxed copper grate (HoneycombItem.useOn), keeps its waterlogged state and consumes one honeycomb.", - "tags": ["decoration", "copper-grate", "honeycomb", "wax", "block-state", "player"], - "minecraftIds": ["minecraft:copper_grate", "minecraft:waxed_copper_grate", "minecraft:honeycomb"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "player": {"game_mode": "Survival"}, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_grate", "waterlogged": true} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact", "item": "minecraft:honeycomb"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_copper_grate", "waterlogged": true} }, - {"slot": "hotbar1", "is": "empty"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_honeycomb_waxes_exposed.json b/tests/decoration/copper_grates/copper_grate_honeycomb_waxes_exposed.json deleted file mode 100644 index 1a23924..0000000 --- a/tests/decoration/copper_grates/copper_grate_honeycomb_waxes_exposed.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_honeycomb_waxes_exposed", - "description": "Using honeycomb on an exposed copper grate turns it into a waxed exposed copper grate (HoneycombItem.useOn), keeps its waterlogged state and consumes the honeycomb.", - "tags": ["decoration", "copper-grate", "honeycomb", "wax", "weathering", "block-state", "player"], - "minecraftIds": ["minecraft:exposed_copper_grate", "minecraft:waxed_exposed_copper_grate", "minecraft:honeycomb"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "player": {"game_mode": "Survival"}, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:exposed_copper_grate", "waterlogged": true} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact", "item": "minecraft:honeycomb"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:waxed_exposed_copper_grate", "waterlogged": true} }, - {"slot": "hotbar1", "is": "empty"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_oxidized_stays_oxidized.json b/tests/decoration/copper_grates/copper_grate_oxidized_stays_oxidized.json deleted file mode 100644 index bfca51a..0000000 --- a/tests/decoration/copper_grates/copper_grate_oxidized_stays_oxidized.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_oxidized_stays_oxidized", - "description": "With a very high random tick speed an oxidized copper grate never changes (isRandomlyTicking is false because there is no next stage), while an unwaxed copper grate in the same world does age.", - "tags": ["decoration", "copper-grate", "weathering", "oxidation", "random-tick", "block-state"], - "minecraftIds": ["minecraft:oxidized_copper_grate", "minecraft:copper_grate"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [6, 1, 0] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, 0], [6, 0, 0] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:oxidized_copper_grate", "waterlogged": false} }, - { "pos": [6, 1, 0], "block": {"id": "minecraft:copper_grate" , "waterlogged": false} } - ] - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:oxidized_copper_grate", "waterlogged": false} }, - { "pos": [6, 1, 0], "is": {"id": "minecraft:copper_grate" , "waterlogged": false} } - ] - }, - { - "at": 100, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:oxidized_copper_grate", "waterlogged": false} } - ] - }, - { - "at": 200, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:oxidized_copper_grate", "waterlogged": false} } - ] - }, - { - "at": 300, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:oxidized_copper_grate", "waterlogged": false} }, - { - "pos": [6, 1, 0], - "is": [ - {"id": "minecraft:exposed_copper_grate" , "waterlogged": false}, - {"id": "minecraft:weathered_copper_grate", "waterlogged": false}, - {"id": "minecraft:oxidized_copper_grate" , "waterlogged": false} - ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_oxidizes_over_time.json b/tests/decoration/copper_grates/copper_grate_oxidizes_over_time.json deleted file mode 100644 index aa6e9b8..0000000 --- a/tests/decoration/copper_grates/copper_grate_oxidizes_over_time.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_oxidizes_over_time", - "description": "With a very high random tick speed an exposed copper grate randomly ticks through the remaining oxidation stages (WeatheringCopperGrateBlock.randomTick) and ends up as an oxidized copper grate, keeping its waterlogged state.", - "tags": ["decoration", "copper-grate", "weathering", "oxidation", "random-tick", "block-state"], - "minecraftIds": [ - "minecraft:exposed_copper_grate" , "minecraft:weathered_copper_grate", "minecraft:oxidized_copper_grate" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:exposed_copper_grate", "waterlogged": true} } - ] - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:exposed_copper_grate", "waterlogged": true} } - ] - }, - { - "at": 100, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": [ - {"id": "minecraft:exposed_copper_grate" , "waterlogged": true}, - {"id": "minecraft:weathered_copper_grate", "waterlogged": true}, - {"id": "minecraft:oxidized_copper_grate" , "waterlogged": true} - ] - } - ] - }, - { - "at": 200, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": [ - {"id": "minecraft:exposed_copper_grate" , "waterlogged": true}, - {"id": "minecraft:weathered_copper_grate", "waterlogged": true}, - {"id": "minecraft:oxidized_copper_grate" , "waterlogged": true} - ] - } - ] - }, - { - "at": 300, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:oxidized_copper_grate", "waterlogged": true} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_passes_skylight.json b/tests/decoration/copper_grates/copper_grate_passes_skylight.json deleted file mode 100644 index d541537..0000000 --- a/tests/decoration/copper_grates/copper_grate_passes_skylight.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_passes_skylight", - "description": "A daylight detector in a sealed chamber roofed by a copper grate receives skylight (TransparentBlock.propagatesSkylightDown) and powers its adjacent redstone lamp at noon; an identical chamber roofed by stone stays dark.", - "tags": ["decoration", "copper-grate", "skylight", "daylight-detector", "redstone-lamp", "world-config"], - "minecraftIds": [ - "minecraft:copper_grate" , "minecraft:stone" , "minecraft:daylight_detector", - "minecraft:redstone_lamp" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 2, 7] ] - }, - "world": { - "time": "minecraft:noon", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [1, 0, 7] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [0, 1, -1], "block": {"id": "minecraft:stone"} }, - { "pos": [0, 1, 1] , "block": {"id": "minecraft:stone"} }, - { "pos": [1, 1, 0] , "block": {"id": "minecraft:redstone_lamp", "lit": false} }, - { "pos": [0, 1, 0] , "block": {"id": "minecraft:daylight_detector", "inverted": false} }, - { "pos": [0, 2, 0] , "block": {"id": "minecraft:copper_grate", "waterlogged": false} }, - { "pos": [-1, 1, 6], "block": {"id": "minecraft:stone"} }, - { "pos": [0, 1, 5] , "block": {"id": "minecraft:stone"} }, - { "pos": [0, 1, 7] , "block": {"id": "minecraft:stone"} }, - { "pos": [1, 1, 6] , "block": {"id": "minecraft:redstone_lamp", "lit": false} }, - { "pos": [0, 1, 6] , "block": {"id": "minecraft:daylight_detector", "inverted": false} }, - { "pos": [0, 2, 6] , "block": {"id": "minecraft:stone"} } - ] - }, - { - "at": 50, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:copper_grate" , "waterlogged": false } }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:redstone_lamp", "lit": true } }, - { "pos": [1, 1, 6], "is": {"id": "minecraft:redstone_lamp", "lit": false} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_placed_in_flowing_water_is_not_waterlogged.json b/tests/decoration/copper_grates/copper_grate_placed_in_flowing_water_is_not_waterlogged.json deleted file mode 100644 index 40cb31a..0000000 --- a/tests/decoration/copper_grates/copper_grate_placed_in_flowing_water_is_not_waterlogged.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_placed_in_flowing_water_is_not_waterlogged", - "description": "A copper grate placed into flowing (non-source) water is not waterlogged, because getStateForPlacement only checks fluidState.is(Fluids.WATER), which is the source fluid type.", - "tags": ["decoration", "copper-grate", "placement", "waterlogging", "water", "block-state", "player"], - "minecraftIds": ["minecraft:copper_grate", "minecraft:water", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [2, 1, 1] ] - }, - "player": {"game_mode": "Survival"}, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [2, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone"} }, - { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone"} }, - { "pos": [ 1, 1, 1], "block": {"id": "minecraft:stone"} }, - { "pos": [ 1, 1, -1], "block": {"id": "minecraft:stone"} }, - { "pos": [ 2, 1, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [ 0, 1, 0], "block": {"id": "minecraft:water"} } - ] - }, - { - "at": 12, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:water", "level": 1} } - ] - }, - { "at": 13, "do": "tp", "entity_alias": "player", "pos": [1.5, 3, 0.5], "rot": [0, 90] }, - {"at": 13, "do": "interact", "item": "minecraft:copper_grate"}, - { - "at": 14, - "do": "assert", - "checks": [ - { "pos": [1, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": false} }, - { "is": "empty" , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_placed_in_water_source_is_waterlogged.json b/tests/decoration/copper_grates/copper_grate_placed_in_water_source_is_waterlogged.json deleted file mode 100644 index e622ab4..0000000 --- a/tests/decoration/copper_grates/copper_grate_placed_in_water_source_is_waterlogged.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_placed_in_water_source_is_waterlogged", - "description": "A copper grate placed by a player into a water source block becomes waterlogged (getStateForPlacement sets waterlogged when the replaced fluid is water).", - "tags": ["decoration", "copper-grate", "placement", "waterlogging", "water", "block-state", "player"], - "minecraftIds": ["minecraft:copper_grate", "minecraft:water", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 1, 1] ] - }, - "player": {"game_mode": "Survival"}, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [ 0, 0, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone"} }, - { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone"} }, - { "pos": [ 0, 1, 0], "block": {"id": "minecraft:water"} } - ] - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:water"} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact", "item": "minecraft:copper_grate"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": true} }, - { "is": "empty" , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_pushed_by_piston_loses_waterlogged.json b/tests/decoration/copper_grates/copper_grate_pushed_by_piston_loses_waterlogged.json deleted file mode 100644 index 81ee763..0000000 --- a/tests/decoration/copper_grates/copper_grate_pushed_by_piston_loses_waterlogged.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_pushed_by_piston_loses_waterlogged", - "description": "An extending piston pushes a waterlogged copper grate one block (normal push reaction) but PistonMovingBlockEntity clears waterlogged when the moved block is placed, so the grate arrives at its new position with waterlogged=false.", - "tags": ["decoration", "copper-grate", "piston", "push-reaction", "waterlogging", "redstone"], - "minecraftIds": ["minecraft:copper_grate", "minecraft:piston"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 2, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:piston", "facing": "east", "extended": "false"} }, - { "pos": [1, 1, 0], "block": {"id": "minecraft:copper_grate", "waterlogged": true} } - ] - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": "false"} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": true} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} } - ] - }, - { "at": 2, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:redstone_block"} }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": "true"} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east", "type": "normal"} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": false} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_survival_placement.json b/tests/decoration/copper_grates/copper_grate_survival_placement.json deleted file mode 100644 index a4e2421..0000000 --- a/tests/decoration/copper_grates/copper_grate_survival_placement.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_survival_placement", - "description": "A player using a copper grate on top of stone places it with waterlogged=false (WaterloggedTransparentBlock.getStateForPlacement) and consumes the item.", - "tags": ["decoration", "copper-grate", "placement", "block-state", "player"], - "minecraftIds": ["minecraft:copper_grate", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "player": {"game_mode": "Survival"}, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact", "item": "minecraft:copper_grate"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_grate", "waterlogged": false} }, - { "is": "empty" , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/copper_grates/copper_grate_waterlogged_water_stays_contained.json b/tests/decoration/copper_grates/copper_grate_waterlogged_water_stays_contained.json deleted file mode 100644 index 90ee758..0000000 --- a/tests/decoration/copper_grates/copper_grate_waterlogged_water_stays_contained.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_grate_waterlogged_water_stays_contained", - "description": "A waterlogged copper grate does not release water into adjacent air even after a player placement next to it triggers a fluid tick, because its full-block collision shape stops FlowingFluid.canPassThroughWall; a waterlogged bottom slab in an identical walled pocket is the control and does spread.", - "tags": ["decoration", "copper-grate", "waterlogging", "water", "fluid", "block-state", "player"], - "minecraftIds": ["minecraft:copper_grate", "minecraft:oak_slab", "minecraft:water", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-2, 0, -2], [10, 3, 2] ] - }, - "player": {"game_mode": "Survival"}, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-2, 0, -2], [2, 1, 2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [6, 0, -2], [10, 1, 2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 1, -1], [1, 1, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 0, - "do": "fill", - "region": [ [7, 1, -1], [9, 1, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:copper_grate", "waterlogged": true } }, - { "pos": [8, 1, 0], "block": {"id": "minecraft:oak_slab" , "waterlogged": true, "type": "bottom"} } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, - {"at": 2, "do": "interact", "item": "minecraft:stone"}, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [8.5, 4, 0.5], "rot": [0, 90] }, - {"at": 3, "do": "interact", "item": "minecraft:stone"}, - { - "at": 17, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0] , "is": {"id": "minecraft:stone"} }, - { "pos": [8, 2, 0] , "is": {"id": "minecraft:stone"} }, - { "pos": [8, 1, 0] , "is": {"id": "minecraft:oak_slab", "type": "bottom", "waterlogged": true} }, - { "pos": [9, 1, 0] , "is": {"id": "minecraft:water", "level": 1} }, - { "pos": [7, 1, 0] , "is": {"id": "minecraft:water", "level": 1} }, - { "pos": [8, 1, 1] , "is": {"id": "minecraft:water", "level": 1} }, - { "pos": [8, 1, -1], "is": {"id": "minecraft:water", "level": 1} }, - { "pos": [0, 1, 0] , "is": {"id": "minecraft:copper_grate", "waterlogged": true} }, - { "pos": [1, 1, 0] , "is": {"id": "minecraft:air"} }, - { "pos": [-1, 1, 0], "is": {"id": "minecraft:air"} }, - { "pos": [0, 1, 1] , "is": {"id": "minecraft:air"} }, - { "pos": [0, 1, -1], "is": {"id": "minecraft:air"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/crafting_table/crafting_table_burns_as_furnace_fuel.json b/tests/decoration/crafting_table/crafting_table_burns_as_furnace_fuel.json deleted file mode 100644 index e9ea41c..0000000 --- a/tests/decoration/crafting_table/crafting_table_burns_as_furnace_fuel.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "crafting_table_burns_as_furnace_fuel", - "description": "A crafting table in a furnace's fuel slot is consumed as fuel with a burn time of 300 ticks (1.5 base units) and lights the furnace while it smelts raw beef.", - "tags": ["decoration", "crafting_table", "furnace", "fuel", "block-entity"], - "minecraftIds": ["minecraft:crafting_table", "minecraft:furnace", "minecraft:beef"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { - "at": 0, - "do": "place", - "pos": [0, 1, 0], - "block": { - "id": "minecraft:furnace", - "facing": "north", - "lit": false, - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:beef\"}, {Slot: 1b, count: 1, id: \"minecraft:crafting_table\"}]" - } - } - }, - { - "at": 3, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": { "id": "minecraft:furnace", "lit": true, "nbt": {"lit_total_time": "300s"} } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/deepslate/deepslate_explosion_drops_cobbled_deepslate.json b/tests/decoration/deepslate/deepslate_explosion_drops_cobbled_deepslate.json deleted file mode 100644 index c4105d2..0000000 --- a/tests/decoration/deepslate/deepslate_explosion_drops_cobbled_deepslate.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "deepslate_explosion_drops_cobbled_deepslate", - "description": "A deepslate block destroyed by an explosion becomes air and drops a single cobbled deepslate item rather than deepslate.", - "tags": ["decoration", "deepslate", "drops", "explosion", "item"], - "minecraftIds": ["minecraft:deepslate", "minecraft:cobbled_deepslate", "minecraft:tnt", "minecraft:item"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-4, 0, -4], [4, 10, 4] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs" : false, - "minecraft:advance_time" : false, - "minecraft:advance_weather" : false, - "minecraft:tnt_explosion_drop_decay": false - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 8, 0], "block": {"id": "minecraft:deepslate"} }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 8, 0], "is": {"id": "minecraft:deepslate"} }, - { "is": "minecraft:item" , "exists": false } - ] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [0.5, 9, 0.5], - "fuse": 1 - }, - { - "at": 8, - "do": "assert", - "checks": [ - { "pos": [0, 8, 0], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "count": 1, "Item.id": "minecraft:cobbled_deepslate", "Item.count": 1} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/end_rods/end_rod_base_click_not_reversed.json b/tests/decoration/end_rods/end_rod_base_click_not_reversed.json deleted file mode 100644 index 12c35de..0000000 --- a/tests/decoration/end_rods/end_rod_base_click_not_reversed.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "end_rod_base_click_not_reversed", - "description": "Clicking the base end of an end rod (the face opposite its facing) places a new rod facing the clicked face, so the two rods point away from each other.", - "tags": ["decoration", "end-rod", "placement", "block-state", "player"], - "minecraftIds": ["minecraft:end_rod"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [5, 2, 1] ] - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:end_rod", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:end_rod", "facing": "up" } }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:end_rod", "facing": "down"} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, -2, 0.5], "rot": [0, -90] }, - {"at": 1, "do": "interact"}, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 4, 0.5], "rot": [0, 90] }, - {"at": 2, "do": "interact"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:end_rod", "facing": "down"} }, - { "pos": [4, 2, 0], "is": {"id": "minecraft:end_rod", "facing": "up"} }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:end_rod", "facing": "up"} }, - { "pos": [4, 1, 0], "is": {"id": "minecraft:end_rod", "facing": "down"} }, - { "is": {"id": "minecraft:air", "count": 0} , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/end_rods/end_rod_explosion_drops_itself.json b/tests/decoration/end_rods/end_rod_explosion_drops_itself.json deleted file mode 100644 index 44df096..0000000 --- a/tests/decoration/end_rods/end_rod_explosion_drops_itself.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "end_rod_explosion_drops_itself", - "description": "An exploding TNT next to an end rod destroys it and the loot table drops exactly one end rod item.", - "tags": ["decoration", "end-rod", "explosion", "drops", "loot-table"], - "minecraftIds": ["minecraft:end_rod", "minecraft:tnt", "minecraft:obsidian", "minecraft:item"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-2, 0, -2], [4, 3, 2] ] - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-2, 0, -2], [4, 0, 2] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:end_rod", "facing": "up"} }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [1, 1, 0], "is": {"id": "minecraft:end_rod", "facing": "up"} }, - { "is": "minecraft:item" , "exists": false } - ] - }, - { - "at": 1, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [2.5, 1, 0.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 6, - "do": "assert", - "checks": [ - { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "count": 1, "Item.id": "minecraft:end_rod", "Item.count": 1} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/end_rods/end_rod_pushed_by_piston.json b/tests/decoration/end_rods/end_rod_pushed_by_piston.json deleted file mode 100644 index 6b032bf..0000000 --- a/tests/decoration/end_rods/end_rod_pushed_by_piston.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "end_rod_pushed_by_piston", - "description": "A piston pushes an end rod one block forward (normal push reaction) and the rod keeps its facing, whether it lies across or along the push axis.", - "tags": ["decoration", "end-rod", "piston", "push-reaction"], - "minecraftIds": ["minecraft:end_rod", "minecraft:piston", "minecraft:redstone_block", "minecraft:item"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [3, 2, 2] ] - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:piston" , "facing": "east" , "extended": false} }, - { "pos": [1, 1, 0], "block": {"id": "minecraft:end_rod", "facing": "north" } }, - { "pos": [0, 1, 2], "block": {"id": "minecraft:piston" , "facing": "east" , "extended": false} }, - { "pos": [1, 1, 2], "block": {"id": "minecraft:end_rod", "facing": "east" } } - ] - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [1, 1, 0], "is": {"id": "minecraft:end_rod", "facing": "north"} }, - { "pos": [1, 1, 2], "is": {"id": "minecraft:end_rod", "facing": "east" } } - ] - }, - { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:redstone_block"} }, - { "at": 2, "do": "place", "pos": [0, 2, 2], "block": {"id": "minecraft:redstone_block"} }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:piston", "facing": "east", "extended": true} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east"} } , - { "pos": [2, 1, 0], "is": {"id": "minecraft:end_rod", "facing": "north"} } , - { "pos": [1, 1, 2], "is": {"id": "minecraft:piston_head", "facing": "east"} } , - { "pos": [2, 1, 2], "is": {"id": "minecraft:end_rod", "facing": "east"} } , - {"is": "minecraft:item", "exists": false} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/end_rods/end_rod_side_click_not_reversed.json b/tests/decoration/end_rods/end_rod_side_click_not_reversed.json deleted file mode 100644 index dbbf3a2..0000000 --- a/tests/decoration/end_rods/end_rod_side_click_not_reversed.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "end_rod_side_click_not_reversed", - "description": "Clicking a face of an end rod perpendicular to its axis places a new rod facing the clicked face; the reversal only applies when the existing rod faces the clicked face.", - "tags": ["decoration", "end-rod", "placement", "block-state", "player"], - "minecraftIds": ["minecraft:end_rod"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [9, 2, 9] ] - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:end_rod", "count": 4} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:end_rod", "facing": "up" } }, - { "pos": [8, 1, 0], "block": {"id": "minecraft:end_rod", "facing": "up" } }, - { "pos": [0, 1, 8], "block": {"id": "minecraft:end_rod", "facing": "east" } }, - { "pos": [8, 1, 8], "block": {"id": "minecraft:end_rod", "facing": "north"} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, -3.5], "rot": [0, 0] }, - {"at": 1, "do": "interact"}, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [11.5, 0, 0.5], "rot": [90, 0] }, - {"at": 2, "do": "interact"}, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 8.5], "rot": [0, 90] }, - {"at": 3, "do": "interact"}, - { "at": 4, "do": "tp", "entity_alias": "player", "pos": [8.5, -2, 8.5], "rot": [0, -90] }, - {"at": 4, "do": "interact"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 1, -1], "is": {"id": "minecraft:end_rod", "facing": "north"} }, - { "pos": [9, 1, 0] , "is": {"id": "minecraft:end_rod", "facing": "east"} }, - { "pos": [0, 2, 8] , "is": {"id": "minecraft:end_rod", "facing": "up"} }, - { "pos": [8, 0, 8] , "is": {"id": "minecraft:end_rod", "facing": "down"} }, - { "pos": [0, 1, 0] , "is": {"id": "minecraft:end_rod", "facing": "up"} }, - { "pos": [8, 1, 0] , "is": {"id": "minecraft:end_rod", "facing": "up"} }, - { "pos": [0, 1, 8] , "is": {"id": "minecraft:end_rod", "facing": "east"} }, - { "pos": [8, 1, 8] , "is": {"id": "minecraft:end_rod", "facing": "north"} }, - { "is": {"id": "minecraft:air", "count": 0} , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/end_rods/end_rod_washed_away_by_water.json b/tests/decoration/end_rods/end_rod_washed_away_by_water.json deleted file mode 100644 index 6d79877..0000000 --- a/tests/decoration/end_rods/end_rod_washed_away_by_water.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "end_rod_washed_away_by_water", - "description": "Flowing water replaces an end rod because the rod is registered non-solid (forceSolidOff), dropping it as one end rod item.", - "tags": ["decoration", "end-rod", "fluid", "water", "drops"], - "minecraftIds": ["minecraft:end_rod", "minecraft:water", "minecraft:stone", "minecraft:item"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 2, 1] ] - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [-1, 1, -1], "block": {"id": "minecraft:stone" } }, - { "pos": [-1, 1, 1], "block": {"id": "minecraft:stone" } }, - { "pos": [ 0, 1, -1], "block": {"id": "minecraft:stone" } }, - { "pos": [ 0, 1, 1], "block": {"id": "minecraft:stone" } }, - { "pos": [ 1, 1, -1], "block": {"id": "minecraft:stone" } }, - { "pos": [ 1, 1, 1], "block": {"id": "minecraft:stone" } }, - { "pos": [ 2, 1, -1], "block": {"id": "minecraft:stone" } }, - { "pos": [ 2, 1, 1], "block": {"id": "minecraft:stone" } }, - { "pos": [ 3, 1, -1], "block": {"id": "minecraft:stone" } }, - { "pos": [ 3, 1, 1], "block": {"id": "minecraft:stone" } }, - { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [ 3, 1, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [ 1, 1, 0], "block": {"id": "minecraft:end_rod", "facing": "up"} } - ] - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [1, 1, 0], "is": {"id": "minecraft:end_rod", "facing": "up"} }, - { "is": "minecraft:item" , "exists": false } - ] - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, - { - "at": 15, - "do": "assert", - "checks": [ - { "pos": [1, 1, 0], "is": {"id": "minecraft:water", "level": 1} } , - {"is": "minecraft:item", "count": 1, "Item.id": "minecraft:end_rod", "Item.count": 1} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/flower_pots/potted_closed_eyeblossom_opens_at_night.json b/tests/decoration/flower_pots/potted_closed_eyeblossom_opens_at_night.json deleted file mode 100644 index ee34b66..0000000 --- a/tests/decoration/flower_pots/potted_closed_eyeblossom_opens_at_night.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "potted_closed_eyeblossom_opens_at_night", - "description": "At midnight (inside the eyeblossom open window) with a very high random tick speed, a potted closed eyeblossom random-ticks into a potted open eyeblossom. Note: flintcli does not reset random_tick_speed after the test.", - "tags": ["decoration", "flower-pot", "eyeblossom", "random-tick", "time", "modifies-gamerule"], - "minecraftIds": ["minecraft:potted_open_eyeblossom", "minecraft:potted_closed_eyeblossom", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "world": { - "time": "minecraft:midnight", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:potted_closed_eyeblossom"} }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_open_eyeblossom"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/flower_pots/potted_closed_eyeblossom_stays_closed_in_daytime.json b/tests/decoration/flower_pots/potted_closed_eyeblossom_stays_closed_in_daytime.json deleted file mode 100644 index fba3d8b..0000000 --- a/tests/decoration/flower_pots/potted_closed_eyeblossom_stays_closed_in_daytime.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "potted_closed_eyeblossom_stays_closed_in_daytime", - "description": "At daytime (outside the eyeblossom open window) with a very high random tick speed, a potted closed eyeblossom stays closed. Note: flintcli does not reset random_tick_speed after the test.", - "tags": ["decoration", "flower-pot", "eyeblossom", "random-tick", "time", "modifies-gamerule"], - "minecraftIds": ["minecraft:potted_open_eyeblossom", "minecraft:potted_closed_eyeblossom", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "world": { - "time": "minecraft:day", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:potted_closed_eyeblossom"} }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_closed_eyeblossom"} } - ] - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_closed_eyeblossom"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/flower_pots/potted_open_eyeblossom_closes_in_daytime.json b/tests/decoration/flower_pots/potted_open_eyeblossom_closes_in_daytime.json deleted file mode 100644 index 6bb4b2b..0000000 --- a/tests/decoration/flower_pots/potted_open_eyeblossom_closes_in_daytime.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "potted_open_eyeblossom_closes_in_daytime", - "description": "At daytime (outside the eyeblossom open window) with a very high random tick speed, a potted open eyeblossom random-ticks into a potted closed eyeblossom. Note: flintcli does not reset random_tick_speed after the test.", - "tags": ["decoration", "flower-pot", "eyeblossom", "random-tick", "time", "modifies-gamerule"], - "minecraftIds": ["minecraft:potted_open_eyeblossom", "minecraft:potted_closed_eyeblossom", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "world": { - "time": "minecraft:day", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:potted_open_eyeblossom"} }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_closed_eyeblossom"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/flower_pots/potted_open_eyeblossom_stays_open_at_night.json b/tests/decoration/flower_pots/potted_open_eyeblossom_stays_open_at_night.json deleted file mode 100644 index 81ab21d..0000000 --- a/tests/decoration/flower_pots/potted_open_eyeblossom_stays_open_at_night.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "potted_open_eyeblossom_stays_open_at_night", - "description": "At midnight (inside the eyeblossom open window) with a very high random tick speed, a potted open eyeblossom stays open. Note: flintcli does not reset random_tick_speed after the test.", - "tags": ["decoration", "flower-pot", "eyeblossom", "random-tick", "time", "modifies-gamerule"], - "minecraftIds": ["minecraft:potted_open_eyeblossom", "minecraft:potted_closed_eyeblossom", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "world": { - "time": "minecraft:midnight", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:potted_open_eyeblossom"} }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_open_eyeblossom"} } - ] - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:potted_open_eyeblossom"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/frosted_ice/frosted_ice_ages_and_melts_in_sky_light.json b/tests/decoration/frosted_ice/frosted_ice_ages_and_melts_in_sky_light.json deleted file mode 100644 index 84dc5df..0000000 --- a/tests/decoration/frosted_ice/frosted_ice_ages_and_melts_in_sky_light.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "frosted_ice_ages_and_melts_in_sky_light", - "description": "Frosted ice uses the highest of sky and block light. Time is set to noon (6000). An inverted daylight detector outputs 15 minus the effective sky light; power 0-3 confirms effective sky light of at least 12 (rain darkens the sky by 3), so the frosted ice, open to the sky in a stone pit, sees at least 11 (sky light loses 1 entering it). That is above 11 - age - 1 at every age. A lone block always has fewer than 4 frosted neighbours, so each scheduled tick ages it by 1 and at age 3 it melts into a water source. Every age change runs onPlace again, which schedules the next tick 60-120 ticks later; the 20-40 tick reschedule in tick() is dropped as a duplicate. So the 4 steps take 240-480 ticks: age 0 until at least +60, age 1-2 at +121, not yet water at +239, water by +481.", - "tags": ["frosted-ice", "melting", "scheduled-tick", "light", "sky-light", "block-state"], - "minecraftIds": ["minecraft:frosted_ice", "minecraft:water", "minecraft:daylight_detector"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 2, 1] ] - }, - "world": { - "time": "6000", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 3 - }, - "weather": "clear" - } - }, - "timeline": [ - { - "at": 0, - "do": "assert", - "checks": [ {"time": 6000} ] - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 1, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [2, 2, 0], "block": {"id": "minecraft:daylight_detector", "inverted": true} }, - { - "at": 25, - "do": "assert", - "checks": [ - { - "pos": [2, 2, 0], - "is": [ - {"id": "minecraft:daylight_detector", "power": 0}, - {"id": "minecraft:daylight_detector", "power": 1}, - {"id": "minecraft:daylight_detector", "power": 2}, - {"id": "minecraft:daylight_detector", "power": 3} - ] - } - ] - }, - { "at": 25, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:frosted_ice", "age": 0} }, - { - "at": 26, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} } - ] - }, - { - "at": 84, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} } - ] - }, - { - "at": 146, - "do": "assert", - "checks": [ - { - "pos": [ 0 , 1 , 0 ], - "is" : [ {"id": "minecraft:frosted_ice", "age": 1}, {"id": "minecraft:frosted_ice", "age": 2} ] - } - ] - }, - { - "at": 263, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": [ - {"id": "minecraft:frosted_ice", "age": 1}, - {"id": "minecraft:frosted_ice", "age": 2}, - {"id": "minecraft:frosted_ice", "age": 3} - ] - } - ] - }, - { - "at": 507, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, - { - "pos": [2, 2, 0], - "is": [ - {"id": "minecraft:daylight_detector", "power": 0}, - {"id": "minecraft:daylight_detector", "power": 1}, - {"id": "minecraft:daylight_detector", "power": 2}, - {"id": "minecraft:daylight_detector", "power": 3} - ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/frosted_ice/frosted_ice_ignores_other_neighbor_changes.json b/tests/decoration/frosted_ice/frosted_ice_ignores_other_neighbor_changes.json deleted file mode 100644 index d507aa9..0000000 --- a/tests/decoration/frosted_ice/frosted_ice_ignores_other_neighbor_changes.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "frosted_ice_ignores_other_neighbor_changes", - "description": "Everything is sealed in stone, so there is no light and frosted ice never ages or melts on its own. Flint places blocks with /setblock and /fill, which notify neighbours with the new block (ServerLevel.updateNeighboursOnBlockSet), while a melting block notifies its neighbours with the old block, frosted ice. Frosted ice only reacts to a neighbour update that comes from frosted ice. In a 2x2 square filled at once, removing one corner with /setblock air notifies with air, so the two blocks next to it stay even though each now has only 1 frosted neighbour. Placing stone into the gap notifies with stone, and they still stay.", - "tags": ["frosted-ice", "neighbor-update", "block-update"], - "minecraftIds": ["minecraft:frosted_ice"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [2, 2, 2] ] - }, - "world": { - "time": "6000", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 3 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [2, 2, 2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [0, 1, 0], [1, 1, 1] ], - "with": {"id": "minecraft:frosted_ice", "age": 0} - }, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [0, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [1, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } - ] - }, - { "at": 5, "do": "remove", "pos": [1, 1, 1] }, - { - "at": 6, - "do": "assert", - "checks": [ - { "pos": [1, 1, 1], "is": {"id": "minecraft:air" } }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [0, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } - ] - }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [0, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } - ] - }, - { "at": 10, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:stone"} }, - { - "at": 11, - "do": "assert", - "checks": [ - { "pos": [1, 1, 1], "is": {"id": "minecraft:stone" } }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [0, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } - ] - }, - { - "at": 30, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [0, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/frosted_ice/frosted_ice_max_age_melts_on_first_tick.json b/tests/decoration/frosted_ice/frosted_ice_max_age_melts_on_first_tick.json deleted file mode 100644 index 32211f4..0000000 --- a/tests/decoration/frosted_ice/frosted_ice_max_age_melts_on_first_tick.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "frosted_ice_max_age_melts_on_first_tick", - "description": "Frosted ice placed at age 3 melts into a water source on its first scheduled tick (60-120 ticks after placement; flint ticks can lag the game tick by one, hence the margin), because at age 3 the next step is melting instead of ageing. Time is set to noon (6000); an inverted daylight detector at power 0-3 confirms effective sky light of at least 12, so the ice in an open stone pit sees at least 11, above the age-3 threshold of 11 - 3 - 1 = 7.", - "tags": ["frosted-ice", "melting", "scheduled-tick", "light", "sky-light", "block-state"], - "minecraftIds": ["minecraft:frosted_ice", "minecraft:water", "minecraft:daylight_detector"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 2, 1] ] - }, - "world": { - "time": "6000", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 3 - }, - "weather": "clear" - } - }, - "timeline": [ - { - "at": 0, - "do": "assert", - "checks": [ {"time": 6000} ] - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 1, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [2, 2, 0], "block": {"id": "minecraft:daylight_detector", "inverted": true} }, - { - "at": 25, - "do": "assert", - "checks": [ - { - "pos": [2, 2, 0], - "is": [ - {"id": "minecraft:daylight_detector", "power": 0}, - {"id": "minecraft:daylight_detector", "power": 1}, - {"id": "minecraft:daylight_detector", "power": 2}, - {"id": "minecraft:daylight_detector", "power": 3} - ] - } - ] - }, - { "at": 25, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:frosted_ice", "age": 3} }, - { - "at": 80, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 3} } - ] - }, - { - "at": 147, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, - { - "pos": [2, 2, 0], - "is": [ - {"id": "minecraft:daylight_detector", "power": 0}, - {"id": "minecraft:daylight_detector", "power": 1}, - {"id": "minecraft:daylight_detector", "power": 2}, - {"id": "minecraft:daylight_detector", "power": 3} - ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/frosted_ice/frosted_ice_melt_chain_reaction.json b/tests/decoration/frosted_ice/frosted_ice_melt_chain_reaction.json deleted file mode 100644 index ad89b50..0000000 --- a/tests/decoration/frosted_ice/frosted_ice_melt_chain_reaction.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "frosted_ice_melt_chain_reaction", - "description": "Everything is sealed in stone, so there is no light and frosted ice never ages or melts on its own. Flint places blocks with /setblock and /fill, which notify neighbours with the new block (ServerLevel.updateNeighboursOnBlockSet), while a melting block notifies its neighbours with the old block, frosted ice. Filling a straight line of five frosted ice blocks at once notifies every block with frosted ice. The two ends have only 1 frosted neighbour and melt. Each melt notifies the next block in the line, which by then has only 1 frosted neighbour, so the melting runs along the whole line in the same tick, even through the middle blocks that had 2 neighbours when they were placed.", - "tags": ["frosted-ice", "melting", "neighbor-update", "chain-reaction"], - "minecraftIds": ["minecraft:frosted_ice", "minecraft:water"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [5, 2, 1] ] - }, - "world": { - "time": "6000", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 3 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [5, 2, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [0, 1, 0], [4, 1, 0] ], - "with": {"id": "minecraft:frosted_ice", "age": 0} - }, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, - { "pos": [3, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, - { "pos": [4, 1, 0], "is": {"id": "minecraft:water", "level": 0} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/frosted_ice/frosted_ice_melts_when_frosted_ice_placed_next_to_it.json b/tests/decoration/frosted_ice/frosted_ice_melts_when_frosted_ice_placed_next_to_it.json deleted file mode 100644 index 7736c6c..0000000 --- a/tests/decoration/frosted_ice/frosted_ice_melts_when_frosted_ice_placed_next_to_it.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "frosted_ice_melts_when_frosted_ice_placed_next_to_it", - "description": "Everything is sealed in stone, so there is no light and frosted ice never ages or melts on its own. Flint places blocks with /setblock and /fill, which notify neighbours with the new block (ServerLevel.updateNeighboursOnBlockSet), while a melting block notifies its neighbours with the old block, frosted ice. Frosted ice melts straight away when a neighbour update comes from frosted ice and it has fewer than 2 frosted neighbours. A 2x2 square is filled at once (every block has 2 frosted neighbours, so it stays), one corner is removed, and a lone frosted ice block is placed next to the gap. Placing frosted ice back into the gap notifies the lone block, which has 1 frosted neighbour and melts into a water source. The refilled corner and the rest of the square have 2 frosted neighbours each, so they stay.", - "tags": ["frosted-ice", "melting", "neighbor-update"], - "minecraftIds": ["minecraft:frosted_ice", "minecraft:water"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 2, 2] ] - }, - "world": { - "time": "6000", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 3 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 2, 2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [1, 1, 0], [2, 1, 1] ], - "with": {"id": "minecraft:frosted_ice", "age": 0} - }, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [1, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [2, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } - ] - }, - { "at": 3, "do": "remove", "pos": [1, 1, 0] }, - { "at": 5, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:frosted_ice", "age": 0} }, - { - "at": 8, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:air" } }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [1, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [2, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } - ] - }, - { "at": 8, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:frosted_ice", "age": 0} }, - { - "at": 9, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:water" , "level": 0 } }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [1, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [2, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/frosted_ice/frosted_ice_stable_at_midnight.json b/tests/decoration/frosted_ice/frosted_ice_stable_at_midnight.json deleted file mode 100644 index bc88da2..0000000 --- a/tests/decoration/frosted_ice/frosted_ice_stable_at_midnight.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "frosted_ice_stable_at_midnight", - "description": "At midnight (18000) the sky darkens by 11, so frosted ice open to the sky sees too little light to age or melt. An inverted daylight detector at power 11-15 confirms effective sky light of 4 or less, so the ice in an open stone pit sees 3 or less, below 11 - 0 - 1 = 10 at age 0. It stays at age 0 for 240 ticks.", - "tags": ["frosted-ice", "scheduled-tick", "light", "sky-light", "night", "block-state"], - "minecraftIds": ["minecraft:frosted_ice", "minecraft:daylight_detector"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 2, 1] ] - }, - "world": { - "time": "18000", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 3 - }, - "weather": "clear" - } - }, - "timeline": [ - { - "at": 0, - "do": "assert", - "checks": [ {"time": 18000} ] - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 1, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [2, 2, 0], "block": {"id": "minecraft:daylight_detector", "inverted": true} }, - { - "at": 25, - "do": "assert", - "checks": [ - { - "pos": [2, 2, 0], - "is": [ - {"id": "minecraft:daylight_detector", "power": 11}, - {"id": "minecraft:daylight_detector", "power": 12}, - {"id": "minecraft:daylight_detector", "power": 13}, - {"id": "minecraft:daylight_detector", "power": 14}, - {"id": "minecraft:daylight_detector", "power": 15} - ] - } - ] - }, - { "at": 25, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:frosted_ice", "age": 0} }, - { - "at": 145, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} } - ] - }, - { - "at": 265, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { - "pos": [2, 2, 0], - "is": [ - {"id": "minecraft:daylight_detector", "power": 11}, - {"id": "minecraft:daylight_detector", "power": 12}, - {"id": "minecraft:daylight_detector", "power": 13}, - {"id": "minecraft:daylight_detector", "power": 14}, - {"id": "minecraft:daylight_detector", "power": 15} - ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/frosted_ice/frosted_ice_stable_in_darkness.json b/tests/decoration/frosted_ice/frosted_ice_stable_in_darkness.json deleted file mode 100644 index 11c1947..0000000 --- a/tests/decoration/frosted_ice/frosted_ice_stable_in_darkness.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "frosted_ice_stable_in_darkness", - "description": "Frosted ice sealed in stone gets no sky or block light, so it never passes the light check (light must be above 11 - age - 1 = 10 at age 0). Even at noon it keeps rescheduling its tick without ageing and stays at age 0 for 240 ticks.", - "tags": ["frosted-ice", "scheduled-tick", "light", "darkness", "block-state"], - "minecraftIds": ["minecraft:frosted_ice"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 2, 1] ] - }, - "world": { - "time": "6000", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 3 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [1, 2, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:frosted_ice", "age": 0} }, - { - "at": 121, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} } - ] - }, - { - "at": 241, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/frosted_ice/frosted_ice_survives_with_two_neighbors.json b/tests/decoration/frosted_ice/frosted_ice_survives_with_two_neighbors.json deleted file mode 100644 index 29d1b6e..0000000 --- a/tests/decoration/frosted_ice/frosted_ice_survives_with_two_neighbors.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "frosted_ice_survives_with_two_neighbors", - "description": "Everything is sealed in stone, so there is no light and frosted ice never ages or melts on its own. Flint places blocks with /setblock and /fill, which notify neighbours with the new block (ServerLevel.updateNeighboursOnBlockSet), while a melting block notifies its neighbours with the old block, frosted ice. Frosted ice only melts from a frosted-ice neighbour update if it has fewer than 2 frosted neighbours. A 2x2 square filled at once gives every block exactly 2 frosted neighbours, so the whole square stays at age 0. A pair filled at once in a separate stone pocket gives each block only 1, so both melt into water sources.", - "tags": ["frosted-ice", "melting", "neighbor-update", "threshold"], - "minecraftIds": ["minecraft:frosted_ice", "minecraft:water"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [6, 2, 2] ] - }, - "world": { - "time": "6000", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 3 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [6, 2, 2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [0, 1, 0], [1, 1, 1] ], - "with": {"id": "minecraft:frosted_ice", "age": 0} - }, - { - "at": 1, - "do": "fill", - "region": [ [4, 1, 0], [5, 1, 0] ], - "with": {"id": "minecraft:frosted_ice", "age": 0} - }, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0 } }, - { "pos": [0, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0 } }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0 } }, - { "pos": [1, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0 } }, - { "pos": [4, 1, 0], "is": {"id": "minecraft:water" , "level": 0} }, - { "pos": [5, 1, 0], "is": {"id": "minecraft:water" , "level": 0} } - ] - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [0, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:frosted_ice", "age": 0} }, - { "pos": [1, 1, 1], "is": {"id": "minecraft:frosted_ice", "age": 0} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/grindstone/grindstone_explosion_drops_item.json b/tests/decoration/grindstone/grindstone_explosion_drops_item.json deleted file mode 100644 index 23a4f40..0000000 --- a/tests/decoration/grindstone/grindstone_explosion_drops_item.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grindstone_explosion_drops_item", - "description": "A grindstone destroyed by an explosion drops exactly one grindstone item (loot table survives_explosion, no tool required for explosion drops).", - "tags": ["grindstone", "drops", "explosion"], - "minecraftIds": ["minecraft:grindstone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [14, 3, 4] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [8, 0, 0], [14, 0, 4] ], - "with": {"id": "minecraft:obsidian"} - }, - { - "at": 1, - "do": "place", - "pos": [11, 1, 2], - "block": {"id": "minecraft:grindstone", "face": "floor", "facing": "north"} - }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [12.5, 1, 2.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [11, 1, 2], "is": {"id": "minecraft:air"} }, - {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:grindstone", "Item.count": 1} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/hay_block/hay_block_explosion_drops_itself.json b/tests/decoration/hay_block/hay_block_explosion_drops_itself.json deleted file mode 100644 index 84f0070..0000000 --- a/tests/decoration/hay_block/hay_block_explosion_drops_itself.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "hay_block_explosion_drops_itself", - "description": "A hay block destroyed by a TNT explosion drops exactly one hay block item (loot table dropSelf).", - "tags": ["decoration", "hay-block", "drops", "explosion", "tnt", "entity"], - "minecraftIds": ["minecraft:hay_block", "minecraft:obsidian", "minecraft:tnt", "minecraft:item"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [12, 3, 4] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [8, 0, 0], [12, 0, 4] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 1, "do": "place", "pos": [10, 1, 1], "block": {"id": "minecraft:hay_block", "axis": "y"} }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [10.5, 1, 2.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [10, 1, 1], "is": {"id": "minecraft:air"} }, - { - "is": "minecraft:item", - "exists": true, - "count": 1, - "Item.id": "minecraft:hay_block", - "Item.count": "1" - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/heavy_core/heavy_core_survives_tnt_explosion.json b/tests/decoration/heavy_core/heavy_core_survives_tnt_explosion.json deleted file mode 100644 index d787d38..0000000 --- a/tests/decoration/heavy_core/heavy_core_survives_tnt_explosion.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "heavy_core_survives_tnt_explosion", - "description": "A heavy core next to exploding TNT survives because of its explosion resistance, while a dirt block on the other side of the TNT is destroyed.", - "tags": ["decoration", "heavy_core", "explosion", "resistance"], - "minecraftIds": ["minecraft:heavy_core", "minecraft:dirt", "minecraft:obsidian", "minecraft:tnt"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 2, 1] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:obsidian"} - }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:heavy_core"} }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:dirt" } } - ] - }, - { - "at": 1, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [1.5, 1, 0.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:heavy_core"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/honey_block/tnt_explosion_drops_honey_block.json b/tests/decoration/honey_block/tnt_explosion_drops_honey_block.json deleted file mode 100644 index ef65870..0000000 --- a/tests/decoration/honey_block/tnt_explosion_drops_honey_block.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "tnt_explosion_drops_honey_block", - "description": "A honey block destroyed by a TNT explosion drops exactly one honey block item (its loot table is drop-self).", - "tags": ["decoration", "honey-block", "drops", "explosion"], - "minecraftIds": ["minecraft:honey_block", "minecraft:obsidian", "minecraft:tnt"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [4, 3, 2] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, 0], [4, 0, 2] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 0, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:honey_block"} }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 1.5] }, - { - "at": 1, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [2.5, 1, 1.5], - "fuse": "1s" - }, - { - "at": 35, - "do": "assert", - "checks": [ - { "pos": [1, 1, 1], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:honey_block"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/hyphae/crimson_hyphae_not_fuel.json b/tests/decoration/hyphae/crimson_hyphae_not_fuel.json deleted file mode 100644 index 8eb3ac1..0000000 --- a/tests/decoration/hyphae/crimson_hyphae_not_fuel.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "Crimson Hyphae Not Fuel", - "description": "Crimson hyphae in a furnace fuel slot is not burned, while oak planks in an identical furnace light it.", - "tags": ["hyphae", "fuel", "furnace", "block-entity"], - "minecraftIds": ["minecraft:crimson_hyphae", "minecraft:furnace", "minecraft:raw_iron", "minecraft:oak_planks"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [1, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:crimson_hyphae\"}]" - } - } - }, - { - "pos": [1, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:oak_planks\"}]" - } - } - } - ] - }, - { - "at": 3, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "false", - "nbt": { - "lit_total_time": "0s", - "Items[1].id": "\"minecraft:crimson_hyphae\"", - "Items[1].count": 1 - } - } - }, - { - "pos": [1, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "true", - "nbt": {"lit_total_time": "300s", "Items[0].id": "\"minecraft:raw_iron\""} - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/ice/ice_block_light_threshold.json b/tests/decoration/ice/ice_block_light_threshold.json deleted file mode 100644 index 77346b8..0000000 --- a/tests/decoration/ice/ice_block_light_threshold.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "ice_block_light_threshold", - "description": "Ice melts on a random tick only when block light at its position is greater than 11 - light dampening 1 = 10. Each ice block sits in a stone pit with a light block directly above; light entering ice loses 1 level. A level 11 light block gives block light 10 at the ice and it stays ice; a level 12 light block gives 11 and it melts into a water source. The pits are 4 blocks apart so each light block only affects its own ice. Random tick speed 4096 gives about one random tick per block per game tick.", - "tags": ["ice", "melting", "random-tick", "light", "threshold", "modifies-gamerule"], - "minecraftIds": ["minecraft:ice", "minecraft:water", "minecraft:light"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [5, 2, 1] ] - }, - "world": { - "time": "6000", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [5, 1, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:ice" } }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:ice" } }, - { "pos": [0, 2, 0], "block": {"id": "minecraft:light", "level": 11, "waterlogged": false} }, - { "pos": [4, 2, 0], "block": {"id": "minecraft:light", "level": 12, "waterlogged": false} } - ] - }, - { - "at": 121, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:ice" } }, - { "pos": [4, 1, 0], "is": {"id": "minecraft:water", "level": 0} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/ice/ice_ignores_sky_light.json b/tests/decoration/ice/ice_ignores_sky_light.json deleted file mode 100644 index 014fa6a..0000000 --- a/tests/decoration/ice/ice_ignores_sky_light.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "ice_ignores_sky_light", - "description": "Ice melting only looks at block light (threshold above 11 - light dampening 1 = 10), never sky light. At noon (time 6000) ice under open sky with block light 0 stays ice for 200 ticks at random tick speed 4096. An inverted daylight detector at the same height outputs 15 minus the effective sky light; power 0-3 confirms effective sky light 12-15 there (rain darkens the sky by 3), so the ice block itself sees sky light of at least 11, which would be enough to melt it if sky light counted.", - "tags": ["ice", "melting", "random-tick", "light", "sky-light", "modifies-gamerule"], - "minecraftIds": ["minecraft:ice", "minecraft:daylight_detector"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 1, 1] ] - }, - "world": { - "time": "6000", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "assert", - "checks": [ {"time": 6000} ] - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:ice" } }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:daylight_detector", "inverted": true} } - ] - }, - { - "at": 25, - "do": "assert", - "checks": [ - { - "pos": [2, 1, 0], - "is": [ - {"id": "minecraft:daylight_detector", "power": 0}, - {"id": "minecraft:daylight_detector", "power": 1}, - {"id": "minecraft:daylight_detector", "power": 2}, - {"id": "minecraft:daylight_detector", "power": 3} - ] - }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:ice"} } - ] - }, - { - "at": 201, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:ice"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/ice/ice_melt_water_flows.json b/tests/decoration/ice/ice_melt_water_flows.json deleted file mode 100644 index 17fbf90..0000000 --- a/tests/decoration/ice/ice_melt_water_flows.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "ice_melt_water_flows", - "description": "When ice melts it becomes a water source and notifies itself of the change, so the new water starts flowing straight away. Ice with glowstone above (block light 14) at the closed end of a walled channel 3 blocks long melts. The source stays at level 0 and spreads into the channel as flowing water, level 1 then level 2.", - "tags": ["ice", "melting", "random-tick", "water", "flow", "modifies-gamerule"], - "minecraftIds": ["minecraft:ice", "minecraft:water", "minecraft:glowstone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 2, 1] ] - }, - "world": { - "time": "6000", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 1, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [1, 1, 0], [2, 1, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:ice"} }, - { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:glowstone"} }, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} } - ] - }, - { - "at": 81, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:water", "level": 1} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:water", "level": 2} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/ice/ice_melts_in_block_light.json b/tests/decoration/ice/ice_melts_in_block_light.json deleted file mode 100644 index 94bb096..0000000 --- a/tests/decoration/ice/ice_melts_in_block_light.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "ice_melts_in_block_light", - "description": "Ice with glowstone directly above (block light 14 at the ice, above the threshold of 11 - light dampening 1 = 10) melts into a water source on a random tick. The ice sits in a stone pit so the water stays put. With random tick speed 4096 each block gets about one random tick per game tick, so not melting within 60 ticks is practically impossible.", - "tags": ["ice", "melting", "random-tick", "light", "modifies-gamerule"], - "minecraftIds": ["minecraft:ice", "minecraft:water", "minecraft:glowstone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 2, 1] ] - }, - "world": { - "time": "6000", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [1, 1, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:ice"} }, - { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:glowstone"} }, - { - "at": 61, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:water" , "level": 0} }, - { "pos": [0, 2, 0], "is": {"id": "minecraft:glowstone" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/jack_o_lantern/jack_o_lantern_tnt_explosion_drops_item.json b/tests/decoration/jack_o_lantern/jack_o_lantern_tnt_explosion_drops_item.json deleted file mode 100644 index 48b4dc6..0000000 --- a/tests/decoration/jack_o_lantern/jack_o_lantern_tnt_explosion_drops_item.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "jack_o_lantern_tnt_explosion_drops_item", - "description": "A jack o'lantern destroyed by a TNT explosion drops exactly one jack o'lantern item (its loot table is dropSelf).", - "tags": ["decoration", "jack-o-lantern", "drops", "explosion", "tnt"], - "minecraftIds": ["minecraft:jack_o_lantern", "minecraft:tnt", "minecraft:obsidian"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [3, 3, 2] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, 0], [3, 0, 2] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 1, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:jack_o_lantern", "facing": "north"} }, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [1, 1, 1], "is": {"id": "minecraft:jack_o_lantern"} }, - { "is": "minecraft:item" , "exists": false } - ] - }, - { - "at": 3, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [2.5, 1, 1.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [1, 1, 1], "is": {"id": "minecraft:air"} }, - { - "is": "minecraft:item", - "exists": true, - "count": 1, - "pos": [1.5, 1.5, 1.5], - "position_tolerance": 4, - "Item.id": "minecraft:jack_o_lantern" - } - ] - } - ] -} - diff --git a/tests/decoration/lanterns/exposed_copper_lantern_aging_blocked_by_younger_copper.json b/tests/decoration/lanterns/exposed_copper_lantern_aging_blocked_by_younger_copper.json deleted file mode 100644 index c5f7a06..0000000 --- a/tests/decoration/lanterns/exposed_copper_lantern_aging_blocked_by_younger_copper.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "exposed_copper_lantern_aging_blocked_by_younger_copper", - "description": "ChangeOverTimeBlock.getNextState scans weathering neighbors up to Manhattan distance 4 and refuses to age if any is younger. At random_tick_speed 4096 an exposed copper lantern whose nearest unaffected copper blocks are 3-4 blocks away stays exposed for 200 ticks, while an identical lantern exactly 5 blocks from the copper oxidizes. The copper blocks form a 3x3x3 cluster so they barely age themselves.", - "tags": ["decoration", "lantern", "copper", "oxidation", "random-tick", "edge-case"], - "minecraftIds": [ - "minecraft:exposed_copper_lantern" , - "minecraft:weathered_copper_lantern", - "minecraft:oxidized_copper_lantern" , - "minecraft:copper_block" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-5, 0, -1], [5, 2, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, -1], [2, 2, 1] ], - "with": {"id": "minecraft:copper_block"} - }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [5, 0, 0], "block": {"id": "minecraft:stone"} }, - { - "pos": [5, 1, 0], - "block": {"id": "minecraft:exposed_copper_lantern", "hanging": false, "waterlogged": false} - }, - { "pos": [-5, 0, 0], "block": {"id": "minecraft:stone"} }, - { - "pos": [-5, 1, 0], - "block": {"id": "minecraft:exposed_copper_lantern", "hanging": false, "waterlogged": false} - } - ] - }, - { - "at": 200, - "do": "assert", - "checks": [ - { - "pos": [5, 1, 0], - "is": {"id": "minecraft:exposed_copper_lantern", "hanging": false, "waterlogged": false} - }, - { - "pos": [-5, 1, 0], - "is": [ - {"id": "minecraft:weathered_copper_lantern", "hanging": false, "waterlogged": false}, - {"id": "minecraft:oxidized_copper_lantern" , "hanging": false, "waterlogged": false} - ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/lanterns/exposed_copper_lantern_axe_scrapes.json b/tests/decoration/lanterns/exposed_copper_lantern_axe_scrapes.json deleted file mode 100644 index a7b20f6..0000000 --- a/tests/decoration/lanterns/exposed_copper_lantern_axe_scrapes.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "exposed_copper_lantern_axe_scrapes", - "description": "Using an axe on a hanging, waterlogged exposed copper lantern scrapes it back one stage (WeatheringCopper.getPrevious) to a copper lantern with the same hanging and waterlogged values; the axe is kept.", - "tags": ["decoration", "lantern", "copper", "oxidation", "axe", "block-state", "player"], - "minecraftIds": ["minecraft:exposed_copper_lantern", "minecraft:copper_lantern", "minecraft:iron_axe"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, -3, 0], [0, 2, 0] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, -3, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, - { - "pos": [0, 1, 0], - "block": {"id": "minecraft:exposed_copper_lantern", "hanging": true, "waterlogged": true} - } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, -2, 0.5], "rot": [0, -90] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_lantern", "hanging": true, "waterlogged": true} }, - { "slot": "hotbar1", "is": {"id": "minecraft:iron_axe", "count": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/lanterns/exposed_copper_lantern_honeycomb_waxes.json b/tests/decoration/lanterns/exposed_copper_lantern_honeycomb_waxes.json deleted file mode 100644 index 4ec07c2..0000000 --- a/tests/decoration/lanterns/exposed_copper_lantern_honeycomb_waxes.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "exposed_copper_lantern_honeycomb_waxes", - "description": "Using honeycomb on an exposed copper lantern waxes it (HoneycombItem.WAXABLES) into a waxed exposed copper lantern with the same properties, and the survival player's honeycomb is consumed.", - "tags": ["decoration", "lantern", "copper", "waxed", "honeycomb", "block-state", "player"], - "minecraftIds": [ - "minecraft:exposed_copper_lantern" , - "minecraft:waxed_exposed_copper_lantern", - "minecraft:honeycomb" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 2, 0] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { - "pos": [0, 1, 0], - "block": {"id": "minecraft:exposed_copper_lantern", "hanging": false, "waterlogged": false} - } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": {"id": "minecraft:waxed_exposed_copper_lantern", "hanging": false, "waterlogged": false} - }, - { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} }, - {"slot": "hotbar1", "is": "empty"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/lanterns/exposed_copper_lantern_oxidizes.json b/tests/decoration/lanterns/exposed_copper_lantern_oxidizes.json deleted file mode 100644 index 3e738d1..0000000 --- a/tests/decoration/lanterns/exposed_copper_lantern_oxidizes.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "exposed_copper_lantern_oxidizes", - "description": "With random_tick_speed 4096 and no other copper nearby, a hanging exposed copper lantern ages (WeatheringLanternBlock.randomTick -> changeOverTime) to the next oxidation stage, keeping hanging=true and waterlogged=false.", - "tags": ["decoration", "lantern", "copper", "oxidation", "random-tick", "block-state"], - "minecraftIds": [ - "minecraft:exposed_copper_lantern" , - "minecraft:weathered_copper_lantern", - "minecraft:oxidized_copper_lantern" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, - { - "pos": [0, 0, 0], - "block": {"id": "minecraft:exposed_copper_lantern", "hanging": true, "waterlogged": false} - } - ] - }, - { - "at": 1, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": {"id": "minecraft:exposed_copper_lantern", "hanging": true, "waterlogged": false} - } - ] - }, - { - "at": 200, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": [ - {"id": "minecraft:weathered_copper_lantern", "hanging": true, "waterlogged": false}, - {"id": "minecraft:oxidized_copper_lantern" , "hanging": true, "waterlogged": false} - ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/lanterns/waxed_copper_lantern_axe_removes_wax.json b/tests/decoration/lanterns/waxed_copper_lantern_axe_removes_wax.json deleted file mode 100644 index b8c108b..0000000 --- a/tests/decoration/lanterns/waxed_copper_lantern_axe_removes_wax.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "waxed_copper_lantern_axe_removes_wax", - "description": "Using an axe on a hanging, waterlogged waxed copper lantern removes the wax (HoneycombItem.WAX_OFF_BY_BLOCK) and gives a copper lantern with the same hanging and waterlogged values; the axe is kept.", - "tags": ["decoration", "lantern", "copper", "waxed", "axe", "block-state", "player"], - "minecraftIds": ["minecraft:waxed_copper_lantern", "minecraft:copper_lantern", "minecraft:iron_axe"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, -3, 0], [0, 2, 0] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, -3, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, - { - "pos": [0, 1, 0], - "block": {"id": "minecraft:waxed_copper_lantern", "hanging": true, "waterlogged": true} - } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, -2, 0.5], "rot": [0, -90] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:copper_lantern", "hanging": true, "waterlogged": true} }, - { "slot": "hotbar1", "is": {"id": "minecraft:iron_axe", "count": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/lanterns/waxed_copper_lantern_does_not_oxidize.json b/tests/decoration/lanterns/waxed_copper_lantern_does_not_oxidize.json deleted file mode 100644 index 123e70b..0000000 --- a/tests/decoration/lanterns/waxed_copper_lantern_does_not_oxidize.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "waxed_copper_lantern_does_not_oxidize", - "description": "Waxed copper lanterns are plain LanternBlocks with no random tick, so at random_tick_speed 4096 a waxed copper lantern stays unchanged for 200 ticks while an unwaxed exposed copper lantern next to it oxidizes.", - "tags": ["decoration", "lantern", "copper", "waxed", "oxidation", "random-tick"], - "minecraftIds": [ - "minecraft:waxed_copper_lantern" , - "minecraft:exposed_copper_lantern" , - "minecraft:weathered_copper_lantern", - "minecraft:oxidized_copper_lantern" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [8, 1, 0] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, 0], [8, 0, 0] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { - "pos": [0, 1, 0], - "block": {"id": "minecraft:waxed_copper_lantern", "hanging": false, "waterlogged": false} - }, - { - "pos": [8, 1, 0], - "block": {"id": "minecraft:exposed_copper_lantern", "hanging": false, "waterlogged": false} - } - ] - }, - { - "at": 200, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": {"id": "minecraft:waxed_copper_lantern", "hanging": false, "waterlogged": false} - }, - { - "pos": [8, 1, 0], - "is": [ - {"id": "minecraft:weathered_copper_lantern", "hanging": false, "waterlogged": false}, - {"id": "minecraft:oxidized_copper_lantern" , "hanging": false, "waterlogged": false} - ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/lanterns/waxed_copper_lantern_rejects_honeycomb.json b/tests/decoration/lanterns/waxed_copper_lantern_rejects_honeycomb.json deleted file mode 100644 index 314c21e..0000000 --- a/tests/decoration/lanterns/waxed_copper_lantern_rejects_honeycomb.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "waxed_copper_lantern_rejects_honeycomb", - "description": "Using honeycomb on an already waxed copper lantern does nothing (HoneycombItem.getWaxed finds no mapping): the block is unchanged and the honeycomb is not consumed.", - "tags": ["decoration", "lantern", "copper", "waxed", "honeycomb", "player", "edge-case"], - "minecraftIds": ["minecraft:waxed_copper_lantern", "minecraft:honeycomb"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 2, 0] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { - "pos": [0, 1, 0], - "block": {"id": "minecraft:waxed_copper_lantern", "hanging": false, "waterlogged": false} - } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": {"id": "minecraft:waxed_copper_lantern", "hanging": false, "waterlogged": false} - }, - { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} }, - { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/signs/lava_ignites_hanging_signs.json b/tests/decoration/signs/lava_ignites_hanging_signs.json deleted file mode 100644 index 5bf71fc..0000000 --- a/tests/decoration/signs/lava_ignites_hanging_signs.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "lava_ignites_hanging_signs", - "description": "One lava pool sits directly under an oak hanging sign and a crimson hanging sign; lava sets fire on the floor cell beside the oak sign, which is ignited by lava, and never beside the crimson sign, which is not.", - "tags": ["decoration", "sign", "lava", "fire", "ignite", "random-tick"], - "minecraftIds": ["minecraft:oak_hanging_sign", "minecraft:crimson_hanging_sign", "minecraft:lava"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-4, 0, -2], [4, 4, 2] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-4, 0, -2], [4, 4, 2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-3, 1, -1], [3, 3, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-3, 1, -1], [3, 1, 1] ], - "with": {"id": "minecraft:lava"} - }, - { "at": 0, "do": "place", "pos": [-2, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [-3, 3, 0], "block": {"id": "minecraft:stone"} }, - { - "at": 1, - "do": "place", - "pos": [-3, 2, 0], - "block": {"id": "minecraft:oak_hanging_sign", "rotation": 8, "attached": false} - }, - { "at": 0, "do": "place", "pos": [3, 3, 0], "block": {"id": "minecraft:stone"} }, - { - "at": 1, - "do": "place", - "pos": [3, 2, 0], - "block": {"id": "minecraft:crimson_hanging_sign", "rotation": 8, "attached": false} - }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_hanging_sign" } }, - { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_hanging_sign"} }, - { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } - ] - }, - { - "at": 20, - "do": "assert", - "checks": [ - { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_hanging_sign" } }, - { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_hanging_sign"} }, - { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } - ] - }, - { - "at": 30, - "do": "assert", - "checks": [ - { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_hanging_sign" } }, - { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_hanging_sign"} }, - { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } - ] - }, - { - "at": 20, - "do": "assert", - "checks": [ - { "pos": [-2, 2, 0], "is": {"id": "minecraft:fire"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/signs/lava_ignites_standing_signs.json b/tests/decoration/signs/lava_ignites_standing_signs.json deleted file mode 100644 index 27af157..0000000 --- a/tests/decoration/signs/lava_ignites_standing_signs.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "lava_ignites_standing_signs", - "description": "One lava pool borders the supports of an oak sign and a crimson sign; lava sets fire on the floor cell beside the oak sign, which is ignited by lava, and never beside the crimson sign, which is not.", - "tags": ["decoration", "sign", "lava", "fire", "ignite", "random-tick"], - "minecraftIds": ["minecraft:oak_sign", "minecraft:crimson_sign", "minecraft:lava"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-4, 0, -2], [4, 4, 2] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-4, 0, -2], [4, 4, 2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-3, 1, -1], [3, 3, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-3, 1, -1], [3, 1, 1] ], - "with": {"id": "minecraft:lava"} - }, - { "at": 0, "do": "place", "pos": [-2, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [-3, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [3, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 1, "do": "place", "pos": [-3, 2, 0], "block": {"id": "minecraft:oak_sign", "rotation": 8} }, - { "at": 1, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:crimson_sign", "rotation": 8} }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_sign" } }, - { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_sign"} }, - { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } - ] - }, - { - "at": 20, - "do": "assert", - "checks": [ - { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_sign" } }, - { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_sign"} }, - { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } - ] - }, - { - "at": 30, - "do": "assert", - "checks": [ - { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_sign" } }, - { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_sign"} }, - { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } - ] - }, - { - "at": 20, - "do": "assert", - "checks": [ - { "pos": [-2, 2, 0], "is": {"id": "minecraft:fire"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/signs/lava_ignites_wall_hanging_signs.json b/tests/decoration/signs/lava_ignites_wall_hanging_signs.json deleted file mode 100644 index 34d1486..0000000 --- a/tests/decoration/signs/lava_ignites_wall_hanging_signs.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "lava_ignites_wall_hanging_signs", - "description": "One lava pool sits directly under an oak wall hanging sign and a crimson wall hanging sign; lava sets fire on the floor cell beside the oak sign, which is ignited by lava, and never beside the crimson sign, which is not.", - "tags": ["decoration", "sign", "lava", "fire", "ignite", "random-tick"], - "minecraftIds": ["minecraft:oak_wall_hanging_sign", "minecraft:crimson_wall_hanging_sign", "minecraft:lava"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-4, 0, -2], [4, 4, 2] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-4, 0, -2], [4, 4, 2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-3, 1, -1], [3, 3, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-3, 1, -1], [3, 1, 1] ], - "with": {"id": "minecraft:lava"} - }, - { "at": 0, "do": "place", "pos": [-2, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:stone"} }, - { - "at": 1, - "do": "place", - "pos": [-3, 2, 0], - "block": {"id": "minecraft:oak_wall_hanging_sign", "facing": "north"} - }, - { - "at": 1, - "do": "place", - "pos": [3, 2, 0], - "block": {"id": "minecraft:crimson_wall_hanging_sign", "facing": "north"} - }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_wall_hanging_sign" } }, - { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_wall_hanging_sign"} }, - { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } - ] - }, - { - "at": 20, - "do": "assert", - "checks": [ - { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_wall_hanging_sign" } }, - { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_wall_hanging_sign"} }, - { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } - ] - }, - { - "at": 30, - "do": "assert", - "checks": [ - { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_wall_hanging_sign" } }, - { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_wall_hanging_sign"} }, - { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } - ] - }, - { - "at": 20, - "do": "assert", - "checks": [ - { "pos": [-2, 2, 0], "is": {"id": "minecraft:fire"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/signs/lava_ignites_wall_signs.json b/tests/decoration/signs/lava_ignites_wall_signs.json deleted file mode 100644 index d22f3e4..0000000 --- a/tests/decoration/signs/lava_ignites_wall_signs.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "lava_ignites_wall_signs", - "description": "One lava pool sits directly under an oak wall sign and a crimson wall sign; lava sets fire on the floor cell beside the oak sign, which is ignited by lava, and never beside the crimson sign, which is not.", - "tags": ["decoration", "sign", "lava", "fire", "ignite", "random-tick"], - "minecraftIds": ["minecraft:oak_wall_sign", "minecraft:crimson_wall_sign", "minecraft:lava"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-4, 0, -2], [4, 4, 2] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-4, 0, -2], [4, 4, 2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-3, 1, -1], [3, 3, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-3, 1, -1], [3, 1, 1] ], - "with": {"id": "minecraft:lava"} - }, - { "at": 0, "do": "place", "pos": [-2, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [-3, 2, 1], "block": {"id": "minecraft:stone"} }, - { "at": 1, "do": "place", "pos": [-3, 2, 0], "block": {"id": "minecraft:oak_wall_sign", "facing": "north"} }, - { "at": 0, "do": "place", "pos": [3, 2, 1], "block": {"id": "minecraft:stone"} }, - { - "at": 1, - "do": "place", - "pos": [3, 2, 0], - "block": {"id": "minecraft:crimson_wall_sign", "facing": "north"} - }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_wall_sign" } }, - { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_wall_sign"} }, - { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } - ] - }, - { - "at": 20, - "do": "assert", - "checks": [ - { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_wall_sign" } }, - { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_wall_sign"} }, - { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } - ] - }, - { - "at": 30, - "do": "assert", - "checks": [ - { "pos": [-3, 2, 0], "is": {"id": "minecraft:oak_wall_sign" } }, - { "pos": [ 3, 2, 0], "is": {"id": "minecraft:crimson_wall_sign"} }, - { "pos": [ 2, 2, 0], "is": {"id": "minecraft:air" } } - ] - }, - { - "at": 20, - "do": "assert", - "checks": [ - { "pos": [-2, 2, 0], "is": {"id": "minecraft:fire"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/signs/oak_sign_ink_wax_and_click_commands.json b/tests/decoration/signs/oak_sign_ink_wax_and_click_commands.json deleted file mode 100644 index 1382d27..0000000 --- a/tests/decoration/signs/oak_sign_ink_wax_and_click_commands.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "oak_sign_ink_wax_and_click_commands", - "description": "Glow ink and ink sacs toggle glowing text, honeycomb waxes a sign and blocks dyeing, and an empty hand runs a sign's click command whether or not it is waxed.", - "tags": ["decoration", "sign", "glow-ink", "wax", "click-event", "block-entity", "player"], - "minecraftIds": [ - "minecraft:oak_sign" , "minecraft:glow_ink_sac", "minecraft:ink_sac" , "minecraft:honeycomb" , - "minecraft:red_dye" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -3], [10, 3, 4] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -3], [10, 3, 4] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -3], [10, 0, -2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [3, 0, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [6, 0, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [9, 0, 0], "block": {"id": "minecraft:stone"} }, - { - "pos": [0, 1, 0], - "block": { - "id": "minecraft:oak_sign", - "rotation": 8, - "nbt": {"front_text": "{messages: [\"hi\", \"\", \"\", \"\"]}"} - } - }, - { - "pos": [3, 1, 0], - "block": { - "id": "minecraft:oak_sign", - "rotation": 8, - "nbt": {"front_text": "{messages: [\"hi\", \"\", \"\", \"\"]}"} - } - }, - { - "pos": [6, 1, 0], - "block": { - "id": "minecraft:oak_sign", - "rotation": 8, - "nbt": { - "is_waxed": "1b", - "front_text": "{messages: [{text: \"go\", click_event: {action: \"run_command\", command: \"setblock ~ ~2 ~ minecraft:gold_block\"}}, \"\", \"\", \"\"]}" - } - } - }, - { - "pos": [9, 1, 0], - "block": { - "id": "minecraft:oak_sign", - "rotation": 8, - "nbt": { - "front_text": "{messages: [{text: \"go\", click_event: {action: \"run_command\", command: \"setblock ~ ~2 ~ minecraft:gold_block\"}}, \"\", \"\", \"\"]}" - } - } - } - ] - }, - {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:glow_ink_sac", "count": 1}, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -1.5], "rot": [0, 29] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": { "id": "minecraft:oak_sign", "nbt": {"front_text.has_glowing_text": "1b"} } - }, - {"slot": "hotbar1", "is": "empty"} - ] - }, - {"at": 3, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:ink_sac", "count": 1}, - {"at": 3, "do": "interact"}, - { - "at": 4, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": { "id": "minecraft:oak_sign", "nbt": {"front_text.has_glowing_text": "0b"} } - }, - {"slot": "hotbar1", "is": "empty"} - ] - }, - {"at": 5, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:honeycomb", "count": 1}, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [3.5, 1, -1.5], "rot": [0, 29] }, - {"at": 5, "do": "interact"}, - { - "at": 6, - "do": "assert", - "checks": [ - { - "pos": [3, 1, 0], - "is": { "id": "minecraft:oak_sign", "nbt": {"is_waxed": "1b"} } - }, - {"slot": "hotbar1", "is": "empty"} - ] - }, - {"at": 7, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:red_dye", "count": 1}, - {"at": 7, "do": "interact"}, - { - "at": 8, - "do": "assert", - "checks": [ - { - "pos": [3, 1, 0], - "is": { "id": "minecraft:oak_sign", "nbt": {"front_text.color": "black", "is_waxed": "1b"} } - }, - { "slot": "hotbar1", "is": {"id": "minecraft:red_dye", "count": 1} } - ] - }, - {"at": 9, "do": "set_slot", "slot": "hotbar1"}, - { "at": 9, "do": "tp", "entity_alias": "player", "pos": [6.5, 1, -1.5], "rot": [0, 29] }, - {"at": 9, "do": "interact"}, - { "at": 10, "do": "tp", "entity_alias": "player", "pos": [9.5, 1, -1.5], "rot": [0, 29] }, - {"at": 10, "do": "interact"}, - { - "at": 11, - "do": "assert", - "checks": [ - { "pos": [6, 3, 0], "is": {"id": "minecraft:gold_block"} }, - { "pos": [9, 3, 0], "is": {"id": "minecraft:gold_block"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/stairs/copper_stairs_weathering.json b/tests/decoration/stairs/copper_stairs_weathering.json deleted file mode 100644 index f7ed637..0000000 --- a/tests/decoration/stairs/copper_stairs_weathering.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "copper_stairs_weathering", - "description": "With a high random tick speed an unwaxed cut copper stair weathers to a later stage and keeps its properties, while a fully oxidized stair and a waxed stair stay unchanged.", - "tags": ["decoration", "stairs", "copper", "weathering", "random-tick"], - "minecraftIds": [ - "minecraft:cut_copper_stairs" , - "minecraft:oxidized_cut_copper_stairs", - "minecraft:waxed_cut_copper_stairs" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [12, 3, 0] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 1000 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:cut_copper_stairs", "facing": "west", "half": "top"} }, - { - "pos": [6, 1, 0], - "block": {"id": "minecraft:oxidized_cut_copper_stairs", "facing": "west", "half": "top"} - }, - { - "pos": [12, 1, 0], - "block": {"id": "minecraft:waxed_cut_copper_stairs", "facing": "west", "half": "top"} - } - ] - }, - { - "at": 800, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": [ - {"id": "minecraft:exposed_cut_copper_stairs" , "facing": "west", "half": "top"}, - {"id": "minecraft:weathered_cut_copper_stairs", "facing": "west", "half": "top"}, - {"id": "minecraft:oxidized_cut_copper_stairs" , "facing": "west", "half": "top"} - ] - }, - { - "pos": [6, 1, 0], - "is": {"id": "minecraft:oxidized_cut_copper_stairs", "facing": "west", "half": "top"} - }, - { - "pos": [12, 1, 0], - "is": {"id": "minecraft:waxed_cut_copper_stairs", "facing": "west", "half": "top"} - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/decoration/stairs/oak_stairs_furnace_fuel.json b/tests/decoration/stairs/oak_stairs_furnace_fuel.json deleted file mode 100644 index f2dfb0a..0000000 --- a/tests/decoration/stairs/oak_stairs_furnace_fuel.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "oak_stairs_furnace_fuel", - "description": "Oak stairs work as furnace fuel with a 300 tick burn time, while stone stairs and crimson stairs do not light the furnace.", - "tags": ["decoration", "stairs", "fuel", "furnace"], - "minecraftIds": [ - "minecraft:oak_stairs" , "minecraft:stone_stairs" , "minecraft:crimson_stairs", "minecraft:furnace" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [4, 1, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:oak_stairs\"}]" - } - } - }, - { - "pos": [2, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:stone_stairs\"}]" - } - } - }, - { - "pos": [4, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:crimson_stairs\"}]" - } - } - } - ] - }, - { - "at": 5, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { "id": "minecraft:furnace", "lit": true, "nbt": {"lit_total_time": "300s"} } - }, - { "pos": [2, 0, 0], "is": {"id": "minecraft:furnace", "lit": false} }, - { "pos": [4, 0, 0], "is": {"id": "minecraft:furnace", "lit": false} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/entities/wolf/wolf_collar_dye_baby_wolf.json b/tests/entities/wolf/wolf_collar_dye_baby_wolf.json deleted file mode 100644 index a9aa700..0000000 --- a/tests/entities/wolf/wolf_collar_dye_baby_wolf.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:blue_dye", "minecraft:wolf"], - "name": "Wolf Collar Dye Baby Wolf", - "description": "Dyeing an own tamed baby wolf still changes the collar, since the dye branch has no baby check.", - "tags": ["entity", "wolf", "dye", "collar", "player", "baby"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [1, 3, 5] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, -1, 2], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 35] }, - { - "at": 0, - "do": "summon", - "entity_alias": "wolf", - "entity_type": "minecraft:wolf", - "pos": [0.5, 0, 2.5], - "NoAI": "1b", - "Owner": "[I; 1090192112, 104018212, -2046533210, 1798617213]", - "Age": "-24000" - }, - {"at": 1, "do": "interact", "item": "minecraft:blue_dye"}, - { - "at": 2, - "do": "assert", - "checks": [ {"entity_alias": "wolf", "CollarColor": "11b"}, {"slot": "hotbar1", "is": "empty"} ] - } - ] -} - diff --git a/tests/entities/wolf/wolf_collar_dye_changes_color.json b/tests/entities/wolf/wolf_collar_dye_changes_color.json deleted file mode 100644 index ab8ee12..0000000 --- a/tests/entities/wolf/wolf_collar_dye_changes_color.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:blue_dye", "minecraft:wolf"], - "name": "Wolf Collar Dye Changes Color", - "description": "A survival player using blue dye on their own tamed wolf changes the collar from the default red to blue and consumes the dye.", - "tags": ["entity", "wolf", "dye", "collar", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [1, 3, 5] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, -1, 2], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 30] }, - { - "at": 0, - "do": "summon", - "entity_alias": "wolf", - "entity_type": "minecraft:wolf", - "pos": [0.5, 0, 2.5], - "NoAI": "1b", - "Owner": "[I; 1090192112, 104018212, -2046533210, 1798617213]" - }, - { - "at": 1, - "do": "assert", - "checks": [ {"entity_alias": "wolf", "CollarColor": "14b"} ] - }, - {"at": 1, "do": "interact", "item": "minecraft:blue_dye"}, - { - "at": 2, - "do": "assert", - "checks": [ {"entity_alias": "wolf", "CollarColor": "11b"}, {"slot": "hotbar1", "is": "empty"} ] - } - ] -} - diff --git a/tests/entities/wolf/wolf_collar_dye_creative_keeps_item.json b/tests/entities/wolf/wolf_collar_dye_creative_keeps_item.json deleted file mode 100644 index 1edd44d..0000000 --- a/tests/entities/wolf/wolf_collar_dye_creative_keeps_item.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:blue_dye", "minecraft:wolf"], - "name": "Wolf Collar Dye Creative Keeps Item", - "description": "A creative player dyeing their own tamed wolf changes the collar but keeps the dye.", - "tags": ["entity", "wolf", "dye", "collar", "player", "creative"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [1, 3, 5] ] - }, - "player": {"game_mode": "Creative"} - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, -1, 2], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 30] }, - { - "at": 0, - "do": "summon", - "entity_alias": "wolf", - "entity_type": "minecraft:wolf", - "pos": [0.5, 0, 2.5], - "NoAI": "1b", - "Owner": "[I; 1090192112, 104018212, -2046533210, 1798617213]" - }, - {"at": 1, "do": "interact", "item": "minecraft:blue_dye"}, - { - "at": 2, - "do": "assert", - "checks": [ - {"entity_alias": "wolf", "CollarColor": "11b"} , - { "slot": "hotbar1", "is": {"id": "minecraft:blue_dye", "count": 1} } - ] - } - ] -} - diff --git a/tests/entities/wolf/wolf_collar_dye_same_color_noop.json b/tests/entities/wolf/wolf_collar_dye_same_color_noop.json deleted file mode 100644 index c68e368..0000000 --- a/tests/entities/wolf/wolf_collar_dye_same_color_noop.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:blue_dye", "minecraft:wolf"], - "name": "Wolf Collar Dye Same Color Noop", - "description": "Using blue dye on an own tamed wolf that already has a blue collar changes nothing and keeps the dye.", - "tags": ["entity", "wolf", "dye", "collar", "player", "same-color"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [1, 3, 5] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, -1, 2], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 30] }, - { - "at": 0, - "do": "summon", - "entity_alias": "wolf", - "entity_type": "minecraft:wolf", - "pos": [0.5, 0, 2.5], - "NoAI": "1b", - "Owner": "[I; 1090192112, 104018212, -2046533210, 1798617213]", - "CollarColor": "11b" - }, - {"at": 1, "do": "interact", "item": "minecraft:blue_dye"}, - { - "at": 2, - "do": "assert", - "checks": [ - {"entity_alias": "wolf", "CollarColor": "11b"} , - { "slot": "hotbar1", "is": {"id": "minecraft:blue_dye", "count": 1} } - ] - } - ] -} - diff --git a/tests/entities/wolf/wolf_collar_dye_stack_consumes_one.json b/tests/entities/wolf/wolf_collar_dye_stack_consumes_one.json deleted file mode 100644 index 286e2f3..0000000 --- a/tests/entities/wolf/wolf_collar_dye_stack_consumes_one.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:blue_dye", "minecraft:wolf"], - "name": "Wolf Collar Dye Stack Consumes One", - "description": "Dyeing an own tamed wolf with a stack of two blue dyes consumes exactly one dye.", - "tags": ["entity", "wolf", "dye", "collar", "player", "stack"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [1, 3, 5] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, -1, 2], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 30] }, - { - "at": 0, - "do": "summon", - "entity_alias": "wolf", - "entity_type": "minecraft:wolf", - "pos": [0.5, 0, 2.5], - "NoAI": "1b", - "Owner": "[I; 1090192112, 104018212, -2046533210, 1798617213]" - }, - {"at": 1, "do": "set_slot", "slot": "hotbar1", "item": "minecraft:blue_dye", "count": 2}, - {"at": 1, "do": "select_hotbar", "slot": 1}, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - {"entity_alias": "wolf", "CollarColor": "11b"} , - { "slot": "hotbar1", "is": {"id": "minecraft:blue_dye", "count": 1} } - ] - } - ] -} - diff --git a/tests/gravity/dragon_egg/dragon_egg_explosion_destroys_and_drops.json b/tests/gravity/dragon_egg/dragon_egg_explosion_destroys_and_drops.json deleted file mode 100644 index 145ad42..0000000 --- a/tests/gravity/dragon_egg/dragon_egg_explosion_destroys_and_drops.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "dragon_egg_explosion_destroys_and_drops", - "description": "TNT exploding next to a dragon egg on an obsidian floor destroys the egg, and because the egg is in the explosion-resistant loot list it drops exactly one dragon egg item.", - "tags": ["gravity", "dragon-egg", "explosion", "drops"], - "minecraftIds": ["minecraft:dragon_egg", "minecraft:obsidian", "minecraft:tnt"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-3, 0, -3], [6, 4, 5] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-3, 0, -3], [6, 0, 5] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 0, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:dragon_egg"} }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [1, 1, 1], "is": {"id": "minecraft:dragon_egg"} } - ] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [2.5, 1, 1.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [1, 1, 1], "is": {"id": "minecraft:air"} }, - {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:dragon_egg", "Item.count": 1} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/gravity/gravel/gravel_explosion_drops_one_item.json b/tests/gravity/gravel/gravel_explosion_drops_one_item.json deleted file mode 100644 index b8f7591..0000000 --- a/tests/gravity/gravel/gravel_explosion_drops_one_item.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "gravel_explosion_drops_one_item", - "description": "Gravel destroyed by a TNT explosion on an obsidian floor disappears and drops exactly one item entity (the loot is random, so which item it is is not asserted).", - "tags": ["gravity", "gravel", "drops", "explosion"], - "minecraftIds": ["minecraft:gravel", "minecraft:obsidian", "minecraft:tnt", "minecraft:item"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [14, 4, 2] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [10, 0, 0], [13, 0, 2] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 1, "do": "place", "pos": [12, 1, 1], "block": {"id": "minecraft:gravel"} }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [12.5, 1, 2.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 60, - "do": "assert", - "checks": [ - { "pos": [12, 1, 1], "is": {"id": "minecraft:air"} }, - { "is": "minecraft:item" , "exists": true, "count": 1 } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/items/axes/axe_breaks_after_durability_uses.json b/tests/items/axes/axe_breaks_after_durability_uses.json deleted file mode 100644 index dae690a..0000000 --- a/tests/items/axes/axe_breaks_after_durability_uses.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "axe_breaks_after_durability_uses", - "description": "In survival, a golden axe (durability 32) survives 31 strips and breaks on the 32nd, leaving the slot empty (each successful use calls hurtAndBreak(1)). The player stands on a stone block so the server does not kick the bot for floating.", - "tags": ["item", "axe", "interaction", "player", "durability", "strip", "survival"], - "minecraftIds": ["minecraft:golden_axe", "minecraft:oak_log", "minecraft:stripped_oak_log", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [3, 2, 0] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:golden_axe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [2, 0, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [2.5, 1, 0.5], "rot": [-90, 0] }, - { "at": 0, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 1, "do": "interact"}, - { "at": 2, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 3, "do": "interact"}, - { "at": 4, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 5, "do": "interact"}, - { "at": 6, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 7, "do": "interact"}, - { "at": 8, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 9, "do": "interact"}, - { "at": 10, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 11, "do": "interact"}, - { "at": 12, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 13, "do": "interact"}, - { "at": 14, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 15, "do": "interact"}, - { "at": 16, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 17, "do": "interact"}, - { "at": 18, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 19, "do": "interact"}, - { "at": 20, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 21, "do": "interact"}, - { "at": 22, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 23, "do": "interact"}, - { "at": 24, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 25, "do": "interact"}, - { "at": 26, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 27, "do": "interact"}, - { "at": 28, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 29, "do": "interact"}, - { "at": 30, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 31, "do": "interact"}, - { "at": 32, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 33, "do": "interact"}, - { "at": 34, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 35, "do": "interact"}, - { "at": 36, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 37, "do": "interact"}, - { "at": 38, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 39, "do": "interact"}, - { "at": 40, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 41, "do": "interact"}, - { "at": 42, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 43, "do": "interact"}, - { "at": 44, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 45, "do": "interact"}, - { "at": 46, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 47, "do": "interact"}, - { "at": 48, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 49, "do": "interact"}, - { "at": 50, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 51, "do": "interact"}, - { "at": 52, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 53, "do": "interact"}, - { "at": 54, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 55, "do": "interact"}, - { "at": 56, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 57, "do": "interact"}, - { "at": 58, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 59, "do": "interact"}, - { "at": 60, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 61, "do": "interact"}, - { - "at": 62, - "do": "assert", - "checks": [ - { "slot": "hotbar1", "is": {"id": "minecraft:golden_axe"} } - ] - }, - { "at": 62, "do": "place", "pos": [3, 2, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }, - {"at": 63, "do": "interact"}, - { - "at": 64, - "do": "assert", - "checks": [ - { "slot": "hotbar1", "is": "empty" }, - { "is": {"id": "minecraft:stripped_oak_log", "axis": "y"}, "pos": [3, 2, 0] } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/items/axes/wooden_axe_furnace_fuel.json b/tests/items/axes/wooden_axe_furnace_fuel.json deleted file mode 100644 index 3180b7c..0000000 --- a/tests/items/axes/wooden_axe_furnace_fuel.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "wooden_axe_furnace_fuel", - "description": "A wooden axe in a furnace fuel slot is consumed and lights the furnace for 200 ticks (FuelValues lists WOODEN_AXE at the base unit).", - "tags": ["axe", "fuel", "furnace", "block-entity"], - "minecraftIds": ["minecraft:wooden_axe", "minecraft:furnace", "minecraft:raw_iron"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:wooden_axe\"}]" - } - } - }, - { - "at": 3, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "true", - "nbt": {"lit_total_time": "200s", "Items[0].id": "\"minecraft:raw_iron\""} - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/items/brush/brush_completion_drops_item_on_hit_face.json b/tests/items/brush/brush_completion_drops_item_on_hit_face.json deleted file mode 100644 index eca81be..0000000 --- a/tests/items/brush/brush_completion_drops_item_on_hit_face.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "brush_completion_drops_item_on_hit_face", - "description": "Finishing a brushing from the east side spawns the hidden diamond as a dropped item in the block east of the brushed block, not above it.", - "tags": ["item", "brush", "suspicious-sand", "drop", "player"], - "minecraftIds": ["minecraft:brush", "minecraft:suspicious_sand", "minecraft:sand", "minecraft:diamond"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [5, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:brush"} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [1, 0, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [2, 0, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [3, 0, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [4, 0, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [5, 0, 0], "block": {"id": "minecraft:stone"} }, - { - "pos": [0, 1, 0], - "block": { - "id": "minecraft:suspicious_sand", - "nbt": {"item": "{id: \"minecraft:diamond\", count: 1}"} - } - } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 1, 0.5], "rot": [90, 24] }, - {"at": 3, "do": "interact"}, - { - "at": 125, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:sand"} }, - { - "is": "minecraft:item", - "exists": true, - "count": 1, - "pos": [1.5, 1.2, 0.5], - "position_tolerance": 0.5 - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/items/brush/brush_completion_drops_item_on_top_face.json b/tests/items/brush/brush_completion_drops_item_on_top_face.json deleted file mode 100644 index 3bc1617..0000000 --- a/tests/items/brush/brush_completion_drops_item_on_top_face.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "brush_completion_drops_item_on_top_face", - "description": "Finishing a brushing from above spawns the hidden diamond as a dropped item above the brushed block.", - "tags": ["item", "brush", "suspicious-sand", "drop", "player"], - "minecraftIds": ["minecraft:brush", "minecraft:suspicious_sand", "minecraft:sand", "minecraft:diamond"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [5, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:brush"} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { - "pos": [0, 1, 0], - "block": { - "id": "minecraft:suspicious_sand", - "nbt": {"item": "{id: \"minecraft:diamond\", count: 1}"} - } - }, - { "pos": [3, 0, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [3, 1, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [3, 2, 0], "block": {"id": "minecraft:stone"} } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 3, 0.5], "rot": [90, 41] }, - {"at": 3, "do": "interact"}, - { - "at": 125, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:sand"} }, - { - "is": "minecraft:item", - "exists": true, - "count": 1, - "pos": [0.5, 2.1, 0.5], - "position_tolerance": 0.5 - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/items/brush/brush_creative_completes_brushing.json b/tests/items/brush/brush_creative_completes_brushing.json deleted file mode 100644 index 274bd45..0000000 --- a/tests/items/brush/brush_creative_completes_brushing.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "brush_creative_completes_brushing", - "description": "A creative player can brush suspicious sand through every dusted stage until it turns into sand.", - "tags": ["item", "brush", "suspicious-sand", "creative", "player"], - "minecraftIds": ["minecraft:brush", "minecraft:suspicious_sand", "minecraft:sand"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 4, 1] ] - }, - "player": { - "selected_hotbar": 1, - "game_mode": "Creative", - "inventory": { "hotbar1": {"id": "minecraft:brush"} } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:suspicious_sand"} } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, 0.5], "rot": [0, 90] }, - {"at": 3, "do": "interact"}, - { - "at": 75, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 3} } - ] - }, - { - "at": 125, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:sand"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/items/brush/brush_dusting_resets_after_release.json b/tests/items/brush/brush_dusting_resets_after_release.json deleted file mode 100644 index 3124789..0000000 --- a/tests/items/brush/brush_dusting_resets_after_release.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "brush_dusting_resets_after_release", - "description": "A partially brushed suspicious sand block keeps its dusted level while the brush count is retained, then decays back to dusted 0 once brushing stops.", - "tags": ["item", "brush", "suspicious-sand", "player"], - "minecraftIds": ["minecraft:brush", "minecraft:suspicious_sand"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 4, 1] ] - }, - "player": { - "selected_hotbar": 1, - "game_mode": "Survival", - "inventory": { "hotbar1": {"id": "minecraft:brush"} } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:suspicious_sand"} } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, 0.5], "rot": [0, 90] }, - {"at": 3, "do": "interact"}, - { - "at": 30, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 2} } - ] - }, - { "at": 31, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, 0.5], "rot": [0, -90] }, - { - "at": 35, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 2} } - ] - }, - { - "at": 160, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 0} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/items/brush/brush_looking_at_air_does_nothing.json b/tests/items/brush/brush_looking_at_air_does_nothing.json deleted file mode 100644 index 616650f..0000000 --- a/tests/items/brush/brush_looking_at_air_does_nothing.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "brush_looking_at_air_does_nothing", - "description": "Using a brush while looking at the sky does not dust the suspicious sand under the player, while using it after looking down does, so the no-op is meaningful.", - "tags": ["item", "brush", "suspicious-sand", "player"], - "minecraftIds": ["minecraft:brush", "minecraft:suspicious_sand"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:brush"} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:suspicious_sand"} } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, 0.5], "rot": [0, -90] }, - {"at": 3, "do": "interact"}, - { - "at": 60, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 0} } - ] - }, - { "at": 61, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, 0.5], "rot": [0, 90] }, - {"at": 62, "do": "interact"}, - { - "at": 110, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": [ - {"id": "minecraft:suspicious_sand", "dusted": 1}, - {"id": "minecraft:suspicious_sand", "dusted": 2}, - {"id": "minecraft:suspicious_sand", "dusted": 3} - ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/items/brush/brush_on_ordinary_block_does_nothing.json b/tests/items/brush/brush_on_ordinary_block_does_nothing.json deleted file mode 100644 index fab3239..0000000 --- a/tests/items/brush/brush_on_ordinary_block_does_nothing.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "brush_on_ordinary_block_does_nothing", - "description": "Brushing plain sand for 60 ticks changes nothing, while the same held brush then dusts a suspicious sand block next to it, so the no-op is meaningful.", - "tags": ["item", "brush", "suspicious-sand", "player"], - "minecraftIds": ["minecraft:brush", "minecraft:sand", "minecraft:suspicious_sand"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:brush"} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [ 0, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [-1, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [ 0, 1, 0], "block": {"id": "minecraft:sand" } }, - { "pos": [-1, 1, 0], "block": {"id": "minecraft:suspicious_sand"} } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, 0.5], "rot": [0, 90] }, - {"at": 3, "do": "interact"}, - { - "at": 60, - "do": "assert", - "checks": [ - { "pos": [ 0, 1, 0], "is": {"id": "minecraft:sand" } }, - { "pos": [ 0, 0, 0], "is": {"id": "minecraft:stone" } }, - { "pos": [-1, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 0} } - ] - }, - { "at": 61, "do": "tp", "entity_alias": "player", "pos": [-0.5, 2.5, 0.5], "rot": [0, 90] }, - { - "at": 100, - "do": "assert", - "checks": [ - { - "pos": [-1, 1, 0], - "is": [ - {"id": "minecraft:suspicious_sand", "dusted": 1}, - {"id": "minecraft:suspicious_sand", "dusted": 2}, - {"id": "minecraft:suspicious_sand", "dusted": 3} - ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/items/brush/brush_progressive_dusting.json b/tests/items/brush/brush_progressive_dusting.json deleted file mode 100644 index 1fe26c2..0000000 --- a/tests/items/brush/brush_progressive_dusting.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "brush_progressive_dusting", - "description": "Holding use with a brush on suspicious sand advances its dusted state 0, 1, 2, 3 and finally turns it into sand after ten strokes.", - "tags": ["item", "brush", "suspicious-sand", "player"], - "minecraftIds": ["minecraft:brush", "minecraft:suspicious_sand", "minecraft:sand"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:brush"} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:suspicious_sand"} } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 2.5, 0.5], "rot": [0, 90] }, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 0} } - ] - }, - {"at": 3, "do": "interact"}, - { - "at": 12, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 1} } - ] - }, - { - "at": 45, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 2} } - ] - }, - { - "at": 75, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:suspicious_sand", "dusted": 3} } - ] - }, - { - "at": 125, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:sand"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/items/bucket/bucket_fills_from_full_powder_snow_cauldron.json b/tests/items/bucket/bucket_fills_from_full_powder_snow_cauldron.json deleted file mode 100644 index 03123b1..0000000 --- a/tests/items/bucket/bucket_fills_from_full_powder_snow_cauldron.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "bucket_fills_from_full_powder_snow_cauldron", - "description": "An empty bucket used on a full powder snow cauldron empties the cauldron and gives a powder snow bucket.", - "tags": ["item", "bucket", "cauldron", "powder-snow", "player"], - "minecraftIds": [ - "minecraft:bucket" , "minecraft:powder_snow_bucket" , "minecraft:powder_snow_cauldron", - "minecraft:cauldron" - ], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 3, 3] ] - }, - "player": { - "game_mode": "Survival", - "inventory": { "hotbar1": {"id": "minecraft:bucket", "count": 1} } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [1, 0, 3] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone" } }, - { "pos": [ 1, 2, 2], "block": {"id": "minecraft:stone" } }, - { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone" } }, - { "pos": [ 0, 2, 2], "block": {"id": "minecraft:powder_snow_cauldron", "level": 3} } - ] - }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 2, 2], "is": {"id": "minecraft:powder_snow_cauldron", "level": 3} } - ] - }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 2, 2], "is": {"id": "minecraft:cauldron" } }, - { "is": {"id": "minecraft:powder_snow_bucket", "count": 1}, "slot": "hotbar1" } - ] - } - ] -} - diff --git a/tests/items/bucket/bucket_fills_from_full_water_cauldron.json b/tests/items/bucket/bucket_fills_from_full_water_cauldron.json deleted file mode 100644 index 3332e70..0000000 --- a/tests/items/bucket/bucket_fills_from_full_water_cauldron.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "bucket_fills_from_full_water_cauldron", - "description": "An empty bucket used on a full water cauldron empties the cauldron and gives a water bucket.", - "tags": ["item", "bucket", "cauldron", "water", "player"], - "minecraftIds": ["minecraft:bucket", "minecraft:water_bucket", "minecraft:water_cauldron", "minecraft:cauldron"], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 3, 3] ] - }, - "player": { - "game_mode": "Survival", - "inventory": { "hotbar1": {"id": "minecraft:bucket", "count": 1} } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [1, 0, 3] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone" } }, - { "pos": [ 1, 2, 2], "block": {"id": "minecraft:stone" } }, - { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone" } }, - { "pos": [ 0, 2, 2], "block": {"id": "minecraft:water_cauldron", "level": 3} } - ] - }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 2, 2], "is": {"id": "minecraft:water_cauldron", "level": 3} } - ] - }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 2, 2], "is": {"id": "minecraft:cauldron" } }, - { "is": {"id": "minecraft:water_bucket", "count": 1}, "slot": "hotbar1" } - ] - } - ] -} - diff --git a/tests/items/bucket/bucket_fills_from_lava_cauldron.json b/tests/items/bucket/bucket_fills_from_lava_cauldron.json deleted file mode 100644 index 6056fbf..0000000 --- a/tests/items/bucket/bucket_fills_from_lava_cauldron.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "bucket_fills_from_lava_cauldron", - "description": "An empty bucket used on a lava cauldron empties the cauldron and gives a lava bucket.", - "tags": ["item", "bucket", "cauldron", "lava", "player"], - "minecraftIds": ["minecraft:bucket", "minecraft:lava_bucket", "minecraft:lava_cauldron", "minecraft:cauldron"], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 3, 3] ] - }, - "player": { - "game_mode": "Survival", - "inventory": { "hotbar1": {"id": "minecraft:bucket", "count": 1} } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [1, 0, 3] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [ 0, 1, 2], "block": {"id": "minecraft:stone" } }, - { "pos": [ 1, 2, 2], "block": {"id": "minecraft:stone" } }, - { "pos": [-1, 2, 2], "block": {"id": "minecraft:stone" } }, - { "pos": [ 0, 2, 2], "block": {"id": "minecraft:lava_cauldron"} } - ] - }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 0] }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 2, 2], "is": {"id": "minecraft:lava_cauldron"} } - ] - }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 2, 2], "is": {"id": "minecraft:cauldron" } }, - { "is": {"id": "minecraft:lava_bucket", "count": 1}, "slot": "hotbar1" } - ] - } - ] -} - diff --git a/tests/items/ender_pearl/ender_pearl_second_throw_blocked_by_cooldown.json b/tests/items/ender_pearl/ender_pearl_second_throw_blocked_by_cooldown.json deleted file mode 100644 index 7ecf758..0000000 --- a/tests/items/ender_pearl/ender_pearl_second_throw_blocked_by_cooldown.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:ender_pearl"], - "name": "ender_pearl_second_throw_blocked_by_cooldown", - "description": "After throwing one ender pearl the item is on a 20 tick cooldown (1.0 s use cooldown), so a second throw 5 ticks later is ignored; the stack stays at 2 until the cooldown has expired and the next throw takes it to 1.", - "tags": ["item", "ender-pearl", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [1, 3, 5] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:ender_pearl", "count": 3} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, - {"at": 1, "do": "interact"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "slot": "hotbar1", "is": {"id": "minecraft:ender_pearl", "count": 2} } - ] - }, - {"at": 6, "do": "interact"}, - { - "at": 8, - "do": "assert", - "checks": [ - { "slot": "hotbar1", "is": {"id": "minecraft:ender_pearl", "count": 2} } - ] - }, - {"at": 30, "do": "interact"}, - { - "at": 32, - "do": "assert", - "checks": [ - { "slot": "hotbar1", "is": {"id": "minecraft:ender_pearl", "count": 1} } - ] - } - ] -} - diff --git a/tests/items/ender_pearl/ender_pearl_throw_again_after_cooldown.json b/tests/items/ender_pearl/ender_pearl_throw_again_after_cooldown.json deleted file mode 100644 index 9029540..0000000 --- a/tests/items/ender_pearl/ender_pearl_throw_again_after_cooldown.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:ender_pearl"], - "name": "ender_pearl_throw_again_after_cooldown", - "description": "Once the 20 tick cooldown has expired a second ender pearl can be thrown, so both pearls of a stack of two are consumed.", - "tags": ["item", "ender-pearl", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [1, 3, 5] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:ender_pearl", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, - {"at": 1, "do": "interact"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "slot": "hotbar1", "is": {"id": "minecraft:ender_pearl", "count": 1} } - ] - }, - {"at": 30, "do": "interact"}, - { - "at": 32, - "do": "assert", - "checks": [ {"slot": "hotbar1", "is": "empty"} ] - } - ] -} - diff --git a/tests/items/ender_pearl/ender_pearl_throw_creative_keeps_stack.json b/tests/items/ender_pearl/ender_pearl_throw_creative_keeps_stack.json deleted file mode 100644 index 2b6491e..0000000 --- a/tests/items/ender_pearl/ender_pearl_throw_creative_keeps_stack.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:ender_pearl"], - "name": "ender_pearl_throw_creative_keeps_stack", - "description": "A creative player throwing an ender pearl keeps the item (ItemStack.consume does nothing with infinite materials), while the pearl is still thrown: a pearl entity appears ahead of the player.", - "tags": ["item", "ender-pearl", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [1, 3, 5] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:ender_pearl", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Creative" - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, - {"at": 1, "do": "interact"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "slot": "hotbar1", "is": {"id": "minecraft:ender_pearl", "count": 1} }, - { - "is": "minecraft:ender_pearl", - "exists": true, - "count": 1, - "pos": [0.5, 1.5, 3.5], - "position_tolerance": 1 - } - ] - } - ] -} - diff --git a/tests/items/ender_pearl/ender_pearl_throw_from_partial_stack.json b/tests/items/ender_pearl/ender_pearl_throw_from_partial_stack.json deleted file mode 100644 index fb678c5..0000000 --- a/tests/items/ender_pearl/ender_pearl_throw_from_partial_stack.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:ender_pearl"], - "name": "ender_pearl_throw_from_partial_stack", - "description": "A survival player throwing from a stack of 16 ender pearls consumes exactly one, leaving 15 in the same slot.", - "tags": ["item", "ender-pearl", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [1, 3, 5] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:ender_pearl", "count": 16} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, - {"at": 1, "do": "interact"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "slot": "hotbar1", "is": {"id": "minecraft:ender_pearl", "count": 15} } - ] - } - ] -} - diff --git a/tests/items/fishing_rod/fishing_rod_cast_keeps_rod.json b/tests/items/fishing_rod/fishing_rod_cast_keeps_rod.json deleted file mode 100644 index a7f4b2c..0000000 --- a/tests/items/fishing_rod/fishing_rod_cast_keeps_rod.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:fishing_rod", "minecraft:fishing_bobber"], - "name": "fishing_rod_cast_keeps_rod", - "description": "Casting a fishing rod while aiming at open air spawns a fishing bobber and the rod is not consumed: it stays in the hand with count 1. This does not check durability.", - "tags": ["item", "fishing-rod", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [1, 3, 6] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:fishing_rod", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "slot": "hotbar1", "is": {"id": "minecraft:fishing_rod", "count": 1} }, - { "is": "minecraft:fishing_bobber" , "exists": true, "count": 1 } - ] - } - ] -} - diff --git a/tests/items/hoe/hoe_blocked_by_solid_block_above.json b/tests/items/hoe/hoe_blocked_by_solid_block_above.json deleted file mode 100644 index 195cb86..0000000 --- a/tests/items/hoe/hoe_blocked_by_solid_block_above.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": [ - "minecraft:golden_hoe" , "minecraft:dirt" , "minecraft:coarse_dirt", "minecraft:stone" , - "minecraft:farmland" - ], - "name": "hoe_blocked_by_solid_block_above", - "description": "Dirt and coarse dirt with a stone block directly above are not changed when the hoe is used on a side face (onlyIfAirAbove fails); once the stone is removed the same click works.", - "tags": ["item", "hoe", "tilling", "edge-case", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [4, 4, 4] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [2, 0, 0], "block": {"id": "minecraft:dirt" } }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [2, 0, 3], "block": {"id": "minecraft:coarse_dirt"} }, - { "pos": [2, 1, 3], "block": {"id": "minecraft:stone" } } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "rot": [-90, 37], "pos": [0.5, 0, 0.5] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [2, 0, 0], "is": {"id": "minecraft:dirt" } }, - { "is": {"id": "minecraft:golden_hoe", "count": 1}, "slot": "hotbar1" } - ] - }, - { "at": 3, "do": "remove", "pos": [2, 1, 0] }, - { "at": 4, "do": "tp", "entity_alias": "player", "rot": [-90, 37], "pos": [0.5, 0, 0.5] }, - {"at": 4, "do": "interact"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [2, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} } - ] - }, - { "at": 6, "do": "tp", "entity_alias": "player", "rot": [-90, 37], "pos": [0.5, 0, 3.5] }, - {"at": 6, "do": "interact"}, - { - "at": 7, - "do": "assert", - "checks": [ - { "pos": [2, 0, 3], "is": {"id": "minecraft:coarse_dirt" } }, - { "is": {"id": "minecraft:golden_hoe" , "count": 1}, "slot": "hotbar1" } - ] - }, - { "at": 8, "do": "remove", "pos": [2, 1, 3] }, - { "at": 9, "do": "tp", "entity_alias": "player", "rot": [-90, 37], "pos": [0.5, 0, 3.5] }, - {"at": 9, "do": "interact"}, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [2, 0, 3], "is": {"id": "minecraft:dirt"} } - ] - } - ] -} - diff --git a/tests/items/hoe/hoe_breaks_after_32_tills.json b/tests/items/hoe/hoe_breaks_after_32_tills.json deleted file mode 100644 index 046d8b1..0000000 --- a/tests/items/hoe/hoe_breaks_after_32_tills.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:golden_hoe", "minecraft:grass_block", "minecraft:farmland"], - "name": "hoe_breaks_after_32_tills", - "description": "A golden hoe (durability 32) loses 1 durability per successful till: after 31 tills it is still in hotbar1, and the 32nd till succeeds and breaks it, leaving hotbar1 empty. The spare 33rd grass block that was never clicked is still grass; this last check is only a sanity check that no extra till happened, since the hand is empty and cannot show a refused till.", - "tags": ["item", "hoe", "tilling", "durability", "player"], - "setup": { - "cleanup": { - "region": [ [0, -1, 0], [7, 4, 4] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, 0], [7, 0, 3] ], - "with": {"id": "minecraft:grass_block"} - }, - { "at": 0, "do": "place", "pos": [0, 0, 4], "block": {"id": "minecraft:grass_block"} }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 0.5], "rot": [0, 90] }, - {"at": 2, "do": "interact"}, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, - {"at": 3, "do": "interact"}, - { "at": 4, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 0.5], "rot": [0, 90] }, - {"at": 4, "do": "interact"}, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 0.5], "rot": [0, 90] }, - {"at": 5, "do": "interact"}, - { "at": 6, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 0.5], "rot": [0, 90] }, - {"at": 6, "do": "interact"}, - { "at": 7, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, 0.5], "rot": [0, 90] }, - {"at": 7, "do": "interact"}, - { "at": 8, "do": "tp", "entity_alias": "player", "pos": [7.5, 2, 0.5], "rot": [0, 90] }, - {"at": 8, "do": "interact"}, - { "at": 9, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 1.5], "rot": [0, 90] }, - {"at": 9, "do": "interact"}, - { "at": 10, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 1.5], "rot": [0, 90] }, - {"at": 10, "do": "interact"}, - { "at": 11, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 1.5], "rot": [0, 90] }, - {"at": 11, "do": "interact"}, - { "at": 12, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 1.5], "rot": [0, 90] }, - {"at": 12, "do": "interact"}, - { "at": 13, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 1.5], "rot": [0, 90] }, - {"at": 13, "do": "interact"}, - { "at": 14, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 1.5], "rot": [0, 90] }, - {"at": 14, "do": "interact"}, - { "at": 15, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, 1.5], "rot": [0, 90] }, - {"at": 15, "do": "interact"}, - { "at": 16, "do": "tp", "entity_alias": "player", "pos": [7.5, 2, 1.5], "rot": [0, 90] }, - {"at": 16, "do": "interact"}, - { "at": 17, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 2.5], "rot": [0, 90] }, - {"at": 17, "do": "interact"}, - { "at": 18, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 2.5], "rot": [0, 90] }, - {"at": 18, "do": "interact"}, - { "at": 19, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 2.5], "rot": [0, 90] }, - {"at": 19, "do": "interact"}, - { "at": 20, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 2.5], "rot": [0, 90] }, - {"at": 20, "do": "interact"}, - { "at": 21, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 2.5], "rot": [0, 90] }, - {"at": 21, "do": "interact"}, - { "at": 22, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 2.5], "rot": [0, 90] }, - {"at": 22, "do": "interact"}, - { "at": 23, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, 2.5], "rot": [0, 90] }, - {"at": 23, "do": "interact"}, - { "at": 24, "do": "tp", "entity_alias": "player", "pos": [7.5, 2, 2.5], "rot": [0, 90] }, - {"at": 24, "do": "interact"}, - { "at": 25, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 3.5], "rot": [0, 90] }, - {"at": 25, "do": "interact"}, - { "at": 26, "do": "tp", "entity_alias": "player", "pos": [1.5, 2, 3.5], "rot": [0, 90] }, - {"at": 26, "do": "interact"}, - { "at": 27, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 3.5], "rot": [0, 90] }, - {"at": 27, "do": "interact"}, - { "at": 28, "do": "tp", "entity_alias": "player", "pos": [3.5, 2, 3.5], "rot": [0, 90] }, - {"at": 28, "do": "interact"}, - { "at": 29, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 3.5], "rot": [0, 90] }, - {"at": 29, "do": "interact"}, - { "at": 30, "do": "tp", "entity_alias": "player", "pos": [5.5, 2, 3.5], "rot": [0, 90] }, - {"at": 30, "do": "interact"}, - { "at": 31, "do": "tp", "entity_alias": "player", "pos": [6.5, 2, 3.5], "rot": [0, 90] }, - {"at": 31, "do": "interact"}, - { - "at": 32, - "do": "assert", - "checks": [ - { "pos": [6, 0, 3], "is": {"id": "minecraft:farmland", "moisture": 0} }, - { "is": {"id": "minecraft:golden_hoe", "count": 1} , "slot": "hotbar1" } - ] - }, - { "at": 32, "do": "tp", "entity_alias": "player", "pos": [7.5, 2, 3.5], "rot": [0, 90] }, - {"at": 32, "do": "interact"}, - { - "at": 33, - "do": "assert", - "checks": [ - { "pos": [7, 0, 3], "is": {"id": "minecraft:farmland", "moisture": 0} }, - { "is": "empty" , "slot": "hotbar1" } - ] - }, - { - "at": 34, - "do": "assert", - "checks": [ - { "pos": [0, 0, 4], "is": {"id": "minecraft:grass_block"} }, - { "is": "empty" , "slot": "hotbar1" } - ] - } - ] -} - diff --git a/tests/items/hoe/hoe_ignores_bottom_face.json b/tests/items/hoe/hoe_ignores_bottom_face.json deleted file mode 100644 index 0fdf4f5..0000000 --- a/tests/items/hoe/hoe_ignores_bottom_face.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:golden_hoe", "minecraft:dirt", "minecraft:farmland", "minecraft:stone"], - "name": "hoe_ignores_bottom_face", - "description": "Using a hoe on the bottom face of floating dirt does nothing (onlyIfAirAbove rejects Direction.DOWN); using it on the top face of the same dirt afterwards tills it.", - "tags": ["item", "hoe", "tilling", "edge-case", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [2, 5, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [0, 2, 0], "block": {"id": "minecraft:dirt" } } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt" } }, - { "is": {"id": "minecraft:golden_hoe", "count": 1}, "slot": "hotbar1" } - ] - }, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, - {"at": 3, "do": "interact"}, - { - "at": 4, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:farmland", "moisture": 0} } - ] - } - ] -} - diff --git a/tests/items/hoe/hoe_ignores_non_tillable_blocks.json b/tests/items/hoe/hoe_ignores_non_tillable_blocks.json deleted file mode 100644 index 21ec5a5..0000000 --- a/tests/items/hoe/hoe_ignores_non_tillable_blocks.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:golden_hoe", "minecraft:stone", "minecraft:farmland"], - "name": "hoe_ignores_non_tillable_blocks", - "description": "Using a hoe on stone or on already tilled farmland does nothing: they are not in the tillable table so useOn passes, and the hoe stays in hand.", - "tags": ["item", "hoe", "tilling", "edge-case", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [3, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [2, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 0} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, - {"at": 2, "do": "interact"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:stone"} }, - { "pos": [2, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} }, - { "is": {"id": "minecraft:golden_hoe", "count": 1} , "slot": "hotbar1" } - ] - } - ] -} - diff --git a/tests/items/hoe/hoe_rooted_dirt_drops_hanging_roots.json b/tests/items/hoe/hoe_rooted_dirt_drops_hanging_roots.json deleted file mode 100644 index e856f3c..0000000 --- a/tests/items/hoe/hoe_rooted_dirt_drops_hanging_roots.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:golden_hoe", "minecraft:rooted_dirt", "minecraft:dirt", "minecraft:hanging_roots"], - "name": "hoe_rooted_dirt_drops_hanging_roots", - "description": "Using a hoe on rooted dirt turns it into dirt and drops one hanging roots item (HoeItem TILLABLES, changeIntoStateAndDropItem).", - "tags": ["item", "hoe", "tilling", "drop", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [3, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:rooted_dirt"} }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt"} } , - { "slot": "hotbar1", "is": {"id": "minecraft:golden_hoe", "count": 1} } , - { "is": "minecraft:item", "count": 1, "pos": [0.5, 1, 0.5], "position_tolerance": 2.5 } - ] - } - ] -} - diff --git a/tests/items/hoe/hoe_rooted_dirt_ignores_face_and_cover.json b/tests/items/hoe/hoe_rooted_dirt_ignores_face_and_cover.json deleted file mode 100644 index e874696..0000000 --- a/tests/items/hoe/hoe_rooted_dirt_ignores_face_and_cover.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:golden_hoe", "minecraft:rooted_dirt", "minecraft:dirt", "minecraft:stone"], - "name": "hoe_rooted_dirt_ignores_face_and_cover", - "description": "Rooted dirt has an always-true predicate, so a hoe converts it to dirt when clicked from below, and when clicked on a side face with stone above it.", - "tags": ["item", "hoe", "tilling", "edge-case", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [4, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, -1, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [0, 2, 0], "block": {"id": "minecraft:rooted_dirt"} }, - { "pos": [3, 0, 0], "block": {"id": "minecraft:rooted_dirt"} }, - { "pos": [3, 1, 0], "block": {"id": "minecraft:stone" } } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt" } }, - { "is": {"id": "minecraft:golden_hoe", "count": 1}, "slot": "hotbar1" } - ] - }, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [1.5, 0, 0.5], "rot": [-90, 37] }, - {"at": 3, "do": "interact"}, - { - "at": 4, - "do": "assert", - "checks": [ - { "pos": [3, 0, 0], "is": {"id": "minecraft:dirt" } }, - { "pos": [3, 1, 0], "is": {"id": "minecraft:stone" } }, - { "is": {"id": "minecraft:golden_hoe", "count": 1}, "slot": "hotbar1" } - ] - } - ] -} - diff --git a/tests/items/hoe/hoe_tills_dirt.json b/tests/items/hoe/hoe_tills_dirt.json deleted file mode 100644 index aa7fe63..0000000 --- a/tests/items/hoe/hoe_tills_dirt.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:golden_hoe", "minecraft:dirt", "minecraft:farmland"], - "name": "hoe_tills_dirt", - "description": "Using a hoe on the top face of dirt with air above turns it into farmland (HoeItem TILLABLES) and the hoe stays in the hand.", - "tags": ["item", "hoe", "tilling", "block-state", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [3, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:dirt"} }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, - { "is": {"id": "minecraft:golden_hoe", "count": 1} , "slot": "hotbar1" } - ] - } - ] -} - diff --git a/tests/items/hoe/hoe_tills_dirt_path.json b/tests/items/hoe/hoe_tills_dirt_path.json deleted file mode 100644 index b6e5bd6..0000000 --- a/tests/items/hoe/hoe_tills_dirt_path.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:golden_hoe", "minecraft:dirt_path", "minecraft:farmland"], - "name": "hoe_tills_dirt_path", - "description": "Using a hoe on the top face of dirt_path with air above turns it into farmland (HoeItem TILLABLES) and the hoe stays in the hand.", - "tags": ["item", "hoe", "tilling", "block-state", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [3, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:dirt_path"} }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, - { "is": {"id": "minecraft:golden_hoe", "count": 1} , "slot": "hotbar1" } - ] - } - ] -} - diff --git a/tests/items/hoe/hoe_tills_grass_block.json b/tests/items/hoe/hoe_tills_grass_block.json deleted file mode 100644 index a095162..0000000 --- a/tests/items/hoe/hoe_tills_grass_block.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:golden_hoe", "minecraft:grass_block", "minecraft:farmland"], - "name": "hoe_tills_grass_block", - "description": "Using a hoe on the top face of grass_block with air above turns it into farmland (HoeItem TILLABLES) and the hoe stays in the hand.", - "tags": ["item", "hoe", "tilling", "block-state", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [3, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, - { "is": {"id": "minecraft:golden_hoe", "count": 1} , "slot": "hotbar1" } - ] - } - ] -} - diff --git a/tests/items/hoe/hoe_turns_coarse_dirt_into_dirt.json b/tests/items/hoe/hoe_turns_coarse_dirt_into_dirt.json deleted file mode 100644 index 33a5d35..0000000 --- a/tests/items/hoe/hoe_turns_coarse_dirt_into_dirt.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "minecraftIds": ["minecraft:golden_hoe", "minecraft:coarse_dirt", "minecraft:dirt"], - "name": "hoe_turns_coarse_dirt_into_dirt", - "description": "Using a hoe on the top face of coarse_dirt with air above turns it into dirt (HoeItem TILLABLES) and the hoe stays in the hand.", - "tags": ["item", "hoe", "tilling", "block-state", "player"], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [3, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:golden_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:coarse_dirt"} }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt" } }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, - { "is": {"id": "minecraft:golden_hoe", "count": 1}, "slot": "hotbar1" } - ] - } - ] -} - diff --git a/tests/items/shovel/shovel_breaks_after_32_flattens.json b/tests/items/shovel/shovel_breaks_after_32_flattens.json deleted file mode 100644 index e32dd11..0000000 --- a/tests/items/shovel/shovel_breaks_after_32_flattens.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "shovel_breaks_after_32_flattens", - "description": "A fresh survival golden shovel (32 durability) survives 31 flattens and breaks on the 32nd: ShovelItem.useOn calls hurtAndBreak(1) per flatten and the hotbar slot becomes empty.", - "tags": ["item", "shovel", "durability", "player"], - "minecraftIds": ["minecraft:golden_shovel", "minecraft:dirt", "minecraft:dirt_path"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -3], [2, 3, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -3], [2, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 0, "do": "place", "pos": [1, 2, 0], "block": {"id": "minecraft:stone"} }, - { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 0] }, - {"at": 3, "do": "interact"}, - { "at": 4, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 5, "do": "interact"}, - { "at": 6, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 7, "do": "interact"}, - { "at": 8, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 9, "do": "interact"}, - { "at": 10, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 11, "do": "interact"}, - { "at": 12, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 13, "do": "interact"}, - { "at": 14, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 15, "do": "interact"}, - { "at": 16, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 17, "do": "interact"}, - { "at": 18, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 19, "do": "interact"}, - { "at": 20, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 21, "do": "interact"}, - { "at": 22, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 23, "do": "interact"}, - { "at": 24, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 25, "do": "interact"}, - { "at": 26, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 27, "do": "interact"}, - { "at": 28, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 29, "do": "interact"}, - { "at": 30, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 31, "do": "interact"}, - { "at": 32, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 33, "do": "interact"}, - { "at": 34, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 35, "do": "interact"}, - { "at": 36, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 37, "do": "interact"}, - { "at": 38, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 39, "do": "interact"}, - { "at": 40, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 41, "do": "interact"}, - { "at": 42, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 43, "do": "interact"}, - { "at": 44, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 45, "do": "interact"}, - { "at": 46, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 47, "do": "interact"}, - { "at": 48, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 49, "do": "interact"}, - { "at": 50, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 51, "do": "interact"}, - { "at": 52, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 53, "do": "interact"}, - { "at": 54, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 55, "do": "interact"}, - { "at": 56, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 57, "do": "interact"}, - { "at": 58, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 59, "do": "interact"}, - { "at": 60, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 61, "do": "interact"}, - { "at": 62, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 63, "do": "interact"}, - { - "at": 64, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt_path" } }, - { "is": {"id": "minecraft:golden_shovel", "count": 1}, "slot": "hotbar1" } - ] - }, - { "at": 64, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 65, "do": "interact"}, - { - "at": 67, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt_path"} }, - { "is": "empty" , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/items/shovel/shovel_failed_uses_cost_no_durability.json b/tests/items/shovel/shovel_failed_uses_cost_no_durability.json deleted file mode 100644 index 065fc93..0000000 --- a/tests/items/shovel/shovel_failed_uses_cost_no_durability.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "shovel_failed_uses_cost_no_durability", - "description": "Uses that do nothing (golden shovel on stone) do not damage a survival shovel: after 5 no-op uses it still survives 31 flattens and breaks only on the 32nd, so hurtAndBreak only runs on success.", - "tags": ["item", "shovel", "durability", "edge-case", "player"], - "minecraftIds": ["minecraft:golden_shovel", "minecraft:dirt", "minecraft:dirt_path"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -3], [2, 3, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:golden_shovel", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -3], [2, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 0, "do": "place", "pos": [1, 2, 0], "block": {"id": "minecraft:stone"} }, - { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [1.5, 1, -2.5], "rot": [0, 0] }, - {"at": 3, "do": "interact"}, - {"at": 4, "do": "interact"}, - {"at": 5, "do": "interact"}, - {"at": 6, "do": "interact"}, - {"at": 7, "do": "interact"}, - { "at": 8, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 0] }, - {"at": 9, "do": "interact"}, - { "at": 10, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 11, "do": "interact"}, - { "at": 12, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 13, "do": "interact"}, - { "at": 14, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 15, "do": "interact"}, - { "at": 16, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 17, "do": "interact"}, - { "at": 18, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 19, "do": "interact"}, - { "at": 20, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 21, "do": "interact"}, - { "at": 22, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 23, "do": "interact"}, - { "at": 24, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 25, "do": "interact"}, - { "at": 26, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 27, "do": "interact"}, - { "at": 28, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 29, "do": "interact"}, - { "at": 30, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 31, "do": "interact"}, - { "at": 32, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 33, "do": "interact"}, - { "at": 34, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 35, "do": "interact"}, - { "at": 36, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 37, "do": "interact"}, - { "at": 38, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 39, "do": "interact"}, - { "at": 40, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 41, "do": "interact"}, - { "at": 42, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 43, "do": "interact"}, - { "at": 44, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 45, "do": "interact"}, - { "at": 46, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 47, "do": "interact"}, - { "at": 48, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 49, "do": "interact"}, - { "at": 50, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 51, "do": "interact"}, - { "at": 52, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 53, "do": "interact"}, - { "at": 54, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 55, "do": "interact"}, - { "at": 56, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 57, "do": "interact"}, - { "at": 58, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 59, "do": "interact"}, - { "at": 60, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 61, "do": "interact"}, - { "at": 62, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 63, "do": "interact"}, - { "at": 64, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 65, "do": "interact"}, - { "at": 66, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 67, "do": "interact"}, - { "at": 68, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 69, "do": "interact"}, - { - "at": 70, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt_path" } }, - { "is": {"id": "minecraft:golden_shovel", "count": 1}, "slot": "hotbar1" } - ] - }, - { "at": 70, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:dirt"} }, - {"at": 71, "do": "interact"}, - { - "at": 73, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:dirt_path"} }, - { "is": "empty" , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/portal/end_portal/end_portal_survives_explosion.json b/tests/portal/end_portal/end_portal_survives_explosion.json deleted file mode 100644 index aac309d..0000000 --- a/tests/portal/end_portal/end_portal_survives_explosion.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "end_portal_survives_explosion", - "description": "A TNT explosion next to an end portal destroys nearby glass but the end portal survives.", - "tags": ["portal", "end_portal", "explosion"], - "minecraftIds": ["minecraft:end_portal", "minecraft:tnt", "minecraft:obsidian", "minecraft:glass"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [4, 2, 4] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:obsidian" } }, - { "pos": [0, 0, 1], "block": {"id": "minecraft:obsidian" } }, - { "pos": [0, 0, 2], "block": {"id": "minecraft:obsidian" } }, - { "pos": [0, 0, 3], "block": {"id": "minecraft:obsidian" } }, - { "pos": [0, 0, 4], "block": {"id": "minecraft:obsidian" } }, - { "pos": [1, 0, 0], "block": {"id": "minecraft:obsidian" } }, - { "pos": [1, 0, 1], "block": {"id": "minecraft:obsidian" } }, - { "pos": [1, 0, 2], "block": {"id": "minecraft:obsidian" } }, - { "pos": [1, 0, 3], "block": {"id": "minecraft:obsidian" } }, - { "pos": [1, 0, 4], "block": {"id": "minecraft:obsidian" } }, - { "pos": [2, 0, 0], "block": {"id": "minecraft:obsidian" } }, - { "pos": [2, 0, 1], "block": {"id": "minecraft:obsidian" } }, - { "pos": [2, 0, 2], "block": {"id": "minecraft:obsidian" } }, - { "pos": [2, 0, 3], "block": {"id": "minecraft:obsidian" } }, - { "pos": [2, 0, 4], "block": {"id": "minecraft:obsidian" } }, - { "pos": [3, 0, 0], "block": {"id": "minecraft:obsidian" } }, - { "pos": [3, 0, 1], "block": {"id": "minecraft:obsidian" } }, - { "pos": [3, 0, 2], "block": {"id": "minecraft:obsidian" } }, - { "pos": [3, 0, 3], "block": {"id": "minecraft:obsidian" } }, - { "pos": [3, 0, 4], "block": {"id": "minecraft:obsidian" } }, - { "pos": [4, 0, 0], "block": {"id": "minecraft:obsidian" } }, - { "pos": [4, 0, 1], "block": {"id": "minecraft:obsidian" } }, - { "pos": [4, 0, 2], "block": {"id": "minecraft:obsidian" } }, - { "pos": [4, 0, 3], "block": {"id": "minecraft:obsidian" } }, - { "pos": [4, 0, 4], "block": {"id": "minecraft:obsidian" } }, - { "pos": [2, 1, 2], "block": {"id": "minecraft:end_portal"} }, - { "pos": [0, 1, 2], "block": {"id": "minecraft:glass" } } - ] - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [2, 1, 2], "is": {"id": "minecraft:end_portal"} }, - { "pos": [0, 1, 2], "is": {"id": "minecraft:glass" } } - ] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [1.5, 1, 2.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [2, 1, 2], "is": {"id": "minecraft:end_portal"} }, - { "pos": [0, 1, 2], "is": {"id": "minecraft:air" } } - ] - } - ] -} - diff --git a/tests/redstone/copper_bulb/copper_bulb_axe_no_effect.json b/tests/redstone/copper_bulb/copper_bulb_axe_no_effect.json deleted file mode 100644 index 8f7a8e7..0000000 --- a/tests/redstone/copper_bulb/copper_bulb_axe_no_effect.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_bulb_axe_no_effect", - "description": "Using an axe on an unaffected copper bulb does nothing, since it is neither waxed nor weathered.", - "tags": ["copper-bulb", "axe", "interaction", "player"], - "minecraftIds": ["minecraft:copper_bulb", "minecraft:iron_axe"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [2, 3, 3] ] - }, - "player": { - "selected_hotbar": 1, - "game_mode": "Survival", - "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} } - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 1, 2], "block": {"id": "minecraft:copper_bulb"} }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, - {"at": 2, "do": "interact"}, - { - "at": 4, - "do": "assert", - "checks": [ - { "pos": [0, 1, 2], "is": {"id": "minecraft:copper_bulb", "lit": false, "powered": false} }, - { "slot": "hotbar1", "is": {"id": "minecraft:iron_axe", "count": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/copper_bulb/copper_bulb_honeycomb_waxes.json b/tests/redstone/copper_bulb/copper_bulb_honeycomb_waxes.json deleted file mode 100644 index f1b2e3a..0000000 --- a/tests/redstone/copper_bulb/copper_bulb_honeycomb_waxes.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_bulb_honeycomb_waxes", - "description": "Using honeycomb on a lit, powered copper bulb turns it into a waxed copper bulb that keeps its lit and powered state and consumes one honeycomb.", - "tags": ["copper-bulb", "honeycomb", "wax-on", "interaction", "player"], - "minecraftIds": [ - "minecraft:copper_bulb" , "minecraft:waxed_copper_bulb", "minecraft:honeycomb" , - "minecraft:redstone_block" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [2, 3, 3] ] - }, - "player": { - "selected_hotbar": 1, - "game_mode": "Survival", - "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} } - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 2], "block": {"id": "minecraft:copper_bulb" } }, - { "pos": [1, 1, 2], "block": {"id": "minecraft:redstone_block"} } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, - {"at": 2, "do": "interact"}, - { - "at": 4, - "do": "assert", - "checks": [ - { "pos": [0, 1, 2], "is": {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": true} }, - { "slot": "hotbar1", "is": {"id": "minecraft:honeycomb", "count": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/copper_bulb/copper_bulb_oxidizes_over_time.json b/tests/redstone/copper_bulb/copper_bulb_oxidizes_over_time.json deleted file mode 100644 index 8524053..0000000 --- a/tests/redstone/copper_bulb/copper_bulb_oxidizes_over_time.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_bulb_oxidizes_over_time", - "description": "With a very high random tick speed an isolated unaffected copper bulb weathers to a later oxidation stage and keeps its lit state.", - "tags": ["copper-bulb", "weathering", "random-tick", "world-config"], - "minecraftIds": [ - "minecraft:copper_bulb" , "minecraft:exposed_copper_bulb" , "minecraft:weathered_copper_bulb", - "minecraft:oxidized_copper_bulb" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [1, 1, 1] ] - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": {"id": "minecraft:copper_bulb", "lit": true, "powered": false} - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:copper_bulb", "lit": true, "powered": false} } - ] - }, - { - "at": 200, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": [ - {"id": "minecraft:exposed_copper_bulb" , "lit": true, "powered": false}, - {"id": "minecraft:weathered_copper_bulb", "lit": true, "powered": false}, - {"id": "minecraft:oxidized_copper_bulb" , "lit": true, "powered": false} - ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/copper_bulb/exposed_bulb_axe_scrapes.json b/tests/redstone/copper_bulb/exposed_bulb_axe_scrapes.json deleted file mode 100644 index 715776a..0000000 --- a/tests/redstone/copper_bulb/exposed_bulb_axe_scrapes.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "exposed_bulb_axe_scrapes", - "description": "Using an axe on a lit, powered exposed copper bulb scrapes it back to a copper bulb that keeps its lit and powered state.", - "tags": ["copper-bulb", "exposed-copper-bulb", "axe", "scrape", "interaction", "player"], - "minecraftIds": [ - "minecraft:exposed_copper_bulb", "minecraft:copper_bulb" , "minecraft:iron_axe" , - "minecraft:redstone_block" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [2, 3, 3] ] - }, - "player": { - "selected_hotbar": 1, - "game_mode": "Survival", - "inventory": { "hotbar1": {"id": "minecraft:iron_axe", "count": 1} } - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 2], "block": {"id": "minecraft:exposed_copper_bulb"} }, - { "pos": [1, 1, 2], "block": {"id": "minecraft:redstone_block" } } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, 0] }, - {"at": 3, "do": "interact"}, - { - "at": 6, - "do": "assert", - "checks": [ - { "pos": [0, 1, 2], "is": {"id": "minecraft:copper_bulb", "lit": true, "powered": true} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/copper_bulb/exposed_bulb_oxidizes_over_time.json b/tests/redstone/copper_bulb/exposed_bulb_oxidizes_over_time.json deleted file mode 100644 index bcc15f0..0000000 --- a/tests/redstone/copper_bulb/exposed_bulb_oxidizes_over_time.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "exposed_bulb_oxidizes_over_time", - "description": "With a very high random tick speed an isolated exposed copper bulb weathers to a later oxidation stage and keeps its lit state.", - "tags": ["copper-bulb", "exposed-copper-bulb", "weathering", "random-tick", "world-config"], - "minecraftIds": [ - "minecraft:exposed_copper_bulb" , "minecraft:weathered_copper_bulb", "minecraft:oxidized_copper_bulb" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [1, 1, 1] ] - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": {"id": "minecraft:exposed_copper_bulb", "lit": true, "powered": false} - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:exposed_copper_bulb", "lit": true, "powered": false} } - ] - }, - { - "at": 150, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": [ - {"id": "minecraft:weathered_copper_bulb", "lit": true, "powered": false}, - {"id": "minecraft:oxidized_copper_bulb" , "lit": true, "powered": false} - ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/copper_bulb/oxidized_bulb_does_not_change.json b/tests/redstone/copper_bulb/oxidized_bulb_does_not_change.json deleted file mode 100644 index e6df10a..0000000 --- a/tests/redstone/copper_bulb/oxidized_bulb_does_not_change.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "oxidized_bulb_does_not_change", - "description": "With a very high random tick speed a fully oxidized copper bulb stays oxidized, since it has no next stage.", - "tags": ["copper-bulb", "oxidized-copper-bulb", "weathering", "random-tick", "world-config"], - "minecraftIds": ["minecraft:oxidized_copper_bulb"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [1, 1, 1] ] - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": {"id": "minecraft:oxidized_copper_bulb", "lit": true, "powered": false} - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:oxidized_copper_bulb", "lit": true, "powered": false} } - ] - }, - { - "at": 150, - "do": "assert", - "checks": [ - { - "pos": [ 0 , 0, 0 ], - "is" : [ {"id": "minecraft:oxidized_copper_bulb", "lit": true, "powered": false} ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/copper_bulb/waxed_bulb_does_not_oxidize.json b/tests/redstone/copper_bulb/waxed_bulb_does_not_oxidize.json deleted file mode 100644 index cfc7b48..0000000 --- a/tests/redstone/copper_bulb/waxed_bulb_does_not_oxidize.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "waxed_bulb_does_not_oxidize", - "description": "With a very high random tick speed a waxed copper bulb never changes oxidation stage.", - "tags": ["copper-bulb", "waxed-copper-bulb", "weathering", "random-tick", "world-config"], - "minecraftIds": ["minecraft:waxed_copper_bulb"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [1, 1, 1] ] - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": false} - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": false} } - ] - }, - { - "at": 150, - "do": "assert", - "checks": [ - { - "pos": [ 0 , 0, 0 ], - "is" : [ {"id": "minecraft:waxed_copper_bulb", "lit": true, "powered": false} ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/jukebox/jukebox_explosion_drops_itself.json b/tests/redstone/jukebox/jukebox_explosion_drops_itself.json deleted file mode 100644 index 0d9e1dd..0000000 --- a/tests/redstone/jukebox/jukebox_explosion_drops_itself.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "jukebox_explosion_drops_itself", - "description": "A jukebox without a disc destroyed by a TNT explosion drops exactly one item, the jukebox itself.", - "tags": ["jukebox", "block-entity", "explosion", "drops", "tnt"], - "minecraftIds": ["minecraft:jukebox", "minecraft:obsidian", "minecraft:tnt", "minecraft:item"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-3, 0, -3], [3, 4, 3] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-3, 0, -3], [3, 0, 3] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:jukebox"} }, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:jukebox", "has_record": false} }, - { "is": "minecraft:item" , "exists": false } - ] - }, - { - "at": 3, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [1.5, 1, 0.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 8, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:jukebox"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/lightning_rods/exposed_lightning_rod_axe_scrapes.json b/tests/redstone/lightning_rods/exposed_lightning_rod_axe_scrapes.json deleted file mode 100644 index c2dca60..0000000 --- a/tests/redstone/lightning_rods/exposed_lightning_rod_axe_scrapes.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "exposed_lightning_rod_axe_scrapes", - "description": "Using an axe on an exposed lightning rod scrapes it back one stage to lightning_rod, keeping facing, powered and waterlogged state.", - "tags": ["redstone", "lightning-rod", "exposed", "axe", "scrape", "player"], - "minecraftIds": ["minecraft:exposed_lightning_rod", "minecraft:lightning_rod", "minecraft:stone_axe"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [4, 1, 0] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:stone_axe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [4, 0, 0], "block": {"id": "minecraft:stone"} }, - { - "pos": [0, 1, 0], - "block": { - "id" : "minecraft:exposed_lightning_rod", - "facing" : "up" , - "powered" : "false" , - "waterlogged": "false" - } - }, - { - "pos": [4, 1, 0], - "block": { - "id" : "minecraft:exposed_lightning_rod", - "facing" : "east" , - "powered" : "false" , - "waterlogged": "true" - } - } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, - {"at": 2, "do": "interact"}, - { - "at": 3, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": {"id": "minecraft:lightning_rod", "facing": "up", "powered": "false", "waterlogged": "false"} - }, - { - "pos": [4, 1, 0], - "is": {"id": "minecraft:lightning_rod", "facing": "east", "powered": "false", "waterlogged": "true"} - }, - { "slot": "hotbar1", "is": {"id": "minecraft:stone_axe", "count": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/lightning_rods/exposed_lightning_rod_honeycomb_waxes.json b/tests/redstone/lightning_rods/exposed_lightning_rod_honeycomb_waxes.json deleted file mode 100644 index 0c9dd38..0000000 --- a/tests/redstone/lightning_rods/exposed_lightning_rod_honeycomb_waxes.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "exposed_lightning_rod_honeycomb_waxes", - "description": "Using honeycomb on an exposed lightning rod waxes it to waxed_exposed_lightning_rod, keeping facing, powered and waterlogged state, and consumes one honeycomb.", - "tags": ["redstone", "lightning-rod", "exposed", "honeycomb", "waxing", "player"], - "minecraftIds": [ - "minecraft:exposed_lightning_rod" , - "minecraft:waxed_exposed_lightning_rod", - "minecraft:honeycomb" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [4, 1, 0] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:honeycomb", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [4, 0, 0], "block": {"id": "minecraft:stone"} }, - { - "pos": [0, 1, 0], - "block": { - "id" : "minecraft:exposed_lightning_rod", - "facing" : "up" , - "powered" : "false" , - "waterlogged": "false" - } - }, - { - "pos": [4, 1, 0], - "block": { - "id" : "minecraft:exposed_lightning_rod", - "facing" : "east" , - "powered" : "false" , - "waterlogged": "true" - } - } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, - {"at": 2, "do": "interact"}, - { - "at": 3, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": { - "id" : "minecraft:waxed_exposed_lightning_rod", - "facing" : "up" , - "powered" : "false" , - "waterlogged": "false" - } - }, - { - "pos": [4, 1, 0], - "is": { - "id" : "minecraft:waxed_exposed_lightning_rod", - "facing" : "east" , - "powered" : "false" , - "waterlogged": "true" - } - }, - {"slot": "hotbar1", "is": "empty"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/lightning_rods/exposed_lightning_rod_struck_by_lightning.json b/tests/redstone/lightning_rods/exposed_lightning_rod_struck_by_lightning.json deleted file mode 100644 index 70ae73f..0000000 --- a/tests/redstone/lightning_rods/exposed_lightning_rod_struck_by_lightning.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "exposed_lightning_rod_struck_by_lightning", - "description": "A lightning bolt striking an exposed lightning rod resets it to plain lightning_rod (keeping facing), powers it and a lamp beside it, and the replacement rod still turns unpowered after about 8 ticks because placing it schedules a new reset tick.", - "tags": ["redstone", "lightning-rod", "exposed", "lightning", "weathering-reset", "powered", "scheduled-tick"], - "minecraftIds": [ - "minecraft:exposed_lightning_rod", "minecraft:lightning_rod" , "minecraft:lightning_bolt" , - "minecraft:redstone_lamp" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [1, 1, 0] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [1, 0, 0], "block": {"id": "minecraft:redstone_lamp"} }, - { - "pos": [0, 0, 0], - "block": { - "id": "minecraft:exposed_lightning_rod", - "facing": "up", - "powered": false, - "waterlogged": false - } - } - ] - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:exposed_lightning_rod", "powered": false } }, - { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": false} } - ] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "bolt", - "entity_type": "minecraft:lightning_bolt", - "pos": [0.5, 1, 0.5] - }, - { - "at": 5, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": {"id": "minecraft:lightning_rod", "facing": "up", "powered": true, "waterlogged": false} - }, - { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp", "lit": true} } - ] - }, - { - "at": 25, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": {"id": "minecraft:lightning_rod", "facing": "up", "powered": false, "waterlogged": false} - }, - { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp", "lit": false} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/lightning_rods/waxed_lightning_rod_explosion_drops_self.json b/tests/redstone/lightning_rods/waxed_lightning_rod_explosion_drops_self.json deleted file mode 100644 index d8a2afa..0000000 --- a/tests/redstone/lightning_rods/waxed_lightning_rod_explosion_drops_self.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "waxed_lightning_rod_explosion_drops_self", - "description": "A lightning rod destroyed by an explosion (no tool involved) drops exactly one waxed_lightning_rod item, because its loot table drops itself unconditionally.", - "tags": ["redstone", "lightning-rod", "waxed", "drops", "explosion", "loot-table"], - "minecraftIds": ["minecraft:waxed_lightning_rod", "minecraft:tnt", "minecraft:obsidian"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [12, 3, 2] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [8, 0, 0], [12, 0, 2] ], - "with": {"id": "minecraft:obsidian"} - }, - { - "at": 0, - "do": "place", - "pos": [10, 1, 1], - "block": {"id": "minecraft:waxed_lightning_rod", "facing": "up", "powered": false, "waterlogged": false} - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [10, 1, 1], "is": {"id": "minecraft:waxed_lightning_rod"} } - ] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [10.5, 1, 0.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 30, - "do": "assert", - "checks": [ - { "pos": [10, 1, 1], "is": {"id": "minecraft:air"} }, - { - "is": "minecraft:item", - "exists": true, - "count": 1, - "Item.id": "minecraft:waxed_lightning_rod", - "Item.count": 1 - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/lightning_rods_gamerule/exposed_lightning_rod_weathering.json b/tests/redstone/lightning_rods_gamerule/exposed_lightning_rod_weathering.json deleted file mode 100644 index 928091c..0000000 --- a/tests/redstone/lightning_rods_gamerule/exposed_lightning_rod_weathering.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "exposed_lightning_rod_weathering", - "description": "With a high random tick speed an unwaxed exposed lightning rod weathers only forward along its chain (exposed, weathered, oxidized) and keeps its facing, powered and waterlogged state. Representative of lightning_rod, exposed, weathered and oxidized rods (WeatheringLightningRodBlock). Weathering is random: failing to move at least one stage in 300 ticks has a probability of roughly 2e-6.", - "tags": ["redstone", "lightning-rod", "weathering", "random-tick", "modifies-gamerule"], - "minecraftIds": [ - "minecraft:exposed_lightning_rod" , "minecraft:weathered_lightning_rod", "minecraft:oxidized_lightning_rod" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id" : "minecraft:exposed_lightning_rod", - "facing" : "east" , - "powered" : "false" , - "waterlogged": "false" - } - }, - { - "at": [1, 50, 100, 150, 200, 250], - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": [ - { - "id" : "minecraft:exposed_lightning_rod", - "facing" : "east" , - "powered" : "false" , - "waterlogged": "false" - }, - { - "id" : "minecraft:weathered_lightning_rod", - "facing" : "east" , - "powered" : "false" , - "waterlogged": "false" - }, - { - "id" : "minecraft:oxidized_lightning_rod", - "facing" : "east" , - "powered" : "false" , - "waterlogged": "false" - } - ] - } - ] - }, - { - "at": 300, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": [ - { - "id" : "minecraft:weathered_lightning_rod", - "facing" : "east" , - "powered" : "false" , - "waterlogged": "false" - }, - { - "id" : "minecraft:oxidized_lightning_rod", - "facing" : "east" , - "powered" : "false" , - "waterlogged": "false" - } - ] - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/lightning_rods_gamerule/waxed_lightning_rod_no_weathering.json b/tests/redstone/lightning_rods_gamerule/waxed_lightning_rod_no_weathering.json deleted file mode 100644 index 9eaa6bd..0000000 --- a/tests/redstone/lightning_rods_gamerule/waxed_lightning_rod_no_weathering.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "waxed_lightning_rod_no_weathering", - "description": "A waxed lightning rod never weathers: with a very high random tick speed it stays waxed_lightning_rod with its state unchanged. Note: flintcli does not reset random_tick_speed after the test.", - "tags": ["redstone", "lightning-rod", "waxed", "weathering", "random-tick", "modifies-gamerule"], - "minecraftIds": ["minecraft:waxed_lightning_rod"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id" : "minecraft:waxed_lightning_rod", - "facing" : "east" , - "powered" : "false" , - "waterlogged": "false" - } - }, - { - "at": [1, 100, 200, 300], - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id" : "minecraft:waxed_lightning_rod", - "facing" : "east" , - "powered" : "false" , - "waterlogged": "false" - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/pressure_plate/crimson_pressure_plate_activation.json b/tests/redstone/pressure_plate/crimson_pressure_plate_activation.json deleted file mode 100644 index b2d4a1c..0000000 --- a/tests/redstone/pressure_plate/crimson_pressure_plate_activation.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "crimson_pressure_plate_activation", - "description": "An entity landing on a crimson pressure plate powers it, strongly powers the block below (lighting an adjacent lamp), and the plate releases about 20 ticks after the entity is removed.", - "tags": ["redstone", "pressure-plate", "entity-trigger", "strong-power"], - "minecraftIds": ["minecraft:crimson_pressure_plate", "minecraft:redstone_lamp"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [2, 3, 1] ] - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:redstone_lamp"} }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:crimson_pressure_plate"} }, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_pressure_plate", "powered": false } }, - { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": false} } - ] - }, - { - "at": 3, - "do": "summon", - "entity_alias": "trigger", - "entity_type": "minecraft:item", - "pos": [0.5, 1, 0.5], - "Item": "{count: 1, id: \"minecraft:stone\"}", - "PickupDelay": "32767s" - }, - { - "at": 8, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_pressure_plate", "powered": true } }, - { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": true} } - ] - }, - { "at": 10, "do": "tp", "entity_alias": "trigger", "pos": [0.5, 10, 5.5] }, - { - "at": 11, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_pressure_plate", "powered": true } }, - { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": true} } - ] - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:crimson_pressure_plate", "powered": false } }, - { "pos": [1, 0, 0], "is": {"id": "minecraft:redstone_lamp" , "lit": false} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/pressure_plate/heavy_weighted_pressure_plate_power_levels.json b/tests/redstone/pressure_plate/heavy_weighted_pressure_plate_power_levels.json deleted file mode 100644 index c28440f..0000000 --- a/tests/redstone/pressure_plate/heavy_weighted_pressure_plate_power_levels.json +++ /dev/null @@ -1,727 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "heavy_weighted_pressure_plate_power_levels", - "description": "A heavy weighted pressure plate needs ten times as many entities as a light one per power level: ceil(count / 150 * 15).", - "tags": ["redstone", "pressure-plate", "weighted", "entity-trigger", "power"], - "minecraftIds": ["minecraft:heavy_weighted_pressure_plate"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [8, 2, 1] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, 0], [8, 0, 0] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:heavy_weighted_pressure_plate"} }, - { "at": 1, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:heavy_weighted_pressure_plate"} }, - { "at": 1, "do": "place", "pos": [4, 1, 0], "block": {"id": "minecraft:heavy_weighted_pressure_plate"} }, - { "at": 1, "do": "place", "pos": [6, 1, 0], "block": {"id": "minecraft:heavy_weighted_pressure_plate"} }, - { - "at": 2, - "do": "summon", - "entity_alias": "s0_0", - "entity_type": "minecraft:armor_stand", - "pos": [0.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s1_0", - "entity_type": "minecraft:armor_stand", - "pos": [2.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s1_1", - "entity_type": "minecraft:armor_stand", - "pos": [2.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s1_2", - "entity_type": "minecraft:armor_stand", - "pos": [2.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s1_3", - "entity_type": "minecraft:armor_stand", - "pos": [2.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s1_4", - "entity_type": "minecraft:armor_stand", - "pos": [2.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s1_5", - "entity_type": "minecraft:armor_stand", - "pos": [2.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s1_6", - "entity_type": "minecraft:armor_stand", - "pos": [2.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s1_7", - "entity_type": "minecraft:armor_stand", - "pos": [2.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s1_8", - "entity_type": "minecraft:armor_stand", - "pos": [2.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s1_9", - "entity_type": "minecraft:armor_stand", - "pos": [2.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s2_0", - "entity_type": "minecraft:armor_stand", - "pos": [4.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s2_1", - "entity_type": "minecraft:armor_stand", - "pos": [4.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s2_2", - "entity_type": "minecraft:armor_stand", - "pos": [4.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s2_3", - "entity_type": "minecraft:armor_stand", - "pos": [4.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s2_4", - "entity_type": "minecraft:armor_stand", - "pos": [4.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s2_5", - "entity_type": "minecraft:armor_stand", - "pos": [4.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s2_6", - "entity_type": "minecraft:armor_stand", - "pos": [4.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s2_7", - "entity_type": "minecraft:armor_stand", - "pos": [4.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s2_8", - "entity_type": "minecraft:armor_stand", - "pos": [4.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s2_9", - "entity_type": "minecraft:armor_stand", - "pos": [4.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s2_10", - "entity_type": "minecraft:armor_stand", - "pos": [4.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_0", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_1", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_2", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_3", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_4", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_5", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_6", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_7", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_8", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_9", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_10", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_11", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_12", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_13", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_14", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_15", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_16", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_17", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_18", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_19", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_20", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_21", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_22", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_23", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_24", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_25", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_26", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_27", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_28", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_29", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_30", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_31", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_32", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_33", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_34", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_35", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_36", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_37", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_38", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_39", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_40", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_41", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_42", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_43", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_44", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_45", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_46", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_47", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_48", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_49", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_50", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_51", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_52", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_53", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_54", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_55", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_56", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_57", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_58", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_59", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_60", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_61", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_62", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_63", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_64", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_65", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_66", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_67", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_68", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_69", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_70", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_71", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_72", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_73", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "s3_74", - "entity_type": "minecraft:armor_stand", - "pos": [6.5, 1, 0.5] - }, - { - "at": 14, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 1} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 1} }, - { "pos": [4, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 2} }, - { "pos": [6, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 8} } - ] - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 1} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 1} }, - { "pos": [4, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 2} }, - { "pos": [6, 1, 0], "is": {"id": "minecraft:heavy_weighted_pressure_plate", "power": 8} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/redstone/pressure_plate/oak_pressure_plate_stays_pressed.json b/tests/redstone/pressure_plate/oak_pressure_plate_stays_pressed.json deleted file mode 100644 index cf098d0..0000000 --- a/tests/redstone/pressure_plate/oak_pressure_plate_stays_pressed.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "oak_pressure_plate_stays_pressed", - "description": "A wooden pressure plate keeps being powered across several 20 tick re-checks while the entity stays on it.", - "tags": ["redstone", "pressure-plate", "entity-trigger", "scheduled-tick"], - "minecraftIds": ["minecraft:oak_pressure_plate"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [1, 2, 1] ] - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_pressure_plate"} }, - { - "at": 2, - "do": "summon", - "entity_alias": "trigger", - "entity_type": "minecraft:item", - "pos": [0.5, 1, 0.5], - "Item": "{count: 1, id: \"minecraft:stone\"}", - "PickupDelay": "32767s" - }, - { - "at": 6, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": true} } - ] - }, - { - "at": 25, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": true} } - ] - }, - { - "at": 45, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": true} } - ] - }, - { - "at": 65, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": true} } - ] - }, - { - "at": 85, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_pressure_plate", "powered": true} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/bamboo/bamboo_stacking_on_stalk.json b/tests/vegetation/bamboo/bamboo_stacking_on_stalk.json deleted file mode 100644 index 25c29ca..0000000 --- a/tests/vegetation/bamboo/bamboo_stacking_on_stalk.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "bamboo_stacking_on_stalk", - "description": "The bamboo item placed on top of a bamboo stalk creates a new stalk that copies the lower stalk's age: thick (age 1) on a thick stalk, thin (age 0) on a thin one.", - "tags": ["vegetation", "bamboo", "placement", "age", "player"], - "minecraftIds": ["minecraft:bamboo", "minecraft:dirt", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-3, 0, -1], [5, 5, 1] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-3, 0, -1], [5, 5, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [-3, 1, 0], [5, 4, 0] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:dirt" } }, - { "pos": [3, 1, 0], "block": {"id": "minecraft:dirt" } }, - { "pos": [0, 2, 0], "block": {"id": "minecraft:bamboo", "age": 0} }, - { "pos": [3, 2, 0], "block": {"id": "minecraft:bamboo", "age": 1} }, - { "pos": [1, 3, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [4, 3, 0], "block": {"id": "minecraft:stone" } } - ] - }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [-1.5, 1.88, 0.5], "rot": [-90, 0] }, - {"at": 2, "do": "interact", "item": "minecraft:bamboo"}, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [2.5, 1.88, 0.5], "rot": [-90, 0] }, - {"at": 3, "do": "interact", "item": "minecraft:bamboo"}, - { - "at": 4, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:bamboo", "age": 0} } , - { "pos": [0, 3, 0], "is": {"id": "minecraft:bamboo", "age": 0, "leaves": "none", "stage": 0} }, - { "pos": [3, 2, 0], "is": {"id": "minecraft:bamboo", "age": 1} } , - { "pos": [3, 3, 0], "is": {"id": "minecraft:bamboo", "age": 1, "leaves": "none", "stage": 0} }, - {"slot": "hotbar1", "is": "empty"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/big_dripleaf/big_dripleaf_place_on_supports.json b/tests/vegetation/big_dripleaf/big_dripleaf_place_on_supports.json deleted file mode 100644 index 6d27bb2..0000000 --- a/tests/vegetation/big_dripleaf/big_dripleaf_place_on_supports.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "big_dripleaf_place_on_supports", - "description": "A big dripleaf item can be placed on blocks from the supports_big_dripleaf tag: grass block, moss block, clay, mud and farmland.", - "tags": ["vegetation", "big-dripleaf", "placement", "player", "support"], - "minecraftIds": [ - "minecraft:big_dripleaf", "minecraft:grass_block" , "minecraft:moss_block" , "minecraft:clay" , - "minecraft:mud" , "minecraft:farmland" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [8, 1, 0] ] - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [2, 0, 0], "block": {"id": "minecraft:moss_block" } }, - { "pos": [4, 0, 0], "block": {"id": "minecraft:clay" } }, - { "pos": [6, 0, 0], "block": {"id": "minecraft:mud" } }, - { "pos": [8, 0, 0], "block": {"id": "minecraft:farmland" } } - ] - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block"} }, - { "pos": [2, 0, 0], "is": {"id": "minecraft:moss_block" } }, - { "pos": [4, 0, 0], "is": {"id": "minecraft:clay" } }, - { "pos": [6, 0, 0], "is": {"id": "minecraft:mud" } }, - { "pos": [8, 0, 0], "is": {"id": "minecraft:farmland" } } - ] - }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact", "item": "minecraft:big_dripleaf"}, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [2.5, 3, 0.5], "rot": [0, 90] }, - {"at": 2, "do": "interact", "item": "minecraft:big_dripleaf"}, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] }, - {"at": 3, "do": "interact", "item": "minecraft:big_dripleaf"}, - { "at": 4, "do": "tp", "entity_alias": "player", "pos": [6.5, 3, 0.5], "rot": [0, 90] }, - {"at": 4, "do": "interact", "item": "minecraft:big_dripleaf"}, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [8.5, 3, 0.5], "rot": [0, 90] }, - {"at": 5, "do": "interact", "item": "minecraft:big_dripleaf"}, - { - "at": 6, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none", "waterlogged": false} - }, - { - "pos": [2, 1, 0], - "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none", "waterlogged": false} - }, - { - "pos": [4, 1, 0], - "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none", "waterlogged": false} - }, - { - "pos": [6, 1, 0], - "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none", "waterlogged": false} - }, - { - "pos": [8, 1, 0], - "is": {"id": "minecraft:big_dripleaf", "facing": "north", "tilt": "none", "waterlogged": false} - }, - {"slot": "hotbar1", "is": "empty"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/farmland/farmland_dries_without_water_but_not_with_water.json b/tests/vegetation/farmland/farmland_dries_without_water_but_not_with_water.json deleted file mode 100644 index 0fca402..0000000 --- a/tests/vegetation/farmland/farmland_dries_without_water_but_not_with_water.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "farmland_dries_without_water_but_not_with_water", - "description": "Fully moist farmland with no water nearby loses moisture on random ticks until it turns to dirt, while farmland next to a water source keeps moisture 7.", - "tags": ["vegetation", "farmland", "moisture", "drying", "random-tick"], - "minecraftIds": ["minecraft:farmland", "minecraft:dirt", "minecraft:water", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 3, 9] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 9] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 1, -1], [3, 3, 9] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 7} }, - { "pos": [0, 0, 8], "block": {"id": "minecraft:farmland", "moisture": 7} }, - { "pos": [1, 0, 8], "block": {"id": "minecraft:water" } } - ] - }, - { - "at": 150, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt" } }, - { "pos": [0, 0, 8], "is": {"id": "minecraft:farmland", "moisture": 7} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/farmland/farmland_drops_dirt_when_destroyed.json b/tests/vegetation/farmland/farmland_drops_dirt_when_destroyed.json deleted file mode 100644 index c71b2d7..0000000 --- a/tests/vegetation/farmland/farmland_drops_dirt_when_destroyed.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "farmland_drops_dirt_when_destroyed", - "description": "Farmland destroyed by a TNT explosion drops exactly one dirt item and no farmland item, because its loot table drops dirt instead of itself.", - "tags": ["vegetation", "farmland", "drops", "explosion", "loot"], - "minecraftIds": ["minecraft:farmland", "minecraft:dirt", "minecraft:obsidian", "minecraft:tnt", "minecraft:item"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 3, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:obsidian"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 1, -1], [3, 3, 1] ], - "with": {"id": "minecraft:air"} - }, - { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 7} }, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} }, - { "is": "minecraft:item" , "exists": false } - ] - }, - { - "at": 5, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [1.5, 1, 0.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 12, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "exists": true, "count": 1} , - {"is": "minecraft:item", "exists": true, "Item.id": "minecraft:dirt", "Item.count": 1} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/farmland/farmland_hoe_tilling.json b/tests/vegetation/farmland/farmland_hoe_tilling.json deleted file mode 100644 index b23609a..0000000 --- a/tests/vegetation/farmland/farmland_hoe_tilling.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "farmland_hoe_tilling", - "description": "A hoe turns dirt, grass blocks and dirt paths with air above into farmland at moisture 0, but does nothing to dirt that has a solid block directly above it.", - "tags": ["vegetation", "farmland", "hoe", "tilling", "player"], - "minecraftIds": [ - "minecraft:farmland" , "minecraft:dirt" , "minecraft:grass_block", "minecraft:dirt_path" , - "minecraft:stone" , "minecraft:iron_hoe" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [10, 4, 1] ] - }, - "player": {"game_mode": "Survival"}, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [10, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [-1, 1, -1], [10, 4, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:dirt" } }, - { "pos": [2, 0, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [4, 0, 0], "block": {"id": "minecraft:dirt_path" } }, - { "pos": [7, 1, 0], "block": {"id": "minecraft:dirt" } }, - { "pos": [7, 2, 0], "block": {"id": "minecraft:stone" } } - ] - }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 5, "do": "interact", "item": "minecraft:iron_hoe"}, - { "at": 6, "do": "tp", "entity_alias": "player", "pos": [2.5, 2, 0.5], "rot": [0, 90] }, - {"at": 6, "do": "interact", "item": "minecraft:iron_hoe"}, - { "at": 7, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 0.5], "rot": [0, 90] }, - {"at": 7, "do": "interact", "item": "minecraft:iron_hoe"}, - { "at": 8, "do": "tp", "entity_alias": "player", "pos": [9.5, 1, 0.5], "rot": [90, 37] }, - {"at": 8, "do": "interact", "item": "minecraft:iron_hoe"}, - { "at": 9, "do": "tp", "entity_alias": "player", "pos": [9.5, 5, 0.5] }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [2, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [4, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [7, 1, 0], "is": {"id": "minecraft:dirt" } }, - { "pos": [7, 2, 0], "is": {"id": "minecraft:stone" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/farmland/farmland_ignores_water_out_of_range.json b/tests/vegetation/farmland/farmland_ignores_water_out_of_range.json deleted file mode 100644 index bcb66d3..0000000 --- a/tests/vegetation/farmland/farmland_ignores_water_out_of_range.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "farmland_ignores_water_out_of_range", - "description": "Farmland dries out and turns to dirt when its only water is five blocks away sideways or directly below it, because only water within four blocks sideways and one block up counts.", - "tags": ["vegetation", "farmland", "moisture", "water", "random-tick"], - "minecraftIds": ["minecraft:farmland", "minecraft:dirt", "minecraft:water", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [6, 4, 9] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [6, 1, 9] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 2, -1], [6, 4, 9] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:water" } }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:farmland", "moisture": 7} }, - { "pos": [5, 1, 8], "block": {"id": "minecraft:water" } }, - { "pos": [0, 1, 8], "block": {"id": "minecraft:farmland", "moisture": 7} } - ] - }, - { - "at": 150, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt"} }, - { "pos": [0, 1, 8], "is": {"id": "minecraft:dirt"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/farmland/farmland_item_placement.json b/tests/vegetation/farmland/farmland_item_placement.json deleted file mode 100644 index 075775b..0000000 --- a/tests/vegetation/farmland/farmland_item_placement.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "farmland_item_placement", - "description": "The farmland item places farmland at moisture 0 when the space above is free, but places plain dirt instead when a solid block sits directly above the target position.", - "tags": ["vegetation", "farmland", "placement", "player"], - "minecraftIds": ["minecraft:farmland", "minecraft:dirt", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [7, 4, 1] ] - }, - "player": {"game_mode": "Survival"}, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [7, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [-1, 1, -1], [7, 4, 1] ], - "with": {"id": "minecraft:air"} - }, - { "at": 4, "do": "place", "pos": [3, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 4, "do": "place", "pos": [4, 2, 0], "block": {"id": "minecraft:stone"} }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 5, "do": "interact", "item": "minecraft:farmland"}, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 5, 0.5] }, - { - "at": 6, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [4, 1, 0], "is": {"id": "minecraft:air" } } - ] - }, - { "at": 6, "do": "tp", "entity_alias": "player", "pos": [6.5, 1, 0.5], "rot": [90, 24] }, - {"at": 6, "do": "interact", "item": "minecraft:farmland"}, - { "at": 6, "do": "tp", "entity_alias": "player", "pos": [6.5, 5, 0.5] }, - { - "at": 8, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [4, 1, 0], "is": {"id": "minecraft:dirt" } }, - { "pos": [4, 2, 0], "is": {"id": "minecraft:stone" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/farmland/farmland_stays_dry_under_fence_gate.json b/tests/vegetation/farmland/farmland_stays_dry_under_fence_gate.json deleted file mode 100644 index 5cf9c14..0000000 --- a/tests/vegetation/farmland/farmland_stays_dry_under_fence_gate.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "farmland_stays_dry_under_fence_gate", - "description": "Dry farmland under a closed fence gate, which is solid but in the maintains-farmland tag, stays farmland through random ticks and survives the placement, while bare dry farmland beside it turns to dirt.", - "tags": ["vegetation", "farmland", "fence-gate", "support", "random-tick"], - "minecraftIds": ["minecraft:farmland", "minecraft:dirt", "minecraft:oak_fence_gate", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 3, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 1, -1], [3, 3, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:oak_fence_gate", "open": false, "facing": "north"} }, - { "pos": [2, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 0} } - ] - }, - { - "at": 150, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:oak_fence_gate", "open": false, "facing": "north"} }, - { "pos": [2, 0, 0], "is": {"id": "minecraft:dirt"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/farmland/farmland_survives_under_non_solid_block.json b/tests/vegetation/farmland/farmland_survives_under_non_solid_block.json deleted file mode 100644 index 93f91d0..0000000 --- a/tests/vegetation/farmland/farmland_survives_under_non_solid_block.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "farmland_survives_under_non_solid_block", - "description": "Placing a block that does not count as solid, such as short grass or a carpet, on top of farmland leaves the farmland unchanged.", - "tags": ["vegetation", "farmland", "support", "neighbor-update", "scheduled-tick"], - "minecraftIds": ["minecraft:farmland", "minecraft:short_grass", "minecraft:white_carpet", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 3, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 1, -1], [3, 3, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 5} }, - { "pos": [2, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 5} } - ] - }, - { "at": 6, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:short_grass"} }, - { "at": 6, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:white_carpet"} }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland" , "moisture": 5} }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:short_grass" } }, - { "pos": [2, 0, 0], "is": {"id": "minecraft:farmland" , "moisture": 5} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:white_carpet" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/farmland/farmland_turns_to_dirt_under_solid_block.json b/tests/vegetation/farmland/farmland_turns_to_dirt_under_solid_block.json deleted file mode 100644 index 738c856..0000000 --- a/tests/vegetation/farmland/farmland_turns_to_dirt_under_solid_block.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "farmland_turns_to_dirt_under_solid_block", - "description": "Placing a solid block, including a bottom slab whose collision box still counts as solid, on top of farmland turns the farmland to dirt after the scheduled tick, while farmland with nothing above stays.", - "tags": ["vegetation", "farmland", "support", "neighbor-update", "scheduled-tick"], - "minecraftIds": ["minecraft:farmland", "minecraft:dirt", "minecraft:stone", "minecraft:oak_slab"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [5, 3, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [5, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 1, -1], [5, 3, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 7} }, - { "pos": [2, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 7} }, - { "pos": [4, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 7} } - ] - }, - { - "at": 6, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} }, - { "pos": [2, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} }, - { "pos": [4, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} } - ] - }, - { "at": 6, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 6, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:oak_slab", "type": "bottom"} }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt" } }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:stone" } }, - { "pos": [2, 0, 0], "is": {"id": "minecraft:dirt" } }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:oak_slab", "type": "bottom" } }, - { "pos": [4, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/farmland/farmland_turns_to_dirt_when_piston_pushes_block_onto_it.json b/tests/vegetation/farmland/farmland_turns_to_dirt_when_piston_pushes_block_onto_it.json deleted file mode 100644 index b6f8260..0000000 --- a/tests/vegetation/farmland/farmland_turns_to_dirt_when_piston_pushes_block_onto_it.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "farmland_turns_to_dirt_when_piston_pushes_block_onto_it", - "description": "A piston pushing a stone block down onto farmland turns the farmland to dirt once the push finishes, while farmland nearby with nothing pushed onto it is unchanged.", - "tags": ["vegetation", "farmland", "piston", "support", "neighbor-update"], - "minecraftIds": [ - "minecraft:farmland" , "minecraft:dirt" , "minecraft:stone" , "minecraft:piston" , - "minecraft:redstone_block" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [4, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [4, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 1, -1], [4, 4, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 7} }, - { "pos": [3, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 7} }, - { "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [0, 3, 0], "block": {"id": "minecraft:piston", "facing": "down", "extended": "false"} } - ] - }, - { - "at": 6, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, - { "pos": [0, 2, 0], "is": {"id": "minecraft:stone" } } - ] - }, - { "at": 6, "do": "place", "pos": [1, 3, 0], "block": {"id": "minecraft:redstone_block"} }, - { - "at": 16, - "do": "assert", - "checks": [ - { "pos": [0, 3, 0], "is": {"id": "minecraft:piston", "extended": "true"} }, - { "pos": [0, 2, 0], "is": {"id": "minecraft:piston_head", "facing": "down"} }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:stone"} }, - { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt"} }, - { "pos": [3, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/farmland/farmland_wets_from_nearby_water.json b/tests/vegetation/farmland/farmland_wets_from_nearby_water.json deleted file mode 100644 index 0beb316..0000000 --- a/tests/vegetation/farmland/farmland_wets_from_nearby_water.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "farmland_wets_from_nearby_water", - "description": "A random tick sets dry farmland straight to moisture 7 when water is exactly four blocks away sideways, both in a straight line and diagonally.", - "tags": ["vegetation", "farmland", "moisture", "water", "random-tick"], - "minecraftIds": ["minecraft:farmland", "minecraft:water", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [5, 3, 11] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [5, 0, 11] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 1, -1], [5, 3, 11] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [4, 0, 0], "block": {"id": "minecraft:water" } }, - { "pos": [0, 0, 6], "block": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [4, 0, 10], "block": {"id": "minecraft:water" } } - ] - }, - { - "at": 60, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} }, - { "pos": [0, 0, 6], "is": {"id": "minecraft:farmland", "moisture": 7} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/farmland/farmland_wets_in_rain_when_open_to_sky.json b/tests/vegetation/farmland/farmland_wets_in_rain_when_open_to_sky.json deleted file mode 100644 index 3033934..0000000 --- a/tests/vegetation/farmland/farmland_wets_in_rain_when_open_to_sky.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "farmland_wets_in_rain_when_open_to_sky", - "description": "During rain, dry farmland open to the sky is soaked to moisture 7 without any water nearby, while farmland covered by a roof gets no rain and dries out to dirt.", - "tags": ["vegetation", "farmland", "moisture", "rain", "weather", "random-tick"], - "minecraftIds": ["minecraft:farmland", "minecraft:dirt", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [5, 4, 1] ] - }, - "world": { - "weather": "rain", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [5, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "fill", - "region": [ [-1, 1, -1], [5, 4, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 80, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [4, 0, 0], "block": {"id": "minecraft:farmland", "moisture": 0} }, - { "pos": [4, 3, 0], "block": {"id": "minecraft:stone" } } - ] - }, - { - "at": 130, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland", "moisture": 7} }, - { "pos": [4, 0, 0], "is": {"id": "minecraft:dirt" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/fern/fern_explosion_drops_no_fern.json b/tests/vegetation/fern/fern_explosion_drops_no_fern.json deleted file mode 100644 index dd0da3a..0000000 --- a/tests/vegetation/fern/fern_explosion_drops_no_fern.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "fern_explosion_drops_no_fern", - "description": "An explosion next to a fern destroys it, but without shears the loot table never drops the fern item itself.", - "tags": ["vegetation", "fern", "explosion", "loot"], - "minecraftIds": ["minecraft:fern", "minecraft:grass_block", "minecraft:obsidian", "minecraft:tnt"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [6, 4, 1] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [6, 0, 1] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 0, "do": "place", "pos": [5, 0, 0], "block": {"id": "minecraft:grass_block"} }, - { "at": 0, "do": "place", "pos": [5, 1, 0], "block": {"id": "minecraft:fern"} }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [5, 1, 0], "is": {"id": "minecraft:fern"} } - ] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [6.5, 1, 0.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [5, 1, 0], "is": {"id": "minecraft:air"} }, - { "is": "minecraft:item" , "exists": false, "Item.id": "minecraft:fern" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/firefly_bush/firefly_bush_bonemeal_no_valid_neighbour.json b/tests/vegetation/firefly_bush/firefly_bush_bonemeal_no_valid_neighbour.json deleted file mode 100644 index d232d3f..0000000 --- a/tests/vegetation/firefly_bush/firefly_bush_bonemeal_no_valid_neighbour.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "firefly_bush_bonemeal_no_valid_neighbour", - "description": "Bone meal on a firefly bush with no empty supported horizontal neighbour places nothing, not even above, and is not consumed.", - "tags": ["vegetation", "firefly-bush", "bone-meal", "spread", "player"], - "minecraftIds": [ - "minecraft:firefly_bush", "minecraft:grass_block" , "minecraft:dirt" , "minecraft:sand" , - "minecraft:bone_meal" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-2, -1, -2], [2, 4, 2] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-2, -1, -2], [2, 4, 2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [-1, 1, -1], [1, 3, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block" } }, - { "pos": [0, 0, 1], "block": {"id": "minecraft:dirt" } }, - { "pos": [0, 1, 1], "block": {"id": "minecraft:stone" } }, - { "pos": [1, 0, 0], "block": {"id": "minecraft:sand" } }, - { "pos": [0, 1, 0], "block": {"id": "minecraft:firefly_bush"} } - ] - }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 5, "do": "interact"}, - { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, - { - "at": 7, - "do": "assert", - "checks": [ - { "pos": [ 0, 1, 0], "is": {"id": "minecraft:firefly_bush" } }, - { "pos": [ 1, 1, 0], "is": {"id": "minecraft:air" } }, - { "pos": [-1, 1, 0], "is": {"id": "minecraft:air" } }, - { "pos": [ 0, 1, -1], "is": {"id": "minecraft:air" } }, - { "pos": [ 0, 1, 1], "is": {"id": "minecraft:stone" } }, - { "pos": [ 0, 2, 0], "is": {"id": "minecraft:air" } }, - { "is": {"id": "minecraft:bone_meal" , "count": 1}, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/firefly_bush/firefly_bush_composts_in_empty_composter.json b/tests/vegetation/firefly_bush/firefly_bush_composts_in_empty_composter.json deleted file mode 100644 index 7c095ae..0000000 --- a/tests/vegetation/firefly_bush/firefly_bush_composts_in_empty_composter.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "firefly_bush_composts_in_empty_composter", - "description": "A firefly bush used on an empty composter always raises it to level 1 and is consumed, instead of being placed.", - "tags": ["vegetation", "firefly-bush", "composter", "compostable", "player"], - "minecraftIds": ["minecraft:firefly_bush", "minecraft:composter", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [7, 4, 3] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:firefly_bush", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, 0], [7, 4, 3] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [4, 1, 1], [4, 4, 1] ], - "with": {"id": "minecraft:air"} - }, - { "at": 4, "do": "place", "pos": [4, 1, 1], "block": {"id": "minecraft:composter", "level": "0"} }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [4.5, 2, 1.5], "rot": [0, 90] }, - {"at": 5, "do": "interact"}, - { "at": 6, "do": "tp", "entity_alias": "player", "pos": [4.5, 9, 1.5] }, - { - "at": 15, - "do": "assert", - "checks": [ - { "pos": [4, 1, 1], "is": {"id": "minecraft:composter", "level": "1"} }, - { "pos": [4, 2, 1], "is": {"id": "minecraft:air"} }, - { "is": "empty" , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/firefly_bush/firefly_bush_destroyed_by_piston.json b/tests/vegetation/firefly_bush/firefly_bush_destroyed_by_piston.json deleted file mode 100644 index 8d33b46..0000000 --- a/tests/vegetation/firefly_bush/firefly_bush_destroyed_by_piston.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "firefly_bush_destroyed_by_piston", - "description": "A piston extending into a firefly bush destroys it instead of pushing it, the piston head takes its place, and one firefly bush item drops.", - "tags": ["vegetation", "firefly-bush", "piston", "push-reaction", "drops"], - "minecraftIds": [ - "minecraft:firefly_bush" , "minecraft:dirt" , "minecraft:piston" , "minecraft:redstone_block", - "minecraft:piston_head" , "minecraft:item" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [14, 3, 3] ] - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, 0], [14, 3, 3] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [10, 1, 1], [13, 2, 2] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [12, 0, 1], "block": {"id": "minecraft:dirt"} }, - { "pos": [12, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, - { "pos": [11, 1, 1], "block": {"id": "minecraft:piston", "facing": "east", "extended": "false"} } - ] - }, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [12, 1, 1], "is": {"id": "minecraft:firefly_bush" } }, - { "pos": [11, 1, 1], "is": {"id": "minecraft:piston" , "extended": "false"} } - ] - }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [11.5, 9, 2.5] }, - { "at": 5, "do": "place", "pos": [11, 1, 2], "block": {"id": "minecraft:redstone_block"} }, - { - "at": 15, - "do": "assert", - "checks": [ - { "pos": [11, 1, 1], "is": {"id": "minecraft:piston", "extended": "true"} } , - { "pos": [12, 1, 1], "is": {"id": "minecraft:piston_head", "facing": "east"} } , - { "pos": [13, 1, 1], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "exists": true, "Item": "{count: 1, id: \"minecraft:firefly_bush\"}"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/firefly_bush/firefly_bush_not_replaced_by_block_placement.json b/tests/vegetation/firefly_bush/firefly_bush_not_replaced_by_block_placement.json deleted file mode 100644 index 899cb6b..0000000 --- a/tests/vegetation/firefly_bush/firefly_bush_not_replaced_by_block_placement.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "firefly_bush_not_replaced_by_block_placement", - "description": "Because a firefly bush is not replaceable, placing a stone block against its top puts the stone above it and leaves the bush in place.", - "tags": ["vegetation", "firefly-bush", "not-replaceable", "placement", "player"], - "minecraftIds": ["minecraft:firefly_bush", "minecraft:dirt", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [1, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 1, 0], [0, 4, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:dirt"} }, - { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:firefly_bush"} }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 5, "do": "interact"}, - { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 8, 0.5] }, - { - "at": 7, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt"} }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:firefly_bush"} }, - { "pos": [0, 2, 0], "is": {"id": "minecraft:stone"} }, - { "is": "empty" , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/firefly_bush/firefly_bush_placement_rejected_on_invalid_support.json b/tests/vegetation/firefly_bush/firefly_bush_placement_rejected_on_invalid_support.json deleted file mode 100644 index 463f35a..0000000 --- a/tests/vegetation/firefly_bush/firefly_bush_placement_rejected_on_invalid_support.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "firefly_bush_placement_rejected_on_invalid_support", - "description": "A firefly bush item used on stone does not place a bush, because stone does not support vegetation.", - "tags": ["vegetation", "firefly-bush", "placement", "supports-vegetation", "player"], - "minecraftIds": ["minecraft:firefly_bush", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, -1, -1], [2, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:firefly_bush", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, -1, -1], [2, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 1, 0], [1, 3, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 5, "do": "interact"}, - { "at": 7, "do": "tp", "entity_alias": "player", "pos": [0.5, 6, 0.5] }, - { - "at": 8, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:stone"} }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/firefly_bush/firefly_bush_support_loss.json b/tests/vegetation/firefly_bush/firefly_bush_support_loss.json deleted file mode 100644 index ee37343..0000000 --- a/tests/vegetation/firefly_bush/firefly_bush_support_loss.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "firefly_bush_support_loss", - "description": "A firefly bush on grass block or farmland becomes air once the block beneath it is removed.", - "tags": ["vegetation", "firefly-bush", "support", "neighbor-update"], - "minecraftIds": ["minecraft:firefly_bush", "minecraft:grass_block", "minecraft:farmland"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [14, 2, 2] ] - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, 0], [14, 2, 2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [12, 1, 1], [13, 1, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [12, 0, 1], "block": {"id": "minecraft:grass_block" } }, - { "pos": [13, 0, 1], "block": {"id": "minecraft:farmland" } }, - { "pos": [12, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, - { "pos": [13, 1, 1], "block": {"id": "minecraft:firefly_bush"} } - ] - }, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [12, 1, 1], "is": {"id": "minecraft:firefly_bush"} }, - { "pos": [13, 1, 1], "is": {"id": "minecraft:firefly_bush"} } - ] - }, - { "at": 5, "do": "remove", "pos": [12, 0, 1] }, - { "at": 5, "do": "remove", "pos": [13, 0, 1] }, - { - "at": 6, - "do": "assert", - "checks": [ - { "pos": [12, 0, 1], "is": {"id": "minecraft:air"} }, - { "pos": [12, 1, 1], "is": {"id": "minecraft:air"} }, - { "pos": [13, 0, 1], "is": {"id": "minecraft:air"} }, - { "pos": [13, 1, 1], "is": {"id": "minecraft:air"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/firefly_bush/firefly_bush_survives_on_supports.json b/tests/vegetation/firefly_bush/firefly_bush_survives_on_supports.json deleted file mode 100644 index 84673b3..0000000 --- a/tests/vegetation/firefly_bush/firefly_bush_survives_on_supports.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "firefly_bush_survives_on_supports", - "description": "A firefly bush above grass block, dirt, podzol, mud, moss block or farmland stays when a neighbour update reaches it, but turns to air above sand.", - "tags": ["vegetation", "firefly-bush", "support", "supports-vegetation", "neighbor-update"], - "minecraftIds": [ - "minecraft:firefly_bush", "minecraft:grass_block" , "minecraft:dirt" , "minecraft:podzol" , - "minecraft:mud" , "minecraft:moss_block" , "minecraft:farmland" , "minecraft:sand" , - "minecraft:stone" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [7, 3, 2] ] - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, 0], [7, 3, 2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 1, 1], [6, 2, 1] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 1], "block": {"id": "minecraft:grass_block"} }, - { "pos": [1, 0, 1], "block": {"id": "minecraft:dirt" } }, - { "pos": [2, 0, 1], "block": {"id": "minecraft:podzol" } }, - { "pos": [3, 0, 1], "block": {"id": "minecraft:mud" } }, - { "pos": [4, 0, 1], "block": {"id": "minecraft:moss_block" } }, - { "pos": [5, 0, 1], "block": {"id": "minecraft:farmland" } }, - { "pos": [6, 0, 1], "block": {"id": "minecraft:sand" } } - ] - }, - { - "at": 5, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, - { "pos": [1, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, - { "pos": [2, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, - { "pos": [3, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, - { "pos": [4, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, - { "pos": [5, 1, 1], "block": {"id": "minecraft:firefly_bush"} }, - { "pos": [6, 1, 1], "block": {"id": "minecraft:firefly_bush"} } - ] - }, - { - "at": 6, - "do": "place_each", - "blocks": [ - { "pos": [0, 2, 1], "block": {"id": "minecraft:stone"} }, - { "pos": [1, 2, 1], "block": {"id": "minecraft:stone"} }, - { "pos": [2, 2, 1], "block": {"id": "minecraft:stone"} }, - { "pos": [3, 2, 1], "block": {"id": "minecraft:stone"} }, - { "pos": [4, 2, 1], "block": {"id": "minecraft:stone"} }, - { "pos": [5, 2, 1], "block": {"id": "minecraft:stone"} }, - { "pos": [6, 2, 1], "block": {"id": "minecraft:stone"} } - ] - }, - { - "at": 9, - "do": "assert", - "checks": [ - { "pos": [0, 1, 1], "is": {"id": "minecraft:firefly_bush"} }, - { "pos": [1, 1, 1], "is": {"id": "minecraft:firefly_bush"} }, - { "pos": [2, 1, 1], "is": {"id": "minecraft:firefly_bush"} }, - { "pos": [3, 1, 1], "is": {"id": "minecraft:firefly_bush"} }, - { "pos": [4, 1, 1], "is": {"id": "minecraft:firefly_bush"} }, - { "pos": [5, 1, 1], "is": {"id": "minecraft:firefly_bush"} }, - { "pos": [6, 1, 1], "is": {"id": "minecraft:air" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/firefly_bush/firefly_bush_washed_away_by_water.json b/tests/vegetation/firefly_bush/firefly_bush_washed_away_by_water.json deleted file mode 100644 index b9bbc62..0000000 --- a/tests/vegetation/firefly_bush/firefly_bush_washed_away_by_water.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "firefly_bush_washed_away_by_water", - "description": "Water spreading from an adjacent source into a firefly bush replaces it with flowing water and drops one firefly bush item.", - "tags": ["vegetation", "firefly-bush", "water", "fluid", "drops"], - "minecraftIds": [ - "minecraft:firefly_bush", "minecraft:dirt" , "minecraft:stone" , "minecraft:water" , - "minecraft:item" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [14, 3, 4] ] - }, - "world": { - "time": "minecraft:day", - "weather": "clear", - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, 0], [14, 3, 4] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [10, 1, 2], [11, 1, 2] ], - "with": {"id": "minecraft:air"} - }, - { "at": 4, "do": "place", "pos": [11, 0, 2], "block": {"id": "minecraft:dirt"} }, - { "at": 4, "do": "place", "pos": [11, 1, 2], "block": {"id": "minecraft:firefly_bush"} }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [11.5, 9, 2.5] }, - { - "at": 6, - "do": "assert", - "checks": [ - { "pos": [11, 1, 2], "is": {"id": "minecraft:firefly_bush"} } - ] - }, - { "at": 6, "do": "place", "pos": [10, 1, 2], "block": {"id": "minecraft:water"} }, - { - "at": 20, - "do": "assert", - "checks": [ - { "pos": [10, 1, 2], "is": {"id": "minecraft:water"} } , - { "pos": [11, 1, 2], "is": {"id": "minecraft:water"} } , - {"is": "minecraft:item", "exists": true, "Item": "{count: 1, id: \"minecraft:firefly_bush\"}"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/glow_lichen/glow_lichen_bonemeal_no_spread_target.json b/tests/vegetation/glow_lichen/glow_lichen_bonemeal_no_spread_target.json deleted file mode 100644 index 595af71..0000000 --- a/tests/vegetation/glow_lichen/glow_lichen_bonemeal_no_spread_target.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "glow_lichen_bonemeal_no_spread_target", - "description": "Bone meal on a glow lichen with nowhere to spread is not a valid target: the lichen is unchanged and no bone meal is consumed.", - "tags": ["vegetation", "glow-lichen", "bone-meal", "spread", "player"], - "minecraftIds": ["minecraft:glow_lichen", "minecraft:bone_meal", "minecraft:stone", "minecraft:stone_slab"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 1, 0], [0, 3, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:glow_lichen", "down": true} }, - { "at": 4, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "at": 4, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "at": 4, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "at": 4, "do": "place", "pos": [0, 1, -1], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 5, "do": "interact"}, - { - "at": 7, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": { - "id": "minecraft:glow_lichen", - "down": true, - "north": false, - "south": false, - "east": false, - "west": false, - "up": false - } - }, - { "slot": "hotbar1", "is": {"id": "minecraft:bone_meal", "count": 2} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_neighbour.json b/tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_neighbour.json deleted file mode 100644 index e92998d..0000000 --- a/tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_neighbour.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "glow_lichen_bonemeal_spreads_to_neighbour", - "description": "Bone meal on a floor glow lichen whose only possible spread is onto the floor of the open east neighbour places a new lichen with the down face there, leaves the source unchanged and consumes one bone meal.", - "tags": ["vegetation", "glow-lichen", "bone-meal", "spread", "player"], - "minecraftIds": ["minecraft:glow_lichen", "minecraft:bone_meal", "minecraft:stone", "minecraft:stone_slab"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 1, 0], [0, 3, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:glow_lichen", "down": true} }, - { "at": 4, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "at": 4, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "at": 4, "do": "place", "pos": [0, 1, -1], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "at": 4, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:air"} }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 5, "do": "interact"}, - { - "at": 7, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": { - "id": "minecraft:glow_lichen", - "down": true, - "north": false, - "south": false, - "east": false, - "west": false, - "up": false - } - }, - { - "pos": [1, 1, 0], - "is": { - "id": "minecraft:glow_lichen", - "down": true, - "north": false, - "south": false, - "east": false, - "west": false, - "up": false - } - }, - { "slot": "hotbar1", "is": {"id": "minecraft:bone_meal", "count": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_wall.json b/tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_wall.json deleted file mode 100644 index f2cfa97..0000000 --- a/tests/vegetation/glow_lichen/glow_lichen_bonemeal_spreads_to_wall.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "glow_lichen_bonemeal_spreads_to_wall", - "description": "Bone meal on a floor glow lichen whose only possible spread is onto the stone north wall adds the north face to the same block and consumes one bone meal.", - "tags": ["vegetation", "glow-lichen", "bone-meal", "spread", "player"], - "minecraftIds": ["minecraft:glow_lichen", "minecraft:bone_meal", "minecraft:stone", "minecraft:stone_slab"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 1, 0], [0, 3, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:glow_lichen", "down": true} }, - { "at": 4, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "at": 4, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "at": 4, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 5, "do": "interact"}, - { - "at": 7, - "do": "assert", - "checks": [ - { - "pos": [0, 1, 0], - "is": { - "id": "minecraft:glow_lichen", - "down": true, - "north": true, - "south": false, - "east": false, - "west": false, - "up": false - } - }, - { "slot": "hotbar1", "is": {"id": "minecraft:bone_meal", "count": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/glow_lichen/glow_lichen_destroyed_by_piston.json b/tests/vegetation/glow_lichen/glow_lichen_destroyed_by_piston.json deleted file mode 100644 index f001351..0000000 --- a/tests/vegetation/glow_lichen/glow_lichen_destroyed_by_piston.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "glow_lichen_destroyed_by_piston", - "description": "An extending piston destroys a glow lichen in front of it instead of pushing it, leaving only the piston head with nothing behind it.", - "tags": ["vegetation", "glow-lichen", "piston", "push-reaction", "redstone"], - "minecraftIds": [ - "minecraft:glow_lichen" , "minecraft:piston" , "minecraft:piston_head" , "minecraft:redstone_block", - "minecraft:stone" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [4, 3, 2] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [4, 0, 2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 0, - "do": "place", - "pos": [0, 1, 0], - "block": {"id": "minecraft:piston", "facing": "east", "extended": false} - }, - { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:glow_lichen", "down": true} }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:piston" , "extended": false } }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:glow_lichen", "down": true} } - ] - }, - { "at": 2, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, - { - "at": 12, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:piston" , "extended": true, "facing": "east"} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east"} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/glow_lichen/glow_lichen_face_removed_with_support.json b/tests/vegetation/glow_lichen/glow_lichen_face_removed_with_support.json deleted file mode 100644 index 755e3a4..0000000 --- a/tests/vegetation/glow_lichen/glow_lichen_face_removed_with_support.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "glow_lichen_face_removed_with_support", - "description": "A glow lichen with up and north faces loses only the north face when the north wall is removed, and becomes air when the ceiling is removed too.", - "tags": ["vegetation", "glow-lichen", "support", "neighbor-update"], - "minecraftIds": ["minecraft:glow_lichen", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 0, 0], [0, 2, 0] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place", - "pos": [0, 2, 0], - "block": {"id": "minecraft:glow_lichen", "up": true, "north": true} - }, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:glow_lichen", "up": true, "north": true} } - ] - }, - { "at": 5, "do": "remove", "pos": [0, 2, -1] }, - { - "at": 7, - "do": "assert", - "checks": [ - { - "pos": [0, 2, 0], - "is": { - "id": "minecraft:glow_lichen", - "up": true, - "north": false, - "south": false, - "east": false, - "west": false, - "down": false - } - } - ] - }, - { "at": 7, "do": "remove", "pos": [0, 3, 0] }, - { - "at": 9, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/glow_lichen/glow_lichen_placement_adds_face_to_existing.json b/tests/vegetation/glow_lichen/glow_lichen_placement_adds_face_to_existing.json deleted file mode 100644 index 36bb24b..0000000 --- a/tests/vegetation/glow_lichen/glow_lichen_placement_adds_face_to_existing.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "glow_lichen_placement_adds_face_to_existing", - "description": "Using glow lichen on the ceiling of a block that already has a north lichen face adds the up face to the same block and keeps the north face, consuming one item.", - "tags": ["vegetation", "glow-lichen", "placement", "player"], - "minecraftIds": ["minecraft:glow_lichen", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:glow_lichen", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 0, 0], [0, 2, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 4, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:glow_lichen", "north": true} }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, - {"at": 5, "do": "interact"}, - { - "at": 6, - "do": "assert", - "checks": [ - { - "pos": [0, 2, 0], - "is": { - "id": "minecraft:glow_lichen", - "up": true, - "north": true, - "down": false, - "south": false, - "east": false, - "west": false - } - }, - { "slot": "hotbar1", "is": {"id": "minecraft:glow_lichen", "count": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/glow_lichen/glow_lichen_placement_on_ceiling.json b/tests/vegetation/glow_lichen/glow_lichen_placement_on_ceiling.json deleted file mode 100644 index ebd774e..0000000 --- a/tests/vegetation/glow_lichen/glow_lichen_placement_on_ceiling.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "glow_lichen_placement_on_ceiling", - "description": "Using glow lichen on the underside of a stone ceiling places a lichen with only the up face and consumes one item.", - "tags": ["vegetation", "glow-lichen", "placement", "player"], - "minecraftIds": ["minecraft:glow_lichen", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:glow_lichen", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 0, 0], [0, 2, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, - {"at": 5, "do": "interact"}, - { - "at": 6, - "do": "assert", - "checks": [ - { - "pos": [0, 2, 0], - "is": { - "id": "minecraft:glow_lichen", - "up": true, - "down": false, - "north": false, - "south": false, - "east": false, - "west": false, - "waterlogged": false - } - }, - { "slot": "hotbar1", "is": {"id": "minecraft:glow_lichen", "count": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/glow_lichen/glow_lichen_placement_rejected_on_partial_face.json b/tests/vegetation/glow_lichen/glow_lichen_placement_rejected_on_partial_face.json deleted file mode 100644 index f38a3d1..0000000 --- a/tests/vegetation/glow_lichen/glow_lichen_placement_rejected_on_partial_face.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "glow_lichen_placement_rejected_on_partial_face", - "description": "Using glow lichen on the top of a bottom slab places nothing because the slab top is not a full face, and no item is consumed.", - "tags": ["vegetation", "glow-lichen", "placement", "player", "support"], - "minecraftIds": ["minecraft:glow_lichen", "minecraft:stone_slab", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:glow_lichen", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 2, "do": "interact"}, - { - "at": 4, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "pos": [0, 2, 0], "is": {"id": "minecraft:air"} }, - { "is": {"id": "minecraft:glow_lichen", "count": 2} , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/glow_lichen/glow_lichen_placement_waterlogged.json b/tests/vegetation/glow_lichen/glow_lichen_placement_waterlogged.json deleted file mode 100644 index c00bf6b..0000000 --- a/tests/vegetation/glow_lichen/glow_lichen_placement_waterlogged.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "glow_lichen_placement_waterlogged", - "description": "Using glow lichen on the floor through a water source places a lichen with the down face that is waterlogged.", - "tags": ["vegetation", "glow-lichen", "placement", "waterlogged", "player"], - "minecraftIds": ["minecraft:glow_lichen", "minecraft:water", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:glow_lichen", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 1, 0], [0, 3, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 5, "do": "interact"}, - { - "at": 7, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:glow_lichen", "down": true, "waterlogged": true} }, - { "slot": "hotbar1", "is": {"id": "minecraft:glow_lichen", "count": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/glow_lichen/glow_lichen_replaced_by_block_placement.json b/tests/vegetation/glow_lichen/glow_lichen_replaced_by_block_placement.json deleted file mode 100644 index fb7962f..0000000 --- a/tests/vegetation/glow_lichen/glow_lichen_replaced_by_block_placement.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "glow_lichen_replaced_by_block_placement", - "description": "Using a stone block on a floor glow lichen replaces the lichen, because glow lichen is replaceable by a block other than lichen, and consumes one item.", - "tags": ["vegetation", "glow-lichen", "replaceable", "placement", "player"], - "minecraftIds": ["minecraft:glow_lichen", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 1, 0], [0, 3, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 4, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:glow_lichen", "down": true} }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 2, 0.5], "rot": [0, 90] }, - {"at": 5, "do": "interact"}, - { - "at": 7, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:stone" } }, - { "is": {"id": "minecraft:stone", "count": 1}, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/glow_lichen/glow_lichen_support_loss_to_slab.json b/tests/vegetation/glow_lichen/glow_lichen_support_loss_to_slab.json deleted file mode 100644 index 0dde851..0000000 --- a/tests/vegetation/glow_lichen/glow_lichen_support_loss_to_slab.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "glow_lichen_support_loss_to_slab", - "description": "A glow lichen on a stone floor becomes air when the stone is replaced by a bottom slab, but survives under a bottom slab whose underside is a full face.", - "tags": ["vegetation", "glow-lichen", "support", "neighbor-update"], - "minecraftIds": ["minecraft:glow_lichen", "minecraft:stone", "minecraft:stone_slab"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 1, 0], [2, 3, 0] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:glow_lichen", "down": true } }, - { "pos": [2, 2, 0], "block": {"id": "minecraft:glow_lichen", "up": true} } - ] - }, - { "at": 5, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "at": 5, "do": "place", "pos": [2, 3, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { - "at": 7, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, - { "pos": [2, 2, 0], "is": {"id": "minecraft:glow_lichen", "up": true} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/glow_lichen/glow_lichen_waterlogged_support_loss.json b/tests/vegetation/glow_lichen/glow_lichen_waterlogged_support_loss.json deleted file mode 100644 index 7e6cbad..0000000 --- a/tests/vegetation/glow_lichen/glow_lichen_waterlogged_support_loss.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "glow_lichen_waterlogged_support_loss", - "description": "A waterlogged glow lichen with a single face is replaced by a water source, not air, when the block it is attached to is removed (Block.updateOrDestroy destroys it and Level.destroyBlock leaves the fluid).", - "tags": ["vegetation", "glow-lichen", "waterlogged", "support", "neighbor-update"], - "minecraftIds": ["minecraft:glow_lichen", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": {"game_mode": "Survival"} - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 1, 0], [0, 3, 0] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place", - "pos": [0, 1, 0], - "block": {"id": "minecraft:glow_lichen", "down": true, "waterlogged": true} - }, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:glow_lichen", "down": true, "waterlogged": true} } - ] - }, - { "at": 5, "do": "remove", "pos": [0, 0, 0] }, - { - "at": 7, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_bone_meal_grows_plants_above.json b/tests/vegetation/grass_block/grass_block_bone_meal_grows_plants_above.json deleted file mode 100644 index 720715a..0000000 --- a/tests/vegetation/grass_block/grass_block_bone_meal_grows_plants_above.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_bone_meal_grows_plants_above", - "description": "Bone meal on the top face of a grass block with air above is consumed and puts a plant on the block above: short grass, tall grass or a flower from the plains flower list (the test world is assumed to be a plains-like biome; the first of the 16 attempts that start above the block places short grass with probability 7/8 and the rest tries flowers, so the cell cannot realistically stay air). The grass block is kept; the block above that is air or the upper half of tall grass.", - "tags": ["vegetation", "grass-block", "bone-meal", "player"], - "minecraftIds": [ - "minecraft:grass_block" , "minecraft:bone_meal" , "minecraft:short_grass" , "minecraft:tall_grass" , - "minecraft:dandelion" , "minecraft:orange_tulip", "minecraft:red_tulip" , "minecraft:pink_tulip" , - "minecraft:white_tulip" , "minecraft:poppy" , "minecraft:azure_bluet" , "minecraft:oxeye_daisy" , - "minecraft:cornflower" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 4, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [1, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 1, 0], [0, 4, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 4, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, - { "at": 6, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 7, "do": "interact"}, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, - { - "pos": [0, 1, 0], - "is": [ - {"id": "minecraft:short_grass" }, - {"id": "minecraft:tall_grass" , "half": "lower"}, - {"id": "minecraft:dandelion" }, - {"id": "minecraft:orange_tulip" }, - {"id": "minecraft:red_tulip" }, - {"id": "minecraft:pink_tulip" }, - {"id": "minecraft:white_tulip" }, - {"id": "minecraft:poppy" }, - {"id": "minecraft:azure_bluet" }, - {"id": "minecraft:oxeye_daisy" }, - {"id": "minecraft:cornflower" } - ] - }, - { - "pos": [ 0 , 2 , 0 ], - "is" : [ {"id": "minecraft:air"}, {"id": "minecraft:tall_grass", "half": "upper"} ] - }, - {"slot": "hotbar1", "is": "empty"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_bone_meal_ignores_covered_grass.json b/tests/vegetation/grass_block/grass_block_bone_meal_ignores_covered_grass.json deleted file mode 100644 index f50381e..0000000 --- a/tests/vegetation/grass_block/grass_block_bone_meal_ignores_covered_grass.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_bone_meal_ignores_covered_grass", - "description": "Bone meal on the side face of a grass block with stone above is not valid: nothing grows, the grass block and the stone stay, and the bone meal is not consumed.", - "tags": ["vegetation", "grass-block", "bone-meal", "player"], - "minecraftIds": ["minecraft:grass_block", "minecraft:bone_meal", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, -2, -1], [2, 1, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [1, -2, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, - { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [1.5, -1, 0.5], "rot": [90, 0] }, - {"at": 3, "do": "interact"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:stone"} }, - { "is": {"id": "minecraft:bone_meal", "count": 1} , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_does_not_spread_in_darkness.json b/tests/vegetation/grass_block/grass_block_does_not_spread_in_darkness.json deleted file mode 100644 index 613855b..0000000 --- a/tests/vegetation/grass_block/grass_block_does_not_spread_in_darkness.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_does_not_spread_in_darkness", - "description": "In a sealed, unlit stone box a grass block with air above survives but never spreads onto adjacent dirt, because the light level above it stays below 9 (the same layout with a glowstone is grass_block_spreads_to_dirt_in_range). Nothing happens with a high random tick speed over 200 ticks.", - "tags": ["vegetation", "grass-block", "random-tick", "spread", "modifies-gamerule"], - "minecraftIds": ["minecraft:grass_block", "minecraft:dirt", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-4, 0, -3], [4, 9, 3] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-4, 0, -3], [4, 9, 3] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [-3, 1, -2], [3, 8, 2] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [ 0, 5, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [ 1, 5, 0], "block": {"id": "minecraft:dirt" } }, - { "pos": [-1, 5, 0], "block": {"id": "minecraft:dirt" } }, - { "pos": [ 0, 5, 1], "block": {"id": "minecraft:dirt" } }, - { "pos": [ 0, 4, -1], "block": {"id": "minecraft:dirt" } } - ] - }, - { - "at": 100, - "do": "assert", - "checks": [ - { "pos": [0, 5, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} } - ] - }, - { - "at": 200, - "do": "assert", - "checks": [ - { "pos": [ 0, 5, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, - { "pos": [ 1, 5, 0], "is": {"id": "minecraft:dirt" } }, - { "pos": [-1, 5, 0], "is": {"id": "minecraft:dirt" } }, - { "pos": [ 0, 5, 1], "is": {"id": "minecraft:dirt" } }, - { "pos": [ 0, 4, -1], "is": {"id": "minecraft:dirt" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_does_not_spread_out_of_range.json b/tests/vegetation/grass_block/grass_block_does_not_spread_out_of_range.json deleted file mode 100644 index b35f164..0000000 --- a/tests/vegetation/grass_block/grass_block_does_not_spread_out_of_range.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_does_not_spread_out_of_range", - "description": "With a high random tick speed and light from a glowstone, a grass block spreads onto dirt next to it (control) but never onto dirt two blocks away horizontally, two blocks above or four blocks below, and neither does the new grass of the control. Everything sits in a sealed stone box. The control stays dirt for 196 ticks with a probability of roughly 1e-5.", - "tags": ["vegetation", "grass-block", "random-tick", "spread", "modifies-gamerule"], - "minecraftIds": ["minecraft:grass_block", "minecraft:dirt", "minecraft:stone", "minecraft:glowstone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-4, 0, -3], [4, 9, 3] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-4, 0, -3], [4, 9, 3] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [-3, 1, -2], [3, 8, 2] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [ 0, 5, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [-1, 5, 0], "block": {"id": "minecraft:dirt" } }, - { "pos": [ 2, 5, 0], "block": {"id": "minecraft:dirt" } }, - { "pos": [ 0, 5, 2], "block": {"id": "minecraft:dirt" } }, - { "pos": [ 0, 7, 0], "block": {"id": "minecraft:dirt" } }, - { "pos": [ 0, 1, 0], "block": {"id": "minecraft:dirt" } }, - { "pos": [ 0, 9, 0], "block": {"id": "minecraft:glowstone" } } - ] - }, - { - "at": 100, - "do": "assert", - "checks": [ - { "pos": [0, 5, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} } - ] - }, - { - "at": 200, - "do": "assert", - "checks": [ - { "pos": [-1, 5, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, - { "pos": [ 2, 5, 0], "is": {"id": "minecraft:dirt" } }, - { "pos": [ 0, 5, 2], "is": {"id": "minecraft:dirt" } }, - { "pos": [ 0, 7, 0], "is": {"id": "minecraft:dirt" } }, - { "pos": [ 0, 1, 0], "is": {"id": "minecraft:dirt" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_does_not_spread_to_blocked_targets.json b/tests/vegetation/grass_block/grass_block_does_not_spread_to_blocked_targets.json deleted file mode 100644 index afcee98..0000000 --- a/tests/vegetation/grass_block/grass_block_does_not_spread_to_blocked_targets.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_does_not_spread_to_blocked_targets", - "description": "With a high random tick speed and light from a glowstone, a grass block spreads onto a plain dirt control but not onto coarse dirt, dirt under stone, dirt under a snow block or dirt under a water source, all of which are in range. The water source is enclosed by glass. The control stays dirt for 196 ticks with a probability of roughly 1e-5.", - "tags": ["vegetation", "grass-block", "random-tick", "spread", "modifies-gamerule"], - "minecraftIds": [ - "minecraft:grass_block", "minecraft:dirt" , "minecraft:stone" , "minecraft:glowstone" , - "minecraft:coarse_dirt", "minecraft:snow_block" , "minecraft:water" , "minecraft:glass" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-4, 0, -3], [4, 9, 3] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-4, 0, -3], [4, 9, 3] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [-3, 1, -2], [3, 8, 2] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [ 0, 5, 0], "block": {"id": "minecraft:grass_block" } }, - { "pos": [ 0, 5, -1], "block": {"id": "minecraft:dirt" } }, - { "pos": [ 1, 5, 0], "block": {"id": "minecraft:coarse_dirt" } }, - { "pos": [-1, 5, 0], "block": {"id": "minecraft:dirt" } }, - { "pos": [-1, 6, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [-1, 5, 1], "block": {"id": "minecraft:dirt" } }, - { "pos": [-1, 6, 1], "block": {"id": "minecraft:snow_block" } }, - { "pos": [ 1, 5, 1], "block": {"id": "minecraft:dirt" } }, - { "pos": [ 1, 6, 1], "block": {"id": "minecraft:water" , "level": 0} }, - { "pos": [ 0, 6, 1], "block": {"id": "minecraft:glass" } }, - { "pos": [ 2, 6, 1], "block": {"id": "minecraft:glass" } }, - { "pos": [ 1, 6, 0], "block": {"id": "minecraft:glass" } }, - { "pos": [ 1, 6, 2], "block": {"id": "minecraft:glass" } }, - { "pos": [ 1, 7, 1], "block": {"id": "minecraft:glass" } }, - { "pos": [ 0, 9, 0], "block": {"id": "minecraft:glowstone" } } - ] - }, - { - "at": 100, - "do": "assert", - "checks": [ - { "pos": [0, 5, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} } - ] - }, - { - "at": 200, - "do": "assert", - "checks": [ - { "pos": [ 0, 5, -1], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, - { "pos": [ 1, 5, 0], "is": {"id": "minecraft:coarse_dirt" } }, - { "pos": [-1, 5, 0], "is": {"id": "minecraft:dirt" } }, - { "pos": [-1, 5, 1], "is": {"id": "minecraft:dirt" } }, - { "pos": [ 1, 5, 1], "is": {"id": "minecraft:dirt" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_explosion_drops_dirt.json b/tests/vegetation/grass_block/grass_block_explosion_drops_dirt.json deleted file mode 100644 index e083aff..0000000 --- a/tests/vegetation/grass_block/grass_block_explosion_drops_dirt.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_explosion_drops_dirt", - "description": "A grass block destroyed by a TNT explosion drops exactly one item entity, a single dirt (without Silk Touch its loot table gives dirt, not the grass block). The floor is obsidian so that nothing else drops, and the player is moved away so it cannot pick the item up.", - "tags": ["vegetation", "grass-block", "drops", "explosion", "tnt"], - "minecraftIds": [ - "minecraft:grass_block", "minecraft:tnt" , "minecraft:obsidian" , "minecraft:dirt" , - "minecraft:item" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [4, 3, 2] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:grass_block", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [0, 0, 0], [4, 0, 2] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 1, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:grass_block"} }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 12, 0.5], "rot": [0, 0] }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [3.5, 1, 1.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 12, - "do": "assert", - "checks": [ - { "pos": [1, 1, 1], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:dirt", "Item.count": 1} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_hoe_ignores_bottom_face.json b/tests/vegetation/grass_block/grass_block_hoe_ignores_bottom_face.json deleted file mode 100644 index 46bcc29..0000000 --- a/tests/vegetation/grass_block/grass_block_hoe_ignores_bottom_face.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_hoe_ignores_bottom_face", - "description": "Using an iron hoe on the bottom face of a grass block with air above does nothing, because the bottom face is excluded.", - "tags": ["vegetation", "grass-block", "hoe", "interaction", "player"], - "minecraftIds": ["minecraft:grass_block", "minecraft:iron_hoe", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, -1, 0], [0, 3, 0] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:iron_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:grass_block"} }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, - {"at": 3, "do": "interact"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:grass_block" } }, - { "is": {"id": "minecraft:iron_hoe" , "count": 1}, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_hoe_ignores_covered_side_face.json b/tests/vegetation/grass_block/grass_block_hoe_ignores_covered_side_face.json deleted file mode 100644 index c367f2f..0000000 --- a/tests/vegetation/grass_block/grass_block_hoe_ignores_covered_side_face.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_hoe_ignores_covered_side_face", - "description": "Using an iron hoe on the side face of a grass block with stone above does nothing: the grass block and the stone stay.", - "tags": ["vegetation", "grass-block", "hoe", "interaction", "player"], - "minecraftIds": ["minecraft:grass_block", "minecraft:iron_hoe", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, -2, -1], [2, 1, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:iron_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [1, -2, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, - { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [1.5, -1, 0.5], "rot": [90, 0] }, - {"at": 3, "do": "interact"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block" } }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:stone" } }, - { "is": {"id": "minecraft:iron_hoe" , "count": 1}, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_hoe_top_face.json b/tests/vegetation/grass_block/grass_block_hoe_top_face.json deleted file mode 100644 index 7e3a02c..0000000 --- a/tests/vegetation/grass_block/grass_block_hoe_top_face.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_hoe_top_face", - "description": "Using an iron hoe on the top face of a grass block with air above tills it into farmland and keeps the hoe in the hotbar.", - "tags": ["vegetation", "grass-block", "hoe", "interaction", "player"], - "minecraftIds": ["minecraft:grass_block", "minecraft:iron_hoe", "minecraft:farmland"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:iron_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 90] }, - {"at": 3, "do": "interact"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:farmland" } }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, - { "is": {"id": "minecraft:iron_hoe", "count": 1}, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_item_placed_under_snow_is_snowy.json b/tests/vegetation/grass_block/grass_block_item_placed_under_snow_is_snowy.json deleted file mode 100644 index 06f4c1a..0000000 --- a/tests/vegetation/grass_block/grass_block_item_placed_under_snow_is_snowy.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_item_placed_under_snow_is_snowy", - "description": "A player placing a grass block item into a space with a snow block directly above gets a grass block with snowy=true, and the item is consumed.", - "tags": ["vegetation", "grass-block", "snowy", "placement", "player"], - "minecraftIds": ["minecraft:grass_block", "minecraft:snow_block", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-2, -2, -1], [1, 1, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:grass_block", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [-2, -2, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [1, 0, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:snow_block"} }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [-1.5, -1, 0.5], "rot": [-90, 0] }, - {"at": 3, "do": "interact"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "true"} }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:snow_block"} }, - { "is": "empty" , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_shovel_ignores_bottom_face.json b/tests/vegetation/grass_block/grass_block_shovel_ignores_bottom_face.json deleted file mode 100644 index fc4e343..0000000 --- a/tests/vegetation/grass_block/grass_block_shovel_ignores_bottom_face.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_shovel_ignores_bottom_face", - "description": "Using an iron shovel on the bottom face of a grass block with air above does nothing, because the bottom face is excluded.", - "tags": ["vegetation", "grass-block", "shovel", "interaction", "player"], - "minecraftIds": ["minecraft:grass_block", "minecraft:iron_shovel", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, -1, 0], [0, 3, 0] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:iron_shovel", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, -1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:grass_block"} }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, - {"at": 3, "do": "interact"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:grass_block" } }, - { "is": {"id": "minecraft:iron_shovel", "count": 1}, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_shovel_ignores_covered_side_face.json b/tests/vegetation/grass_block/grass_block_shovel_ignores_covered_side_face.json deleted file mode 100644 index 7b72dbc..0000000 --- a/tests/vegetation/grass_block/grass_block_shovel_ignores_covered_side_face.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_shovel_ignores_covered_side_face", - "description": "Using an iron shovel on the side face of a grass block with stone above does nothing: the grass block and the stone stay.", - "tags": ["vegetation", "grass-block", "shovel", "interaction", "player"], - "minecraftIds": ["minecraft:grass_block", "minecraft:iron_shovel", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, -2, -1], [2, 1, 1] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:iron_shovel", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [1, -2, 0], "block": {"id": "minecraft:stone"} }, - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, - { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [1.5, -1, 0.5], "rot": [90, 0] }, - {"at": 3, "do": "interact"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block" } }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:stone" } }, - { "is": {"id": "minecraft:iron_shovel", "count": 1}, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_shovel_top_face.json b/tests/vegetation/grass_block/grass_block_shovel_top_face.json deleted file mode 100644 index 1150506..0000000 --- a/tests/vegetation/grass_block/grass_block_shovel_top_face.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_shovel_top_face", - "description": "Using an iron shovel on the top face of a grass block with air above flattens it into a dirt path and keeps the shovel in the hotbar.", - "tags": ["vegetation", "grass-block", "shovel", "interaction", "player"], - "minecraftIds": ["minecraft:grass_block", "minecraft:iron_shovel", "minecraft:dirt_path"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 1, 0] ] - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:iron_shovel", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5], "rot": [0, 90] }, - {"at": 3, "do": "interact"}, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:dirt_path" } }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, - { "is": {"id": "minecraft:iron_shovel", "count": 1}, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_snowy_follows_block_above.json b/tests/vegetation/grass_block/grass_block_snowy_follows_block_above.json deleted file mode 100644 index b790145..0000000 --- a/tests/vegetation/grass_block/grass_block_snowy_follows_block_above.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_snowy_follows_block_above", - "description": "A grass block gets snowy=true when a snow layer, snow block or powder snow is placed directly above it, keeps snowy=false under stone or glass, and returns to snowy=false when the snow block above is removed again.", - "tags": ["vegetation", "grass-block", "snowy", "neighbor-update"], - "minecraftIds": [ - "minecraft:grass_block", "minecraft:snow" , "minecraft:snow_block" , "minecraft:powder_snow", - "minecraft:stone" , "minecraft:glass" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [8, 1, 0] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { "pos": [0, 0, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [2, 0, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [4, 0, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [6, 0, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [8, 0, 0], "block": {"id": "minecraft:grass_block"} } - ] - }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, - { "pos": [8, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} } - ] - }, - { - "at": 2, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:snow" } }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:snow_block" } }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:powder_snow"} }, - { "pos": [6, 1, 0], "block": {"id": "minecraft:stone" } }, - { "pos": [8, 1, 0], "block": {"id": "minecraft:glass" } } - ] - }, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "true" } }, - { "pos": [2, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "true" } }, - { "pos": [4, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "true" } }, - { "pos": [6, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, - { "pos": [8, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} } - ] - }, - { "at": 4, "do": "remove", "pos": [0, 1, 0] }, - { "at": 4, "do": "remove", "pos": [2, 1, 0] }, - { "at": 4, "do": "remove", "pos": [4, 1, 0] }, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, - { "pos": [2, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, - { "pos": [4, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, - { "pos": [6, 0, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_spreads_to_dirt_in_range.json b/tests/vegetation/grass_block/grass_block_spreads_to_dirt_in_range.json deleted file mode 100644 index 3f65316..0000000 --- a/tests/vegetation/grass_block/grass_block_spreads_to_dirt_in_range.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_spreads_to_dirt_in_range", - "description": "With a high random tick speed and light from a glowstone, a grass block with air above spreads onto dirt that lies within one block horizontally and from three blocks below to one block above, including dirt under a single snow layer, which becomes grass with snowy=true. Everything sits in a sealed stone box. Each target is picked by a given random tick attempt with probability about 1/45, so a target stays dirt for 196 ticks with a probability of roughly 1e-5.", - "tags": ["vegetation", "grass-block", "random-tick", "spread", "modifies-gamerule"], - "minecraftIds": [ - "minecraft:grass_block", "minecraft:dirt" , "minecraft:stone" , "minecraft:glowstone" , - "minecraft:snow" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-4, 0, -3], [4, 9, 3] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-4, 0, -3], [4, 9, 3] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [-3, 1, -2], [3, 8, 2] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 4, - "do": "place_each", - "blocks": [ - { "pos": [ 0, 5, 0], "block": {"id": "minecraft:grass_block" } }, - { "pos": [ 1, 6, 1], "block": {"id": "minecraft:dirt" } }, - { "pos": [-1, 2, -1], "block": {"id": "minecraft:dirt" } }, - { "pos": [ 1, 5, -1], "block": {"id": "minecraft:dirt" } }, - { "pos": [ 0, 3, 1], "block": {"id": "minecraft:dirt" } }, - { "pos": [-1, 5, 1], "block": {"id": "minecraft:dirt" } }, - { "pos": [-1, 6, 1], "block": {"id": "minecraft:snow" , "layers": 1} }, - { "pos": [ 0, 9, 0], "block": {"id": "minecraft:glowstone" } } - ] - }, - { - "at": 100, - "do": "assert", - "checks": [ - { "pos": [0, 5, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} } - ] - }, - { - "at": 200, - "do": "assert", - "checks": [ - { "pos": [ 1, 6, 1], "is": {"id": "minecraft:grass_block", "snowy": "false" } }, - { "pos": [-1, 2, -1], "is": {"id": "minecraft:grass_block", "snowy": "false" } }, - { "pos": [ 1, 5, -1], "is": {"id": "minecraft:grass_block", "snowy": "false" } }, - { "pos": [ 0, 3, 1], "is": {"id": "minecraft:grass_block", "snowy": "false" } }, - { "pos": [-1, 5, 1], "is": {"id": "minecraft:grass_block", "snowy": "true" } }, - { "pos": [-1, 6, 1], "is": {"id": "minecraft:snow" , "layers": 1} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_survives_under_light_passing_block.json b/tests/vegetation/grass_block/grass_block_survives_under_light_passing_block.json deleted file mode 100644 index b084315..0000000 --- a/tests/vegetation/grass_block/grass_block_survives_under_light_passing_block.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_survives_under_light_passing_block", - "description": "With a high random tick speed a grass block stays grass under air, glass, a top slab or a single snow layer (which becomes snowy=true), while a grass block under stone turns into dirt in the same time as a control. The sites are walled in by stone and two blocks apart. Failing to turn the control into dirt in 38 ticks has a probability of roughly 1e-16.", - "tags": ["vegetation", "grass-block", "random-tick", "light", "modifies-gamerule"], - "minecraftIds": [ - "minecraft:grass_block", "minecraft:dirt" , "minecraft:stone" , "minecraft:glass" , - "minecraft:stone_slab" , "minecraft:snow" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [9, 3, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [9, 3, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 2, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:grass_block" } }, - { "pos": [0, 2, 0], "block": {"id": "minecraft:air" } }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:grass_block" } }, - { "pos": [2, 2, 0], "block": {"id": "minecraft:glass" } }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:grass_block" } }, - { "pos": [4, 2, 0], "block": {"id": "minecraft:stone_slab" , "type": "top" } }, - { "pos": [6, 1, 0], "block": {"id": "minecraft:grass_block" } }, - { "pos": [6, 2, 0], "block": {"id": "minecraft:snow" , "layers": 1} }, - { "pos": [8, 1, 0], "block": {"id": "minecraft:grass_block" } } - ] - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, - { "pos": [4, 1, 0], "is": {"id": "minecraft:grass_block", "snowy": "false"} }, - { "pos": [6, 1, 0], "is": {"id": "minecraft:grass_block", "snowy": "true" } }, - { "pos": [8, 1, 0], "is": {"id": "minecraft:dirt" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_turns_to_dirt_under_covering_block.json b/tests/vegetation/grass_block/grass_block_turns_to_dirt_under_covering_block.json deleted file mode 100644 index 22c4067..0000000 --- a/tests/vegetation/grass_block/grass_block_turns_to_dirt_under_covering_block.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_turns_to_dirt_under_covering_block", - "description": "With a high random tick speed a grass block turns into dirt when it is covered by stone, a bottom slab, a water source, two snow layers or a snow block, because each of these dampens the light entering from above fully or is a full fluid. The sites are walled in by stone and two blocks apart. A random tick hits a given block with probability about 0.63 per game tick, so failing to turn any one of them in 38 ticks has a probability of roughly 1e-16.", - "tags": ["vegetation", "grass-block", "random-tick", "light", "modifies-gamerule"], - "minecraftIds": [ - "minecraft:grass_block", "minecraft:dirt" , "minecraft:stone" , "minecraft:stone_slab" , - "minecraft:water" , "minecraft:snow" , "minecraft:snow_block" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [9, 3, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 4096 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [9, 3, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 2, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [6, 1, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [8, 1, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [2, 2, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "pos": [4, 2, 0], "block": {"id": "minecraft:water", "level": 0} }, - { "pos": [6, 2, 0], "block": {"id": "minecraft:snow", "layers": 2} }, - { "pos": [8, 2, 0], "block": {"id": "minecraft:snow_block"} } - ] - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt"} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:dirt"} }, - { "pos": [4, 1, 0], "is": {"id": "minecraft:dirt"} }, - { "pos": [6, 1, 0], "is": {"id": "minecraft:dirt"} }, - { "pos": [8, 1, 0], "is": {"id": "minecraft:dirt"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/grass_block/grass_block_unchanged_without_random_ticks.json b/tests/vegetation/grass_block/grass_block_unchanged_without_random_ticks.json deleted file mode 100644 index 33cee8b..0000000 --- a/tests/vegetation/grass_block/grass_block_unchanged_without_random_ticks.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "grass_block_unchanged_without_random_ticks", - "description": "With random tick speed 0 a grass block stays grass for 100 ticks even when it is covered by stone, a bottom slab, a water source, two snow layers or a snow block, which shows that grass only turns into dirt through random ticks (the same layout with a high random tick speed is grass_block_turns_to_dirt_under_covering_block).", - "tags": ["vegetation", "grass-block", "random-tick", "modifies-gamerule"], - "minecraftIds": [ - "minecraft:grass_block", "minecraft:dirt" , "minecraft:stone" , "minecraft:stone_slab" , - "minecraft:water" , "minecraft:snow" , "minecraft:snow_block" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [9, 3, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [9, 3, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 2, - "do": "place_each", - "blocks": [ - { "pos": [0, 1, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [2, 1, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [4, 1, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [6, 1, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [8, 1, 0], "block": {"id": "minecraft:grass_block"} }, - { "pos": [2, 2, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "pos": [4, 2, 0], "block": {"id": "minecraft:water", "level": 0} }, - { "pos": [6, 2, 0], "block": {"id": "minecraft:snow", "layers": 2} }, - { "pos": [8, 2, 0], "block": {"id": "minecraft:snow_block"} } - ] - }, - { - "at": 100, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:grass_block"} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:grass_block"} }, - { "pos": [4, 1, 0], "is": {"id": "minecraft:grass_block"} }, - { "pos": [6, 1, 0], "is": {"id": "minecraft:grass_block"} }, - { "pos": [8, 1, 0], "is": {"id": "minecraft:grass_block"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/hanging_roots/hanging_roots_breaks_under_non_sturdy_block.json b/tests/vegetation/hanging_roots/hanging_roots_breaks_under_non_sturdy_block.json deleted file mode 100644 index 4d61215..0000000 --- a/tests/vegetation/hanging_roots/hanging_roots_breaks_under_non_sturdy_block.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "hanging_roots_breaks_under_non_sturdy_block", - "description": "Hanging roots break when the block above is replaced by an oak fence, whose underside is not sturdy, but survive when it is replaced by oak planks.", - "tags": ["vegetation", "hanging-roots", "support", "neighbor-update", "fence"], - "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone", "minecraft:oak_fence", "minecraft:oak_planks"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 3, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 3, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, - { "at": 1, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, - { "at": 3, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:oak_fence"} }, - { "at": 3, "do": "place", "pos": [2, 2, 0], "block": {"id": "minecraft:oak_planks"} }, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:oak_fence" } }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, - { "pos": [2, 2, 0], "is": {"id": "minecraft:oak_planks" } }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:hanging_roots"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/hanging_roots/hanging_roots_destroyed_by_explosion.json b/tests/vegetation/hanging_roots/hanging_roots_destroyed_by_explosion.json deleted file mode 100644 index 4ace04c..0000000 --- a/tests/vegetation/hanging_roots/hanging_roots_destroyed_by_explosion.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "hanging_roots_destroyed_by_explosion", - "description": "An explosion next to hanging roots destroys them and, with no shears involved, leaves no item behind.", - "tags": ["vegetation", "hanging-roots", "explosion", "drops"], - "minecraftIds": ["minecraft:hanging_roots", "minecraft:obsidian", "minecraft:tnt"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 2, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 2, 1] ], - "with": {"id": "minecraft:obsidian"} - }, - { - "at": 1, - "do": "fill", - "region": [ [1, 1, 0], [1, 1, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 2, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:hanging_roots"} } - ] - }, - { - "at": 4, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [1.5, 1, 0.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:air"} }, - { "pos": [0, 2, 0], "is": {"id": "minecraft:obsidian"} }, - { "is": "minecraft:item" , "exists": false } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/hanging_roots/hanging_roots_destroyed_by_piston.json b/tests/vegetation/hanging_roots/hanging_roots_destroyed_by_piston.json deleted file mode 100644 index 2cae155..0000000 --- a/tests/vegetation/hanging_roots/hanging_roots_destroyed_by_piston.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "hanging_roots_destroyed_by_piston", - "description": "An extending piston destroys hanging roots in front of it instead of pushing them, so the air behind the piston head stays empty.", - "tags": ["vegetation", "hanging-roots", "piston", "push-reaction", "redstone"], - "minecraftIds": [ - "minecraft:hanging_roots" , "minecraft:piston" , "minecraft:piston_head" , "minecraft:redstone_block", - "minecraft:stone" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [4, 3, 2] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [4, 3, 2] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [2, 1, 0], [2, 1, 0] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 2, - "do": "place", - "pos": [0, 1, 0], - "block": {"id": "minecraft:piston", "facing": "east", "extended": false} - }, - { "at": 2, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:piston" , "extended": false} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:hanging_roots" } } - ] - }, - { "at": 4, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:redstone_block"} }, - { - "at": 14, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:piston" , "extended": true, "facing": "east"} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:piston_head", "facing": "east"} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/hanging_roots/hanging_roots_flowing_water_does_not_waterlog.json b/tests/vegetation/hanging_roots/hanging_roots_flowing_water_does_not_waterlog.json deleted file mode 100644 index 7128a73..0000000 --- a/tests/vegetation/hanging_roots/hanging_roots_flowing_water_does_not_waterlog.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "hanging_roots_flowing_water_does_not_waterlog", - "description": "Flowing water from a source next to dry hanging roots neither waterlogs nor destroys them and does not pass through them to the air behind.", - "tags": ["vegetation", "hanging-roots", "waterlogged", "fluid"], - "minecraftIds": ["minecraft:hanging_roots", "minecraft:water", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-2, 0, -1], [3, 2, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-2, 0, -1], [3, 2, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [-1, 1, 0], [0, 1, 0] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "fill", - "region": [ [2, 1, 0], [2, 1, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 2, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, - { "at": 4, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:water", "level": 0} }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [ 2, 1, 0], "is": {"id": "minecraft:water" } }, - { "pos": [ 0, 1, 0], "is": {"id": "minecraft:hanging_roots", "waterlogged": false} }, - { "pos": [-1, 1, 0], "is": {"id": "minecraft:air" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/hanging_roots/hanging_roots_lava_does_not_destroy.json b/tests/vegetation/hanging_roots/hanging_roots_lava_does_not_destroy.json deleted file mode 100644 index 82d7a5e..0000000 --- a/tests/vegetation/hanging_roots/hanging_roots_lava_does_not_destroy.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "hanging_roots_lava_does_not_destroy", - "description": "Lava next to hanging roots spreads elsewhere but cannot enter the roots, so they stay and the air behind them stays empty.", - "tags": ["vegetation", "hanging-roots", "fluid", "lava"], - "minecraftIds": ["minecraft:hanging_roots", "minecraft:lava", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-2, 0, -1], [3, 2, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-2, 0, -1], [3, 2, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [-1, 1, 0], [0, 1, 0] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "fill", - "region": [ [2, 1, 0], [2, 1, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 2, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, - { "at": 4, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:lava", "level": 0} }, - { - "at": 80, - "do": "assert", - "checks": [ - { "pos": [ 2, 1, 0], "is": {"id": "minecraft:lava" } }, - { "pos": [ 0, 1, 0], "is": {"id": "minecraft:hanging_roots"} }, - { "pos": [-1, 1, 0], "is": {"id": "minecraft:air" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/hanging_roots/hanging_roots_placement_rejected_on_floor.json b/tests/vegetation/hanging_roots/hanging_roots_placement_rejected_on_floor.json deleted file mode 100644 index a6bedd6..0000000 --- a/tests/vegetation/hanging_roots/hanging_roots_placement_rejected_on_floor.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "hanging_roots_placement_rejected_on_floor", - "description": "Hanging roots used on the top face of a block place nothing because the roots would have no sturdy block above them, and the item is kept.", - "tags": ["vegetation", "hanging-roots", "placement", "support", "player"], - "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:hanging_roots", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 1, 0], [0, 4, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] }, - {"at": 5, "do": "interact"}, - { - "at": 7, - "do": "assert", - "checks": [ - { "pos": [0, 0, 0], "is": {"id": "minecraft:stone" } }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, - { "is": {"id": "minecraft:hanging_roots", "count": 1}, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/hanging_roots/hanging_roots_placement_slab_support.json b/tests/vegetation/hanging_roots/hanging_roots_placement_slab_support.json deleted file mode 100644 index 55c828b..0000000 --- a/tests/vegetation/hanging_roots/hanging_roots_placement_slab_support.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "hanging_roots_placement_slab_support", - "description": "Hanging roots used under a top slab place nothing because its underside is not sturdy, while under a bottom slab they are placed.", - "tags": ["vegetation", "hanging-roots", "placement", "support", "slab", "player"], - "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone", "minecraft:stone_slab"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [5, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:hanging_roots", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [5, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [0, 0, 0], [0, 2, 0] ], - "with": {"id": "minecraft:air"} - }, - { - "at": 1, - "do": "fill", - "region": [ [3, 0, 0], [3, 2, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 2, "do": "place", "pos": [0, 3, 0], "block": {"id": "minecraft:stone_slab", "type": "top"} }, - { "at": 2, "do": "place", "pos": [3, 3, 0], "block": {"id": "minecraft:stone_slab", "type": "bottom"} }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, - {"at": 5, "do": "interact"}, - { - "at": 7, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, - { "is": {"id": "minecraft:hanging_roots", "count": 2}, "slot": "hotbar1" } - ] - }, - { "at": 10, "do": "tp", "entity_alias": "player", "pos": [3.5, 0, 0.5], "rot": [0, -90] }, - {"at": 10, "do": "interact"}, - { - "at": 12, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, - { "pos": [3, 2, 0], "is": {"id": "minecraft:hanging_roots" } }, - { "is": {"id": "minecraft:hanging_roots", "count": 1}, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/hanging_roots/hanging_roots_placement_under_block.json b/tests/vegetation/hanging_roots/hanging_roots_placement_under_block.json deleted file mode 100644 index a335f40..0000000 --- a/tests/vegetation/hanging_roots/hanging_roots_placement_under_block.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "hanging_roots_placement_under_block", - "description": "Hanging roots used on the underside of a block place unwaterlogged hanging roots below it and consume one item.", - "tags": ["vegetation", "hanging-roots", "placement", "player"], - "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:hanging_roots", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 4, - "do": "fill", - "region": [ [0, 0, 0], [0, 2, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, - {"at": 5, "do": "interact"}, - { - "at": 6, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:hanging_roots", "waterlogged": false} }, - { "is": {"id": "minecraft:hanging_roots", "count": 1} , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/hanging_roots/hanging_roots_placement_waterlogged.json b/tests/vegetation/hanging_roots/hanging_roots_placement_waterlogged.json deleted file mode 100644 index ecc55ae..0000000 --- a/tests/vegetation/hanging_roots/hanging_roots_placement_waterlogged.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "hanging_roots_placement_waterlogged", - "description": "Hanging roots used under a block in a spot holding a water source are placed waterlogged.", - "tags": ["vegetation", "hanging-roots", "placement", "waterlogged", "player"], - "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone", "minecraft:water"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:hanging_roots", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [0, 0, 0], [0, 2, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:water", "level": 0} }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, - {"at": 5, "do": "interact"}, - { - "at": 7, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:hanging_roots", "waterlogged": true} }, - { "is": {"id": "minecraft:hanging_roots", "count": 1} , "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/hanging_roots/hanging_roots_replaced_by_block.json b/tests/vegetation/hanging_roots/hanging_roots_replaced_by_block.json deleted file mode 100644 index 8069adf..0000000 --- a/tests/vegetation/hanging_roots/hanging_roots_replaced_by_block.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "hanging_roots_replaced_by_block", - "description": "Hanging roots are replaceable, so placing stone where they hang replaces them and consumes one stone.", - "tags": ["vegetation", "hanging-roots", "placement", "replaceable", "player"], - "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 2} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 4, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [0, 0, 0], [0, 2, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 2, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:hanging_roots"} }, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:hanging_roots"} } - ] - }, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [0.5, 0, 0.5], "rot": [0, -90] }, - {"at": 5, "do": "interact"}, - { - "at": 7, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:stone" } }, - { "is": {"id": "minecraft:stone", "count": 1}, "slot": "hotbar1" } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/hanging_roots/hanging_roots_support_loss.json b/tests/vegetation/hanging_roots/hanging_roots_support_loss.json deleted file mode 100644 index f5f0396..0000000 --- a/tests/vegetation/hanging_roots/hanging_roots_support_loss.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "hanging_roots_support_loss", - "description": "Hanging roots break into air when the block above them is removed, while roots whose support stays are unaffected.", - "tags": ["vegetation", "hanging-roots", "support", "neighbor-update"], - "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 3, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 3, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, - { "at": 1, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:hanging_roots"} }, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:hanging_roots"} }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:hanging_roots"} } - ] - }, - { "at": 3, "do": "remove", "pos": [0, 2, 0] }, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } }, - { "pos": [0, 1, 0], "is": {"id": "minecraft:air" } }, - { "pos": [2, 2, 0], "is": {"id": "minecraft:stone" } }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:hanging_roots"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/hanging_roots/hanging_roots_waterlogged_spreads_water.json b/tests/vegetation/hanging_roots/hanging_roots_waterlogged_spreads_water.json deleted file mode 100644 index 1f52c04..0000000 --- a/tests/vegetation/hanging_roots/hanging_roots_waterlogged_spreads_water.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "hanging_roots_waterlogged_spreads_water", - "description": "Waterlogged hanging roots act as a water source: once a neighbor update schedules their fluid tick, water spreads into an adjacent air corridor while the roots stay.", - "tags": ["vegetation", "hanging-roots", "waterlogged", "fluid", "neighbor-update"], - "minecraftIds": ["minecraft:hanging_roots", "minecraft:water", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-2, 0, -1], [3, 2, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-2, 0, -1], [3, 2, 1] ], - "with": {"id": "minecraft:stone"} - }, - { - "at": 1, - "do": "fill", - "region": [ [1, 1, 0], [2, 1, 0] ], - "with": {"id": "minecraft:air"} - }, - { "at": 2, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:hanging_roots", "waterlogged": true} }, - { "at": 4, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, - { - "at": 30, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:hanging_roots", "waterlogged": true} }, - { "pos": [1, 1, 0], "is": {"id": "minecraft:water" } }, - { "pos": [2, 1, 0], "is": {"id": "minecraft:water" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/vegetation/hanging_roots/hanging_roots_waterlogged_support_loss.json b/tests/vegetation/hanging_roots/hanging_roots_waterlogged_support_loss.json deleted file mode 100644 index 5f10679..0000000 --- a/tests/vegetation/hanging_roots/hanging_roots_waterlogged_support_loss.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "hanging_roots_waterlogged_support_loss", - "description": "Waterlogged hanging roots that lose their support are destroyed and leave their water source behind, because breaking a block keeps its fluid.", - "tags": ["vegetation", "hanging-roots", "support", "waterlogged", "neighbor-update"], - "minecraftIds": ["minecraft:hanging_roots", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 3, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 3, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:hanging_roots", "waterlogged": true} }, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:hanging_roots", "waterlogged": true} } - ] - }, - { "at": 3, "do": "remove", "pos": [0, 2, 0] }, - { - "at": 5, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} } - ] - }, - { - "at": 30, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:water", "level": 0} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/copper_ore/copper_ore_blast_furnace_smelting.json b/tests/world/copper_ore/copper_ore_blast_furnace_smelting.json deleted file mode 100644 index 889246b..0000000 --- a/tests/world/copper_ore/copper_ore_blast_furnace_smelting.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_ore_blast_furnace_smelting", - "description": "Copper ore in a blast furnace burns coal for 800 ticks (twice as fast as a furnace), and one that finishes cooking consumes the ore, outputs one copper ingot and resets its cooking time to 100 ticks.", - "tags": ["copper_ore", "smelting", "blast_furnace", "block-entity"], - "minecraftIds": ["minecraft:copper_ore", "minecraft:blast_furnace", "minecraft:coal", "minecraft:copper_ingot"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [2, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { - "pos": [0, 0, 0], - "block": { - "id": "minecraft:blast_furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:copper_ore\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}]" - } - } - }, - { - "pos": [2, 0, 0], - "block": { - "id": "minecraft:blast_furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:copper_ore\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}]", - "cooking_time_spent": "90s", - "cooking_total_time": "100s" - } - } - } - ] - }, - { - "at": 3, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:blast_furnace", - "lit": "true", - "nbt": {"lit_total_time": "800s", "Items[0].id": "\"minecraft:copper_ore\""} - } - } - ] - }, - { - "at": 20, - "do": "assert", - "checks": [ - { - "pos": [2, 0, 0], - "is": { - "id": "minecraft:blast_furnace", - "nbt": { - "Items[0].id" : "\"minecraft:copper_ingot\"", - "Items[0].count" : "1" , - "cooking_total_time": "100s" - } - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/copper_ore/copper_ore_furnace_smelting.json b/tests/world/copper_ore/copper_ore_furnace_smelting.json deleted file mode 100644 index c7adad2..0000000 --- a/tests/world/copper_ore/copper_ore_furnace_smelting.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "copper_ore_furnace_smelting", - "description": "Copper ore in a furnace burns coal for 1600 ticks, and one that finishes cooking consumes the ore, outputs one copper ingot and resets its cooking time to 200 ticks.", - "tags": ["copper_ore", "smelting", "furnace", "block-entity"], - "minecraftIds": ["minecraft:copper_ore", "minecraft:furnace", "minecraft:coal", "minecraft:copper_ingot"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [2, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place_each", - "blocks": [ - { - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:copper_ore\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}]" - } - } - }, - { - "pos": [2, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:copper_ore\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}]", - "cooking_time_spent": "190s", - "cooking_total_time": "200s" - } - } - } - ] - }, - { - "at": 3, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "true", - "nbt": {"lit_total_time": "1600s", "Items[0].id": "\"minecraft:copper_ore\""} - } - } - ] - }, - { - "at": 20, - "do": "assert", - "checks": [ - { - "pos": [2, 0, 0], - "is": { - "id": "minecraft:furnace", - "nbt": { - "Items[0].id" : "\"minecraft:copper_ingot\"", - "Items[0].count" : "1" , - "cooking_total_time": "200s" - } - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/crimson_stem/crimson_stem_not_fuel.json b/tests/world/crimson_stem/crimson_stem_not_fuel.json deleted file mode 100644 index e961493..0000000 --- a/tests/world/crimson_stem/crimson_stem_not_fuel.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "crimson_stem_not_fuel", - "description": "A crimson stem in a furnace fuel slot is not a valid fuel: it is not consumed and the furnace stays unlit.", - "tags": ["crimson_stem", "fuel", "furnace", "block-entity"], - "minecraftIds": ["minecraft:crimson_stem", "minecraft:furnace", "minecraft:raw_iron", "minecraft:coal"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:raw_iron\"}, {Slot: 1b, count: 1, id: \"minecraft:crimson_stem\"}]" - } - } - }, - { - "at": 3, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "false", - "nbt": { - "lit_total_time": "0s", - "Items[1].id": "\"minecraft:crimson_stem\"", - "Items[1].count": 1 - } - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/crimson_stem/crimson_stem_not_smelted_to_charcoal.json b/tests/world/crimson_stem/crimson_stem_not_smelted_to_charcoal.json deleted file mode 100644 index e5019c3..0000000 --- a/tests/world/crimson_stem/crimson_stem_not_smelted_to_charcoal.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "crimson_stem_not_smelted_to_charcoal", - "description": "A crimson stem in a furnace input slot is not smelted into charcoal even with coal as fuel: the furnace stays unlit and the coal is not consumed.", - "tags": ["crimson_stem", "fuel", "furnace", "block-entity"], - "minecraftIds": ["minecraft:crimson_stem", "minecraft:furnace", "minecraft:raw_iron", "minecraft:coal"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [0, 0, 0] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "place", - "pos": [0, 0, 0], - "block": { - "id": "minecraft:furnace", - "nbt": { - "Items": "[{Slot: 0b, count: 1, id: \"minecraft:crimson_stem\"}, {Slot: 1b, count: 1, id: \"minecraft:coal\"}]" - } - } - }, - { - "at": 3, - "do": "assert", - "checks": [ - { - "pos": [0, 0, 0], - "is": { - "id": "minecraft:furnace", - "lit": "false", - "nbt": { - "lit_total_time": "0s", - "Items[0].id": "\"minecraft:crimson_stem\"", - "Items[1].id": "\"minecraft:coal\"", - "Items[1].count": 1 - } - } - } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/diamond_ore/diamond_ore_stable_with_neighbor_updates.json b/tests/world/diamond_ore/diamond_ore_stable_with_neighbor_updates.json deleted file mode 100644 index 34e2b93..0000000 --- a/tests/world/diamond_ore/diamond_ore_stable_with_neighbor_updates.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "diamond_ore_stable_with_neighbor_updates", - "description": "A placed diamond ore stays diamond ore after random ticks and after neighbouring blocks are placed and removed around it.", - "tags": ["world", "ore", "diamond-ore", "neighbor-update"], - "minecraftIds": ["minecraft:diamond_ore", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 2, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 3 - } - } - }, - "timeline": [ - { "at": 0, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:diamond_ore"} }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:diamond_ore"} } - ] - }, - { - "at": 2, - "do": "place_each", - "blocks": [ - { "pos": [ 1, 1, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [ 0, 2, 0], "block": {"id": "minecraft:stone"} }, - { "pos": [ 0, 0, 0], "block": {"id": "minecraft:stone"} } - ] - }, - { "at": 4, "do": "remove", "pos": [1, 1, 0] }, - { "at": 4, "do": "remove", "pos": [0, 0, 0] }, - { - "at": 20, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:diamond_ore"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/diamond_ore/diamond_ore_tnt_explosion_drops_diamond.json b/tests/world/diamond_ore/diamond_ore_tnt_explosion_drops_diamond.json deleted file mode 100644 index 74c05f4..0000000 --- a/tests/world/diamond_ore/diamond_ore_tnt_explosion_drops_diamond.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "diamond_ore_tnt_explosion_drops_diamond", - "description": "A TNT explosion destroys an adjacent diamond ore block and it drops a diamond item, not a diamond ore item.", - "tags": ["world", "ore", "diamond-ore", "explosion", "drops"], - "minecraftIds": [ - "minecraft:diamond_ore", "minecraft:obsidian" , "minecraft:tnt" , "minecraft:item" , - "minecraft:diamond" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [12, 3, 0] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0, - "minecraft:tnt_explosion_drop_decay": false - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [10, 0, 0], [12, 0, 0] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 0, "do": "place", "pos": [11, 1, 0], "block": {"id": "minecraft:diamond_ore"} }, - { "at": 0, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, 0.5] }, - { - "at": 1, - "do": "assert", - "checks": [ - { "pos": [11, 1, 0], "is": {"id": "minecraft:diamond_ore"} } - ] - }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [12.5, 1, 0.5], - "fuse": "1s" - }, - { - "at": 20, - "do": "assert", - "checks": [ - { "pos": [11, 1, 0], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "exists": true, "count": 1} , - {"is": "minecraft:item", "exists": true, "Item.id": "minecraft:diamond"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/dirt_path/dirt_path_carpet_above_keeps_path.json b/tests/world/dirt_path/dirt_path_carpet_above_keeps_path.json deleted file mode 100644 index bcf3c5c..0000000 --- a/tests/world/dirt_path/dirt_path_carpet_above_keeps_path.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "dirt_path_carpet_above_keeps_path", - "description": "A carpet placed on top of a dirt path does not turn it into dirt because carpet is not solid.", - "tags": ["world", "dirt_path", "carpet"], - "minecraftIds": ["minecraft:dirt_path", "minecraft:white_carpet"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt_path"} }, - { "at": 3, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:white_carpet"} }, - { - "at": 8, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt_path" } }, - { "pos": [0, 2, 0], "is": {"id": "minecraft:white_carpet"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/dirt_path/dirt_path_dirt_stays_after_support_removed.json b/tests/world/dirt_path/dirt_path_dirt_stays_after_support_removed.json deleted file mode 100644 index a6658bb..0000000 --- a/tests/world/dirt_path/dirt_path_dirt_stays_after_support_removed.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "dirt_path_dirt_stays_after_support_removed", - "description": "After a path turned into dirt under a stone block, removing the stone does not bring the path back.", - "tags": ["world", "dirt_path", "neighbor-update"], - "minecraftIds": ["minecraft:dirt_path", "minecraft:dirt", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt_path"} }, - { "at": 3, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, - { - "at": 8, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt"} } - ] - }, - { "at": 9, "do": "remove", "pos": [0, 2, 0] }, - { - "at": 14, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt"} }, - { "pos": [0, 2, 0], "is": {"id": "minecraft:air" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/dirt_path/dirt_path_explosion_drops_dirt.json b/tests/world/dirt_path/dirt_path_explosion_drops_dirt.json deleted file mode 100644 index 5b01b6f..0000000 --- a/tests/world/dirt_path/dirt_path_explosion_drops_dirt.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "dirt_path_explosion_drops_dirt", - "description": "A dirt path destroyed by a TNT explosion drops exactly one dirt item and no dirt path item.", - "tags": ["world", "dirt_path", "drops", "explosion"], - "minecraftIds": ["minecraft:dirt_path", "minecraft:dirt", "minecraft:tnt", "minecraft:obsidian", "minecraft:item"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 1, "do": "place", "pos": [2, 1, 0], "block": {"id": "minecraft:dirt_path"} }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [2.5, 12, 0.5] }, - { - "at": 2, - "do": "assert", - "checks": [ {"is": "minecraft:item", "exists": false} ] - }, - { - "at": 3, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [2.5, 1, 0.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 40, - "do": "assert", - "checks": [ - { "pos": [2, 1, 0], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "exists": true, "count": 1} , - {"is": "minecraft:item", "exists": true, "Item.id": "minecraft:dirt"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/dirt_path/dirt_path_fence_gate_above_keeps_path.json b/tests/world/dirt_path/dirt_path_fence_gate_above_keeps_path.json deleted file mode 100644 index caf982c..0000000 --- a/tests/world/dirt_path/dirt_path_fence_gate_above_keeps_path.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "dirt_path_fence_gate_above_keeps_path", - "description": "A fence gate placed on top of a dirt path does not turn it into dirt.", - "tags": ["world", "dirt_path", "fence_gate"], - "minecraftIds": ["minecraft:dirt_path", "minecraft:oak_fence_gate"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt_path"} }, - { "at": 3, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:oak_fence_gate", "facing": "north"} }, - { - "at": 8, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt_path" } }, - { "pos": [0, 2, 0], "is": {"id": "minecraft:oak_fence_gate"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/dirt_path/dirt_path_hoe_blocked_by_carpet.json b/tests/world/dirt_path/dirt_path_hoe_blocked_by_carpet.json deleted file mode 100644 index 585d9d1..0000000 --- a/tests/world/dirt_path/dirt_path_hoe_blocked_by_carpet.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "dirt_path_hoe_blocked_by_carpet", - "description": "A hoe used on the side of a dirt path that has a carpet on top does nothing because the block above is not air.", - "tags": ["world", "dirt_path", "hoe", "player"], - "minecraftIds": ["minecraft:dirt_path", "minecraft:white_carpet", "minecraft:iron_hoe"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:iron_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt_path"} }, - { "at": 1, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:white_carpet"} }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 20] }, - {"at": 2, "do": "interact"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt_path" } }, - { "pos": [0, 2, 0], "is": {"id": "minecraft:white_carpet"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/dirt_path/dirt_path_hoe_tills_to_farmland.json b/tests/world/dirt_path/dirt_path_hoe_tills_to_farmland.json deleted file mode 100644 index cf4b073..0000000 --- a/tests/world/dirt_path/dirt_path_hoe_tills_to_farmland.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "dirt_path_hoe_tills_to_farmland", - "description": "A survival player using a hoe on the top of a dirt path with air above turns it into farmland.", - "tags": ["world", "dirt_path", "hoe", "player"], - "minecraftIds": ["minecraft:dirt_path", "minecraft:farmland", "minecraft:iron_hoe"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:iron_hoe", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt_path"} }, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, - {"at": 2, "do": "interact"}, - { - "at": 3, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:farmland"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/dirt_path/dirt_path_ignores_side_neighbor_changes.json b/tests/world/dirt_path/dirt_path_ignores_side_neighbor_changes.json deleted file mode 100644 index 30adedb..0000000 --- a/tests/world/dirt_path/dirt_path_ignores_side_neighbor_changes.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "dirt_path_ignores_side_neighbor_changes", - "description": "Solid blocks placed beside a dirt path and the removal of the block below it do not turn the path into dirt, because only a change above is checked.", - "tags": ["world", "dirt_path", "neighbor-update"], - "minecraftIds": ["minecraft:dirt_path", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt_path"} }, - { "at": 3, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 3, "do": "place", "pos": [-1, 1, 0], "block": {"id": "minecraft:stone"} }, - { "at": 3, "do": "place", "pos": [0, 1, 1], "block": {"id": "minecraft:stone"} }, - { "at": 3, "do": "place", "pos": [0, 1, -1], "block": {"id": "minecraft:stone"} }, - { "at": 4, "do": "remove", "pos": [0, 0, 0] }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt_path"} }, - { "pos": [0, 0, 0], "is": {"id": "minecraft:air" } } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/dirt_path/dirt_path_item_under_solid_places_dirt.json b/tests/world/dirt_path/dirt_path_item_under_solid_places_dirt.json deleted file mode 100644 index 88227b8..0000000 --- a/tests/world/dirt_path/dirt_path_item_under_solid_places_dirt.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "dirt_path_item_under_solid_places_dirt", - "description": "A survival player placing a dirt path item in a spot with a solid block directly above gets plain dirt instead of a path.", - "tags": ["world", "dirt_path", "placement", "player"], - "minecraftIds": ["minecraft:dirt_path", "minecraft:dirt", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [1, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - }, - "player": { - "inventory": { "hotbar1": {"id": "minecraft:dirt_path", "count": 1} }, - "selected_hotbar": 1, - "game_mode": "Survival" - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [1, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 0, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 1, -2.5], "rot": [0, 28] }, - {"at": 1, "do": "interact"}, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt" } }, - { "pos": [0, 2, 0], "is": {"id": "minecraft:stone"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/dirt_path/dirt_path_solid_above_turns_to_dirt.json b/tests/world/dirt_path/dirt_path_solid_above_turns_to_dirt.json deleted file mode 100644 index 7b3faa2..0000000 --- a/tests/world/dirt_path/dirt_path_solid_above_turns_to_dirt.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "dirt_path_solid_above_turns_to_dirt", - "description": "Placing a stone block directly on top of a dirt path turns the path into dirt a tick later.", - "tags": ["world", "dirt_path", "neighbor-update"], - "minecraftIds": ["minecraft:dirt_path", "minecraft:dirt", "minecraft:stone"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 4, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs": false, - "minecraft:advance_time": false, - "minecraft:advance_weather": false, - "minecraft:random_tick_speed": 0 - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:stone"} - }, - { "at": 1, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:dirt_path"} }, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt_path"} } - ] - }, - { "at": 3, "do": "place", "pos": [0, 2, 0], "block": {"id": "minecraft:stone"} }, - { - "at": 8, - "do": "assert", - "checks": [ - { "pos": [0, 1, 0], "is": {"id": "minecraft:dirt" } }, - { "pos": [0, 2, 0], "is": {"id": "minecraft:stone"} } - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/emerald_ore/emerald_ore_tnt_drops_emerald.json b/tests/world/emerald_ore/emerald_ore_tnt_drops_emerald.json deleted file mode 100644 index 37fd9eb..0000000 --- a/tests/world/emerald_ore/emerald_ore_tnt_drops_emerald.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "emerald_ore_tnt_drops_emerald", - "description": "An emerald ore destroyed by a TNT explosion drops exactly one emerald item (never the ore block). The TNT is only a trigger for the ore's loot table; the floor is obsidian so it survives the blast.", - "tags": ["world", "emerald-ore", "drops", "explosion"], - "minecraftIds": [ - "minecraft:emerald_ore", "minecraft:obsidian" , "minecraft:tnt" , "minecraft:item" , - "minecraft:emerald" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 2, 1] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:emerald_ore"} }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-1.5, 3, 0.5] }, - { - "at": 2, - "do": "assert", - "checks": [ - { "pos": [1, 1, 0], "is": {"id": "minecraft:emerald_ore"} }, - { "is": "minecraft:item" , "exists": false } - ] - }, - { - "at": 3, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [2.5, 1, 0.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 12, - "do": "assert", - "checks": [ - { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} }, - {"is": "minecraft:item", "exists": true, "count": 1}, - {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:emerald", "Item.count": "1"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/emerald_ore/emerald_ore_tnt_drops_no_experience.json b/tests/world/emerald_ore/emerald_ore_tnt_drops_no_experience.json deleted file mode 100644 index e88ad44..0000000 --- a/tests/world/emerald_ore/emerald_ore_tnt_drops_no_experience.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "emerald_ore_tnt_drops_no_experience", - "description": "An emerald ore destroyed by an explosion with no player as the source gives no experience orbs: the ore only drops experience when a player causes the break.", - "tags": ["world", "emerald-ore", "experience", "explosion"], - "minecraftIds": ["minecraft:emerald_ore", "minecraft:obsidian", "minecraft:tnt", "minecraft:experience_orb"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 2, 1] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:emerald_ore"} }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-1.5, 3, 0.5] }, - { - "at": 3, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [2.5, 1, 0.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 12, - "do": "assert", - "checks": [ - { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "exists": true, "Item.id": "minecraft:emerald"}, - {"is": "minecraft:experience_orb", "exists": false} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/gold_ores/gold_ore_explosion_drops_raw_gold.json b/tests/world/gold_ores/gold_ore_explosion_drops_raw_gold.json deleted file mode 100644 index 17827f7..0000000 --- a/tests/world/gold_ores/gold_ore_explosion_drops_raw_gold.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "gold_ore_explosion_drops_raw_gold", - "description": "An exploded gold ore (no tool) drops exactly one raw gold item and no gold ore item; DropExperienceBlock gives 0 experience.", - "tags": ["ore", "gold", "drops", "explosion"], - "minecraftIds": ["minecraft:gold_ore", "minecraft:raw_gold"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 2, 1] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:gold_ore"} }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [2.5, 1, 0.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:raw_gold", "Item.count": 1}, - {"is": "minecraft:experience_orb", "exists": false} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/gold_ores/nether_gold_ore_explosion_drops_gold_nugget.json b/tests/world/gold_ores/nether_gold_ore_explosion_drops_gold_nugget.json deleted file mode 100644 index e6cb5d4..0000000 --- a/tests/world/gold_ores/nether_gold_ore_explosion_drops_gold_nugget.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.1", - "name": "nether_gold_ore_explosion_drops_gold_nugget", - "description": "An exploded nether gold ore drops a single stack of gold nuggets (count is random 2-6, so only the id is checked) and no raw gold or ore item.", - "tags": ["ore", "gold", "drops", "explosion"], - "minecraftIds": ["minecraft:nether_gold_ore", "minecraft:gold_nugget"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 2, 1] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:nether_gold_ore"} }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [2.5, 1, 0.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:gold_nugget"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/iron_ore/iron_ore_tnt_drops_raw_iron.json b/tests/world/iron_ore/iron_ore_tnt_drops_raw_iron.json deleted file mode 100644 index 309f12a..0000000 --- a/tests/world/iron_ore/iron_ore_tnt_drops_raw_iron.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "iron_ore_tnt_drops_raw_iron", - "description": "Iron ore destroyed by a TNT explosion (drop decay off, no tool) drops exactly one raw iron and no experience orb: the loot table gives raw iron without silk touch, and the explosion path (no player source) produces no experience orb.", - "tags": ["ore", "iron-ore", "drops", "explosion"], - "minecraftIds": [ - "minecraft:iron_ore" , "minecraft:obsidian" , "minecraft:tnt" , "minecraft:item" , - "minecraft:raw_iron" , "minecraft:experience_orb" - ], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [-1, 0, -1], [3, 2, 1] ] - }, - "world": { - "gamerules": { - "minecraft:spawn_mobs" : false, - "minecraft:advance_time" : false, - "minecraft:advance_weather" : false, - "minecraft:tnt_explosion_drop_decay": false - } - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [-1, 0, -1], [3, 0, 1] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 0, "do": "place", "pos": [1, 1, 0], "block": {"id": "minecraft:iron_ore"} }, - { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 12, 0.5] }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [2.5, 1, 0.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [1, 1, 0], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:raw_iron", "Item.count": 1}, - {"is": "minecraft:experience_orb", "exists": false} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/lapis_ores/lapis_ore_explosion_drops_lapis_lazuli.json b/tests/world/lapis_ores/lapis_ore_explosion_drops_lapis_lazuli.json deleted file mode 100644 index b7e66bb..0000000 --- a/tests/world/lapis_ores/lapis_ore_explosion_drops_lapis_lazuli.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "lapis_ore_explosion_drops_lapis_lazuli", - "description": "Lapis ore destroyed by an explosion drops one lapis lazuli item stack, not the ore block.", - "tags": ["lapis-ore", "ore", "explosion", "drops"], - "minecraftIds": ["minecraft:lapis_ore", "minecraft:obsidian", "minecraft:tnt"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [14, 2, 2] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [9, 0, 0], [13, 0, 2] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 0, "do": "place", "pos": [11, 1, 1], "block": {"id": "minecraft:lapis_ore"} }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [12.5, 1, 1.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [11, 1, 1], "is": {"id": "minecraft:air"} } , - {"is": "minecraft:item", "exists": true, "count": 1, "Item.id": "minecraft:lapis_lazuli"} - ] - } - ], - "breakpoints": [] -} - diff --git a/tests/world/lapis_ores/lapis_ore_explosion_drops_no_experience.json b/tests/world/lapis_ores/lapis_ore_explosion_drops_no_experience.json deleted file mode 100644 index b405388..0000000 --- a/tests/world/lapis_ores/lapis_ore_explosion_drops_no_experience.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json", - "flintVersion": "1.0.0", - "name": "lapis_ore_explosion_drops_no_experience", - "description": "Lapis ore destroyed by TNT with no player source drops no experience orb.", - "tags": ["lapis-ore", "ore", "explosion", "experience"], - "minecraftIds": ["minecraft:lapis_ore", "minecraft:obsidian", "minecraft:tnt"], - "dependencies": [], - "setup": { - "cleanup": { - "region": [ [0, 0, 0], [14, 2, 2] ] - } - }, - "timeline": [ - { - "at": 0, - "do": "fill", - "region": [ [9, 0, 0], [13, 0, 2] ], - "with": {"id": "minecraft:obsidian"} - }, - { "at": 0, "do": "place", "pos": [11, 1, 1], "block": {"id": "minecraft:lapis_ore"} }, - { - "at": 2, - "do": "summon", - "entity_alias": "tnt", - "entity_type": "minecraft:tnt", - "pos": [12.5, 1, 1.5], - "nbt": {"fuse": "1s"} - }, - { - "at": 10, - "do": "assert", - "checks": [ - { "pos": [11, 1, 1], "is": {"id": "minecraft:air"} }, - { "is": "minecraft:experience_orb", "exists": false } - ] - } - ], - "breakpoints": [] -} - From fa46dff97e196a56e5360ef6c37b8eac2d5eca9a Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Tue, 17 Nov 2026 14:48:48 +0100 Subject: [PATCH 83/85] fixes --- .../lanterns/lantern_destroyed_by_piston.json | 2 +- .../stairs/copper_stairs_honeycomb.json | 16 ++++++++-------- .../crimson_stem/crimson_stem_survives_fire.json | 7 ++++++- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/tests/decoration/lanterns/lantern_destroyed_by_piston.json b/tests/decoration/lanterns/lantern_destroyed_by_piston.json index 6dab46a..97c42e2 100644 --- a/tests/decoration/lanterns/lantern_destroyed_by_piston.json +++ b/tests/decoration/lanterns/lantern_destroyed_by_piston.json @@ -11,7 +11,7 @@ "dependencies": [], "setup": { "cleanup": { - "region": [ [0, 0, 0], [12, 2, 0] ] + "region": [ [0, 0, -2], [12, 2, 2] ] } }, "timeline": [ diff --git a/tests/decoration/stairs/copper_stairs_honeycomb.json b/tests/decoration/stairs/copper_stairs_honeycomb.json index f71ed12..050b272 100644 --- a/tests/decoration/stairs/copper_stairs_honeycomb.json +++ b/tests/decoration/stairs/copper_stairs_honeycomb.json @@ -56,17 +56,17 @@ ] }, { "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 4, 0.5], "rot": [0, 90] }, - {"at": 1, "do": "interact"}, - { "at": 2, "do": "tp", "entity_alias": "player", "pos": [3.5, 4, 0.5], "rot": [0, 90] }, {"at": 2, "do": "interact"}, - { "at": 3, "do": "tp", "entity_alias": "player", "pos": [6.5, 4, 0.5], "rot": [0, 90] }, - {"at": 3, "do": "interact"}, - { "at": 4, "do": "tp", "entity_alias": "player", "pos": [9.5, 4, 0.5], "rot": [0, 90] }, + { "at": 3, "do": "tp", "entity_alias": "player", "pos": [3.5, 4, 0.5], "rot": [0, 90] }, {"at": 4, "do": "interact"}, - { "at": 5, "do": "tp", "entity_alias": "player", "pos": [12.5, 4, 0.5], "rot": [0, 90] }, - {"at": 5, "do": "interact"}, + { "at": 5, "do": "tp", "entity_alias": "player", "pos": [6.5, 4, 0.5], "rot": [0, 90] }, + {"at": 6, "do": "interact"}, + { "at": 7, "do": "tp", "entity_alias": "player", "pos": [9.5, 4, 0.5], "rot": [0, 90] }, + {"at": 8, "do": "interact"}, + { "at": 9, "do": "tp", "entity_alias": "player", "pos": [12.5, 4, 0.5], "rot": [0, 90] }, + {"at": 10, "do": "interact"}, { - "at": 6, + "at": 11, "do": "assert", "checks": [ { diff --git a/tests/world/crimson_stem/crimson_stem_survives_fire.json b/tests/world/crimson_stem/crimson_stem_survives_fire.json index f77660a..8dcc6d2 100644 --- a/tests/world/crimson_stem/crimson_stem_survives_fire.json +++ b/tests/world/crimson_stem/crimson_stem_survives_fire.json @@ -9,8 +9,13 @@ "setup": { "cleanup": { "region": [ [0, 0, -1], [6, 2, 1] ] + }, + "world": { + "gamerules": { + "minecraft:fire_spread_radius_around_player": -1 + } } - }, + }, "timeline": [ { "at": 0, From a7545105e34975b5a673743427295a0c8708601e Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Tue, 17 Nov 2026 14:50:17 +0100 Subject: [PATCH 84/85] triple deadline --- .github/workflows/running-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/running-tests.yml b/.github/workflows/running-tests.yml index 2b60e75..2cb81d0 100644 --- a/.github/workflows/running-tests.yml +++ b/.github/workflows/running-tests.yml @@ -159,7 +159,7 @@ jobs: run: | # Run all example tests cargo run --release --manifest-path FlintCLI/Cargo.toml -- tests/ --server localhost:25565 --recursive --verbose - timeout-minutes: 10 + timeout-minutes: 30 - name: Stop Minecraft Server if: always() From 635c993f0817381058c87a91c7d7ef24186ae4f6 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Tue, 17 Nov 2026 14:55:30 +0100 Subject: [PATCH 85/85] fmt --- .../world/crimson_stem/crimson_stem_survives_fire.json | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/world/crimson_stem/crimson_stem_survives_fire.json b/tests/world/crimson_stem/crimson_stem_survives_fire.json index 8dcc6d2..c6a743a 100644 --- a/tests/world/crimson_stem/crimson_stem_survives_fire.json +++ b/tests/world/crimson_stem/crimson_stem_survives_fire.json @@ -9,13 +9,9 @@ "setup": { "cleanup": { "region": [ [0, 0, -1], [6, 2, 1] ] - }, - "world": { - "gamerules": { - "minecraft:fire_spread_radius_around_player": -1 - } - } - }, + }, + "world": { "gamerules": {"minecraft:fire_spread_radius_around_player": -1} } + }, "timeline": [ { "at": 0,