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() 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/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": [] +} + 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/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_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/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_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": [] +} + 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_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_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_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": [] +} + 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_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_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": [] +} + 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_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_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": [] +} + 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_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_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/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": [] +} + 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/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": [] +} + 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": [] +} + 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": [] +} + 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": [] +} + 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": [] +} + 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": [] +} + 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": [] +} + 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": [] +} + 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": [] +} + 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/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_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": [] +} + 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_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": [] +} + 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_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": [] +} + 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/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_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": [] +} + 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/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..97c42e2 --- /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, -2], [12, 2, 2] ] + } + }, + "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/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_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": [] +} + diff --git a/tests/decoration/stairs/copper_stairs_honeycomb.json b/tests/decoration/stairs/copper_stairs_honeycomb.json new file mode 100644 index 0000000..050b272 --- /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": 2, "do": "interact"}, + { "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": [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": 11, + "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/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/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": [] +} + 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_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} } + ] + } + ] +} + 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": [] +} + 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_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": [] +} + 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_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/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/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_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} } + ] + } + ] +} + 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"} } + ] + } + ] +} + 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": [] +} + 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 + } + ] + } + ] +} + 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 } + ] + } + ] +} + 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": [] +} + 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": [] +} + 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": [] +} + 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": [] +} + 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} } + ] + } + ] +} + 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_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": [] +} + 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": [] +} + 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" } } + ] + } + ] +} + 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/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} } + ] + } + ] +} + 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/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_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": [] +} + 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": [] +} + 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_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": [] +} + 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_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/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/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_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": [] +} + 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_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_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": [] +} + 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": [] +} + 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": [] +} + 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": [] +} + 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": [] +} + 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": [] +} + 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_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": [] +} + 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": [] +} + 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": [] +} + 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": [] +} + 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": [] +} + 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_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..c6a743a --- /dev/null +++ b/tests/world/crimson_stem/crimson_stem_survives_fire.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": "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] ] + }, + "world": { "gamerules": {"minecraft:fire_spread_radius_around_player": -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": [] +} + 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/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_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/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/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": [] +} + 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_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": [] +} + 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/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_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": [] +} +