From 09a573686baaed9ce7dcb02172cc5d60df67f752 Mon Sep 17 00:00:00 2001 From: JunkyDeveloper Date: Tue, 13 Oct 2026 06:25:19 +0200 Subject: [PATCH] Add Flint tests for amethyst_block (1 blocks) --- .../piston/piston_pushes_amethyst_block.json | 45 +++++++++++++ .../amethyst_block_resonance.json | 63 ++++++++++++++++++ .../sculk_sensor/stone_does_not_resonate.json | 66 +++++++++++++++++++ 3 files changed, 174 insertions(+) create mode 100644 tests/redstone/piston/piston_pushes_amethyst_block.json create mode 100644 tests/redstone/sculk_sensor/amethyst_block_resonance.json create mode 100644 tests/redstone/sculk_sensor/stone_does_not_resonate.json diff --git a/tests/redstone/piston/piston_pushes_amethyst_block.json b/tests/redstone/piston/piston_pushes_amethyst_block.json new file mode 100644 index 0000000..de05e4a --- /dev/null +++ b/tests/redstone/piston/piston_pushes_amethyst_block.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": "piston_pushes_amethyst_block", + "description": "A piston powered by a redstone block pushes an amethyst block one block forward (normal push reaction) and its head takes the block's old position.", + "tags": ["amethyst", "piston", "push-reaction"], + "minecraftIds": ["minecraft:amethyst_block", "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:amethyst_block" } } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:piston" , "facing": "east", "extended": false} }, + { "pos": [1, 1, 0], "is": {"id": "minecraft:amethyst_block" } }, + { "pos": [2, 1, 0], "is": {"id": "minecraft:air" } } + ] + }, + { "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:amethyst_block"} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/sculk_sensor/amethyst_block_resonance.json b/tests/redstone/sculk_sensor/amethyst_block_resonance.json new file mode 100644 index 0000000..7a26e91 --- /dev/null +++ b/tests/redstone/sculk_sensor/amethyst_block_resonance.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": "amethyst_block_resonance", + "description": "A sculk sensor activated next to an amethyst block makes the block re-emit the vibration, which activates a second sculk sensor out of the first sensor's own range of the original vibration.", + "tags": ["amethyst", "sculk-sensor", "vibration", "resonance", "player"], + "minecraftIds": ["minecraft:amethyst_block", "minecraft:sculk_sensor", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -1], [9, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -1], [9, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:sculk_sensor" } }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:amethyst_block"} }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:sculk_sensor" } } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-2.5, 3, 0.5], "rot": [0, 90] }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:sculk_sensor", "sculk_sensor_phase": "inactive"} }, + { "pos": [8, 1, 0], "is": {"id": "minecraft:sculk_sensor", "sculk_sensor_phase": "inactive"} } + ] + }, + {"at": 41, "do": "interact"}, + { + "at": 42, + "do": "assert", + "checks": [ + { "pos": [-3, 1, 0], "is": {"id": "minecraft:stone"} } + ] + }, + { + "at": 60, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:sculk_sensor", "sculk_sensor_phase": "active"} }, + { "pos": [8, 1, 0], "is": {"id": "minecraft:sculk_sensor", "sculk_sensor_phase": "active", "power": 2} } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/redstone/sculk_sensor/stone_does_not_resonate.json b/tests/redstone/sculk_sensor/stone_does_not_resonate.json new file mode 100644 index 0000000..1442e43 --- /dev/null +++ b/tests/redstone/sculk_sensor/stone_does_not_resonate.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": "stone_does_not_resonate", + "description": "Control for amethyst_block_resonance: with stone instead of amethyst next to the first sculk sensor, the first sensor activates but the second sensor stays inactive.", + "tags": ["sculk-sensor", "vibration", "resonance", "player"], + "minecraftIds": ["minecraft:sculk_sensor", "minecraft:stone"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-4, 0, -1], [9, 4, 1] ] + }, + "player": { + "inventory": { "hotbar1": {"id": "minecraft:stone", "count": 1} }, + "selected_hotbar": 1, + "game_mode": "Survival" + } + }, + "timeline": [ + { + "at": 0, + "do": "fill", + "region": [ [-4, 0, -1], [9, 0, 1] ], + "with": {"id": "minecraft:stone"} + }, + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [0, 1, 0], "block": {"id": "minecraft:sculk_sensor"} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:sculk_sensor"} } + ] + }, + { "at": 1, "do": "tp", "entity_alias": "player", "pos": [-2.5, 3, 0.5], "rot": [0, 90] }, + { + "at": 40, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:sculk_sensor", "sculk_sensor_phase": "inactive"} }, + { "pos": [8, 1, 0], "is": {"id": "minecraft:sculk_sensor", "sculk_sensor_phase": "inactive"} } + ] + }, + {"at": 41, "do": "interact"}, + { + "at": 42, + "do": "assert", + "checks": [ + { "pos": [-3, 1, 0], "is": {"id": "minecraft:stone"} } + ] + }, + { + "at": 60, + "do": "assert", + "checks": [ + { "pos": [0, 1, 0], "is": {"id": "minecraft:sculk_sensor", "sculk_sensor_phase": "active"} }, + { + "pos": [8, 1, 0], + "is": {"id": "minecraft:sculk_sensor", "sculk_sensor_phase": "inactive", "power": 0} + } + ] + } + ], + "breakpoints": [] +} +