Skip to content

Blocks

Banner

Python
Banner(entity_id: str, data: entities.Banner)

Bases: BaseEntity[str]

Represents a banner block entity.

base_color_id property

Python
base_color_id: int

The base color of the banner.

RETURNS DESCRIPTION
int

Base color ID (0-15) corresponding to dye colors.

patterns property

Python
patterns: List[entities.BannerPattern]

List of patterns applied to the banner.

RETURNS DESCRIPTION
List[entities.BannerPattern]

Collection of banner patterns with their configurations.

custom_name property

Python
custom_name: Optional[str]

Custom name for the banner.

RETURNS DESCRIPTION
Optional[str]

Custom display name if set, None otherwise.

has_patterns property

Python
has_patterns: bool

Check if banner has any patterns applied.

RETURNS DESCRIPTION
bool

True if banner has one or more patterns, False otherwise.

base_color_name property

Python
base_color_name: str

Get the color name for the base color.

RETURNS DESCRIPTION
str

Human-readable color name corresponding to the base color ID.


Beacon

Python
Beacon(entity_id: str, data: entities.Beacon)

Bases: BaseEntity[str]

Represents a beacon block entity.

primary_effect_id property

Python
primary_effect_id: int

Primary effect ID provided by the beacon.

RETURNS DESCRIPTION
int

Numeric identifier for the primary status effect.

secondary_effect_id property

Python
secondary_effect_id: int

Secondary effect ID provided by the beacon.

RETURNS DESCRIPTION
int

Numeric identifier for the secondary status effect.

pyramid_levels property

Python
pyramid_levels: int

Pyramid levels beneath the beacon.

RETURNS DESCRIPTION
int

Number of pyramid levels (1-4) supporting the beacon.

lock_string property

Python
lock_string: Optional[str]

Lock string for the beacon.

RETURNS DESCRIPTION
Optional[str]

Lock string if beacon is locked, None otherwise.

custom_name property

Python
custom_name: Optional[str]

Custom name for the beacon.

RETURNS DESCRIPTION
Optional[str]

Custom display name if set, None otherwise.

is_fully_powered property

Python
is_fully_powered: bool

Check if beacon has maximum power.

RETURNS DESCRIPTION
bool

True if beacon has 4 pyramid levels (maximum), False otherwise.

has_lock property

Python
has_lock: bool

Check if beacon is locked.

RETURNS DESCRIPTION
bool

True if beacon has a lock string set, False otherwise.

primary_effect_name property

Python
primary_effect_name: str

Get the name of the primary effect.

RETURNS DESCRIPTION
str

Human-readable name of the primary effect.

secondary_effect_name property

Python
secondary_effect_name: str

Get the name of the secondary effect.

RETURNS DESCRIPTION
str

Human-readable name of the secondary effect.


Sign

Python
Sign(entity_id: str, data: entities.Sign)

Bases: BaseEntity[str]

Represents a sign block entity.

text_1 property

Python
text_1: Message

First line of text on the sign.

RETURNS DESCRIPTION
Message

Formatted message object containing the first line text.

text_2 property

Python
text_2: Message

Second line of text on the sign.

RETURNS DESCRIPTION
Message

Formatted message object containing the second line text.

text_3 property

Python
text_3: Message

Third line of text on the sign.

RETURNS DESCRIPTION
Message

Formatted message object containing the third line text.

text_4 property

Python
text_4: Message

Fourth line of text on the sign.

RETURNS DESCRIPTION
Message

Formatted message object containing the fourth line text.

all_text_lines property

Python
all_text_lines: List[Message]

Get all text lines as a list.

RETURNS DESCRIPTION
List[Message]

List containing all four text lines as Message objects.

is_empty property

Python
is_empty: bool

Check if all text lines are empty.

RETURNS DESCRIPTION
bool

True if all text lines contain only whitespace or are empty, False otherwise.


MobSpawner

Python
MobSpawner(entity_id: str, data: entities.MobSpawner)

Bases: BaseEntity[str]

Represents a mob spawner block entity.

delay property

Python
delay: int

Current delay until next spawn attempt.

RETURNS DESCRIPTION
int

Time in ticks until the next spawn attempt.

min_spawn_delay property

Python
min_spawn_delay: int

Minimum delay between spawns.

RETURNS DESCRIPTION
int

Minimum time in ticks between spawn attempts.

max_spawn_delay property

Python
max_spawn_delay: int

Maximum delay between spawns.

RETURNS DESCRIPTION
int

Maximum time in ticks between spawn attempts.

spawn_count property

Python
spawn_count: int

Number of entities to spawn per attempt.

RETURNS DESCRIPTION
int

Count of entities spawned in each spawn attempt.

max_nearby_entities property

Python
max_nearby_entities: int

Maximum entities that can exist nearby.

RETURNS DESCRIPTION
int

Maximum number of entities allowed in the spawning area.

required_player_range property

Python
required_player_range: int

Player must be within this range for spawning.

RETURNS DESCRIPTION
int

Maximum distance in blocks a player can be for spawning to occur.

spawn_range property

Python
spawn_range: int

Range in which entities can spawn.

RETURNS DESCRIPTION
int

Radius in blocks around the spawner where entities can appear.

spawn_data property

Python
spawn_data: Optional[entities.MobSpawnerEntityData]

Data for the entity to spawn.

RETURNS DESCRIPTION
Optional[entities.MobSpawnerEntityData]

Entity configuration data if set, None otherwise.

spawn_potentials property

Python
spawn_potentials: Optional[
    List[entities.MobSpawnerSpawnPotentialEntry]
]

List of potential entities to spawn with weights.

RETURNS DESCRIPTION
Optional[List[entities.MobSpawnerSpawnPotentialEntry]]

List of spawn potential entries with weights, None if not configured.

custom_spawn_rules property

Python
custom_spawn_rules: Optional[Dict[str, Any]]

Custom rules for spawning behavior.

RETURNS DESCRIPTION
Optional[Dict[str, Any]]

Dictionary of custom spawn rules if set, None otherwise.

has_spawn_data property

Python
has_spawn_data: bool

Check if spawner has spawn data configured.

RETURNS DESCRIPTION
bool

True if spawn data is configured, False otherwise.

has_spawn_potentials property

Python
has_spawn_potentials: bool

Check if spawner has multiple spawn potentials.

RETURNS DESCRIPTION
bool

True if spawn potentials list exists and is not empty, False otherwise.


Skull

Python
Skull(entity_id: str, data: entities.Skull)

Bases: BaseEntity[str]

Represents a skull block entity.

rotation property

Python
rotation: int

Rotation of the skull.

RETURNS DESCRIPTION
int

Rotation value from 0-15 representing 16 possible orientations.

skull_type property

Python
skull_type: int

Type of skull.

RETURNS DESCRIPTION
int

Skull type ID: 0=skeleton, 1=wither skeleton, 2=zombie, 3=player, 4=creeper, 5=dragon.

owner property

Python
owner: Optional[entities.SkullOwner]

Owner information for player heads.

RETURNS DESCRIPTION
Optional[entities.SkullOwner]

Owner data for player heads, None for non-player skulls.

has_owner property

Python
has_owner: bool

Check if skull has an owner.

RETURNS DESCRIPTION
bool

True if skull has owner information (player head), False otherwise.

skull_type_name property

Python
skull_type_name: str

Get the name of the skull type.

RETURNS DESCRIPTION
str

Human-readable name of the skull type.

is_player_head property

Python
is_player_head: bool

Check if this is a player head.

RETURNS DESCRIPTION
bool

True if skull type is 3 (player), False otherwise.


StructureBlock

Python
StructureBlock(
    entity_id: str, data: entities.StructureBlock
)

Bases: BaseEntity[str]

Represents a structure block entity.

metadata property

Python
metadata: str

Additional metadata for the structure entities.

RETURNS DESCRIPTION
str

Metadata string associated with the structure entities.

mirror property

Python
mirror: Literal['NONE', 'LEFT_RIGHT', 'FRONT_BACK']

Mirror setting for structure placement.

RETURNS DESCRIPTION
Literal['NONE', 'LEFT_RIGHT', 'FRONT_BACK']

Mirror configuration for structure operations.

ignore_entities property

Python
ignore_entities: int

Whether to ignore entities when saving/loading.

RETURNS DESCRIPTION
int

Flag indicating if entities should be ignored (1) or included (0).

is_powered property

Python
is_powered: bool

Whether the structure block is powered.

RETURNS DESCRIPTION
bool

True if structure block is receiving redstone power, False otherwise.

seed property

Python
seed: int

Random seed for structure generation.

RETURNS DESCRIPTION
int

Seed value used for randomization in structure operations.

author property

Python
author: str

Author of the structure.

RETURNS DESCRIPTION
str

Name of the player who created or last modified the structure.

rotation property

Python
rotation: Literal[
    "NONE",
    "CLOCKWISE_90",
    "CLOCKWISE_180",
    "COUNTERCLOCKWISE_90",
]

Rotation setting for structure placement.

RETURNS DESCRIPTION
Literal['NONE', 'CLOCKWISE_90', 'CLOCKWISE_180', 'COUNTERCLOCKWISE_90']

Rotation configuration for structure operations.

mode property

Python
mode: Literal['SAVE', 'LOAD', 'CORNER', 'DATA']

Current mode of the structure entities.

RETURNS DESCRIPTION
Literal['SAVE', 'LOAD', 'CORNER', 'DATA']

Operating mode of the structure entities.

position property

Python
position: Vector3D[int]

Position offset for the structure.

RETURNS DESCRIPTION
Vector3D[int]

3D coordinate offset relative to the structure entities.

integrity property

Python
integrity: float

Structural integrity percentage.

RETURNS DESCRIPTION
float

Integrity value from 0.0 to 1.0 representing structure completeness.

show_air_blocks property

Python
show_air_blocks: bool

Whether to show air blocks in the structure.

RETURNS DESCRIPTION
bool

True if air blocks should be visible, False otherwise.

name property

Python
name: str

Name of the structure.

RETURNS DESCRIPTION
str

Structure identifier name.

size property

Python
size: Vector3D[int]

Size of the structure in blocks.

RETURNS DESCRIPTION
Vector3D[int]

3D dimensions of the structure (width, height, depth).

show_bounding_box property

Python
show_bounding_box: bool

Whether to show the bounding box.

RETURNS DESCRIPTION
bool

True if bounding box visualization is enabled, False otherwise.

is_save_mode property

Python
is_save_mode: bool

Check if structure block is in save-mode.

RETURNS DESCRIPTION
bool

True if mode is 'SAVE', False otherwise.

is_load_mode property

Python
is_load_mode: bool

Check if structure block is in load mode.

RETURNS DESCRIPTION
bool

True if mode is 'LOAD', False otherwise.

volume property

Python
volume: int

Calculate the volume of the structure.

RETURNS DESCRIPTION
int

Total volume in blocks (width × height × depth).


EndGateway

Python
EndGateway(entity_id: str, data: entities.EndGateway)

Bases: BaseEntity[str]

Represents an end gateway block entity.

age property

Python
age: int

Age of the end gateway.

RETURNS DESCRIPTION
int

Time in ticks since the gateway was created.

exit_portal property

Python
exit_portal: Optional[Vector3D[float]]

Coordinates of the exit portal.

RETURNS DESCRIPTION
Optional[Vector3D[float]]

3D coordinates of the destination portal, None if not set.

has_exit_portal property

Python
has_exit_portal: bool

Check if end gateway has an exit portal set.

RETURNS DESCRIPTION
bool

True if exit portal coordinates are configured, False otherwise.


ShulkerBox

Python
ShulkerBox(entity_id: str, data: Dict[str, Any])

Bases: BaseEntity[str]

Represents a shulker box block entity.

raw_data property

Python
raw_data: Optional[Dict[str, Any]]

Raw data for the shulker box.

RETURNS DESCRIPTION
Optional[Dict[str, Any]]

Dictionary containing shulker box data, None if no data available.

has_data property

Python
has_data: bool

Check if shulker box has any data.

RETURNS DESCRIPTION
bool

True if raw data is available, False otherwise.


Bed

Python
Bed(entity_id: str, data: entities.Bed)

Bases: BaseEntity[str]

Represents a bed block entity.

color property

Python
color: str

Color of the bed.

RETURNS DESCRIPTION
str

Human-readable color name of the bed.


FlowerPot

Python
FlowerPot(entity_id: str, data: entities.FlowerPot)

Bases: BaseEntity[str]

Represents a flower pot block entity.

item property

Python
item: str

Item contained in the flower pot.

RETURNS DESCRIPTION
str

Minecraft item identifier of the contained plant or flower.

item_data property

Python
item_data: int

Metadata/damage value for the item.

RETURNS DESCRIPTION
int

Numerical data value associated with the contained item.

is_empty property

Python
is_empty: bool

Check if flower pot is empty.

RETURNS DESCRIPTION
bool

True if pot contains only air (empty), False if it contains an item.