Skip to content

Commit

Permalink
feat: add test for creating block data with specific block states
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Sep 2, 2024
1 parent 4e931a0 commit 43df9b8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/endstone_test/tests/test_block.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import pytest
from endstone import Server, __minecraft_version__
from endstone.plugin import Plugin


@pytest.fixture
def server(plugin: Plugin) -> Server:
return plugin.server


def test_create_block_data(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
assert block_data.block_states["ground_sign_direction"] == 8
assert "block_light_level" not in block_data.block_states

0 comments on commit 43df9b8

Please sign in to comment.