From 715c2f9d33994b809696eeab3358553c30bf128f Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 2 Sep 2024 14:18:55 +0100 Subject: [PATCH] feat: add test for creating block data with default states --- src/endstone_test/tests/test_block.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/endstone_test/tests/test_block.py b/src/endstone_test/tests/test_block.py index cb87e9b..cf786b8 100644 --- a/src/endstone_test/tests/test_block.py +++ b/src/endstone_test/tests/test_block.py @@ -8,7 +8,15 @@ def server(plugin: Plugin) -> Server: return plugin.server -def test_create_block_data(server: Server) -> None: +def test_create_block_data_default_block_states(server: Server) -> None: + block_data = server.create_block_data("minecraft:standing_sign") + assert block_data.type == "minecraft:standing_sign" + assert "ground_sign_direction" in block_data.block_states + assert block_data.block_states["ground_sign_direction"] == 0 + assert "block_light_level" not in block_data.block_states + + +def test_create_block_data_custom_block_states(server: Server) -> None: block_data = server.create_block_data("minecraft:standing_sign", {"ground_sign_direction": 8}) assert block_data.type == "minecraft:standing_sign" assert "ground_sign_direction" in block_data.block_states