chunk

class amulet.api.chunk.Chunk(cx, cz)[source]

Bases: object

Class to represent a chunk that exists in an Minecraft world

block_entities

Property that returns the chunk’s block entity list. Setting this property replaces the chunk’s block entity list :rtype: List[BlockEntity] :return: A list of all the block entities contained in the chunk

changed
Return type:bool
Returns:True if the chunk has been changed, False otherwise
changed_time

The last time the chunk was changed Used to track if the chunk was changed since the last save snapshot and if the chunk model needs rebuilding

Return type:float
cx

The chunk’s x coordinate

cz

The chunk’s z coordinate

entities

Property that returns the chunk’s entity list. Setting this property replaces the chunk’s entity list :rtype: List[Entity] :return: A list of all the entities contained in the chunk

class amulet.api.chunk.SubChunk(sub_selection_slice, parent)[source]

Bases: object

Class to represent a sub-selection of a chunk

blocks
Return type:ndarray
Returns:A 3d array of blocks in the sub-selection
parent_coordinates
Return type:Tuple[int, int]
Returns:The chunk x and z coordinates for the parent chunk