diff --git a/.gitignore b/.gitignore index 504afef..c2658d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ node_modules/ -package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..dedfc60 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,23 @@ +{ + "name": "flintbenchmark", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "flintbenchmark", + "version": "1.0.0", + "license": "MIT", + "devDependencies": { + "fracturedjsonjs": "^4.0.0" + } + }, + "node_modules/fracturedjsonjs": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/fracturedjsonjs/-/fracturedjsonjs-4.1.1.tgz", + "integrity": "sha512-zpxgrF586btwidqdDRggOviFnihJh2uqompWfV8EkSd0zPROgQKToY2QCPkG+2uzHvt1fmRkqZIWklAnsKuRsA==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/tests/connectible/fence.json b/tests/connectible/fence.json new file mode 100644 index 0000000..543e88c --- /dev/null +++ b/tests/connectible/fence.json @@ -0,0 +1,151 @@ +{ + "flintVersion": null, + "name": "fence_connection", + "description": "Tests fence connection behavior across different wood types (oak, birch, jungle, spruce, dark_oak, mangrove, cherry, acacia, pale_oak, warped, crimson, bamboo) and validates connections/disconnections with non-fence blocks.", + "tags": ["connectible", "fence", "wood-types", "block-state", "neighbor-update"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-3, -1, -2], [1, 1, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:birch_fence" } }, + { "pos": [-1, 0, 0], "block": {"id": "minecraft:oak_fence" } }, + { "pos": [-1, 0, 1], "block": {"id": "minecraft:jungle_fence"} }, + { "pos": [-1, 0, -1], "block": {"id": "minecraft:spruce_fence"} }, + { "pos": [-2, 0, 0], "block": {"id": "minecraft:oak_fence" } } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { + "pos": [-1, 0, 0], + "is": { + "id" : "minecraft:oak_fence", + "north" : "true" , + "waterlogged": "false" , + "south" : "true" , + "west" : "true" , + "east" : "true" + } + } + ] + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:dark_oak_fence"} }, + { "pos": [-1, 0, 1], "block": {"id": "minecraft:mangrove_fence"} }, + { "pos": [-2, 0, 0], "block": {"id": "minecraft:cherry_fence" } }, + { "pos": [-1, 0, -1], "block": {"id": "minecraft:acacia_fence" } } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [-1, 0, 0], + "is": { + "id" : "minecraft:oak_fence", + "north" : "true" , + "east" : "true" , + "waterlogged": "false" , + "west" : "true" , + "south" : "true" + } + } + ] + }, + { + "at": 2, + "do": "place_each", + "blocks": [ + { "pos": [-1, 0, -1], "block": {"id": "minecraft:pale_oak_fence"} }, + { "pos": [-2, 0, 0], "block": {"id": "minecraft:warped_fence" } }, + { "pos": [-1, 0, 1], "block": {"id": "minecraft:crimson_fence" } }, + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:bamboo_fence" } } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [-1, 0, 0], + "is": { + "id" : "minecraft:oak_fence", + "east" : "true" , + "north" : "true" , + "waterlogged": "false" , + "west" : "true" , + "south" : "true" + } + } + ] + }, + { + "at": 3, + "do": "place_each", + "blocks": [ + { "pos": [-1, 0, 1], "block": {"id": "minecraft:pumpkin" } }, + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:stone" } }, + { "pos": [-2, 0, 0], "block": {"id": "minecraft:melon" } }, + { "pos": [-1, 0, -1], "block": {"id": "minecraft:nether_brick_fence"} } + ] + }, + { + "at": 4, + "do": "assert", + "checks": [ + { + "pos": [-1, 0, 0], + "is": { + "id" : "minecraft:oak_fence", + "west" : "false" , + "east" : "true" , + "waterlogged": "false" , + "north" : "false" , + "south" : "false" + } + } + ] + }, + { + "at": 4, + "do": "place_each", + "blocks": [ + { "pos": [-2, 0, 0], "block": {"id": "minecraft:oak_leaves" } }, + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:barrier" } }, + { "pos": [-1, 0, 1], "block": {"id": "minecraft:shulker_box"} } + ] + }, + { + "at": 5, + "do": "assert", + "checks": [ + { + "pos": [-1, 0, 0], + "is": { + "id" : "minecraft:oak_fence", + "north" : "false" , + "waterlogged": "false" , + "west" : "false" , + "east" : "false" , + "south" : "false" + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/iron.json b/tests/connectible/iron.json new file mode 100644 index 0000000..2d0364d --- /dev/null +++ b/tests/connectible/iron.json @@ -0,0 +1,97 @@ +{ + "flintVersion": null, + "name": "connectible_iron", + "description": "Tests iron bars connection behavior with adjacent blocks (solid blocks, barriers, walls, pane-type blocks) and validates correct directional connection states.", + "tags": ["connectible", "bars", "iron-bars", "block-state", "neighbor-update"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -2], [2, 1, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [-1, 0, 0], "block": {"id": "minecraft:iron_bars" } }, + { "pos": [ 0, 0, -1], "block": {"id": "minecraft:bedrock" } }, + { "pos": [ 0, 0, 1], "block": {"id": "minecraft:barrier" , "waterlogged": "false"} }, + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:iron_bars" } }, + { "pos": [ 1, 0, 0], "block": {"id": "minecraft:melon" } } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:iron_bars", + "north" : "true" , + "east" : "false" , + "west" : "true" , + "waterlogged": "false" , + "south" : "false" + } + } + ] + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [-1, 0, 0], "block": {"id": "minecraft:oak_leaves"} }, + { "pos": [0, 0, -1], "block": {"id": "minecraft:shulker_box", "facing": "up"} }, + { "pos": [1, 0, 0] , "block": {"id": "minecraft:barrier", "waterlogged": "false"} }, + { "pos": [0, 0, 1] , "block": {"id": "minecraft:nether_brick_fence"} } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:iron_bars", + "south" : "false" , + "east" : "false" , + "north" : "false" , + "waterlogged": "false" , + "west" : "false" + } + } + ] + }, + { + "at": 2, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 1], "block": {"id": "minecraft:copper_bars" } }, + { "pos": [1, 0, 0], "block": {"id": "minecraft:cobblestone_wall"} }, + { "pos": [0, 0, 0], "block": {"id": "minecraft:iron_bars" } } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:iron_bars", + "waterlogged": "false" , + "east" : "true" , + "north" : "false" , + "south" : "true" , + "west" : "false" + } + } + ] + } + ], + "breakpoints": [] +} + diff --git a/tests/connectible/wall.json b/tests/connectible/wall.json new file mode 100644 index 0000000..f1ecf0a --- /dev/null +++ b/tests/connectible/wall.json @@ -0,0 +1,102 @@ +{ + "flintVersion": null, + "name": "connectible_wall", + "description": "Tests cobblestone wall connection behavior with adjacent blocks (solid blocks, fences, walls, barriers) and validates correct directional state updates.", + "tags": ["connectible", "wall", "block-state", "neighbor-update"], + "dependencies": [], + "setup": { + "cleanup": { + "region": [ [-2, -1, -2], [2, 1, 2] ] + } + }, + "timeline": [ + { + "at": 0, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:cobblestone_wall" } }, + { "pos": [ 1, 0, 0], "block": {"id": "minecraft:bedrock" } }, + { "pos": [ 0, 0, 1], "block": {"id": "minecraft:melon" } }, + { "pos": [-1, 0, 0], "block": {"id": "minecraft:pumpkin" } }, + { "pos": [ 0, 0, -1], "block": {"id": "minecraft:nether_brick_fence"} } + ] + }, + { + "at": 1, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:cobblestone_wall", + "south" : "none" , + "west" : "none" , + "up" : "true" , + "north" : "none" , + "waterlogged": "false" , + "east" : "low" + } + } + ] + }, + { + "at": 1, + "do": "place_each", + "blocks": [ + { "pos": [0, 0, 1] , "block": {"id": "minecraft:shulker_box", "facing": "up"} }, + { "pos": [0, 0, 0] , "block": {"id": "minecraft:cobblestone_wall"} }, + { "pos": [-1, 0, 0], "block": {"id": "minecraft:cobblestone_wall"} }, + { "pos": [1, 0, 0] , "block": {"id": "minecraft:barrier", "waterlogged": "false"} }, + { "pos": [0, 0, -1], "block": {"id": "minecraft:copper_bars"} } + ] + }, + { + "at": 2, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:cobblestone_wall", + "north" : "low" , + "east" : "none" , + "up" : "true" , + "waterlogged": "false" , + "west" : "low" , + "south" : "none" + } + } + ] + }, + { + "at": 2, + "do": "place_each", + "blocks": [ + { "pos": [ 0, 0, 0], "block": {"id": "minecraft:cobblestone_wall"} }, + { "pos": [ 1, 0, 0], "block": {"id": "minecraft:oak_fence" } }, + { "pos": [-1, 0, 0], "block": {"id": "minecraft:air" } }, + { "pos": [ 0, 0, -1], "block": {"id": "minecraft:air" } } + ] + }, + { + "at": 3, + "do": "assert", + "checks": [ + { + "pos": [0, 0, 0], + "is": { + "id" : "minecraft:cobblestone_wall", + "up" : "true" , + "south" : "none" , + "north" : "none" , + "east" : "none" , + "waterlogged": "false" , + "west" : "none" + } + } + ] + } + ], + "breakpoints": [] +} +