gdpc.model

Provides the Model class, which can store a model of Minecraft blocks.


class Model

A 3D model of Minecraft blocks.

Can be used to store a structure in memory, allowing it to be built under different transformations.

__init__(size: Vec3iLike, blocks: list[Block | None] | None = None)

Constructs a Model of size size, optionally filled with blocks.

property size : ivec3

This Model’s size

property blocks : list[Block | None]

This Model’s block list

getBlock(position: Vec3iLike) Block | None

Returns the block at vec

setBlock(position: Vec3iLike, block: Block | None) None

Sets the block at vec to block

build(editor: Editor, transformLike: TransformLike | None = None, substitutions: dict[str | None, str] | None = None, replace: str | list[str] | None = None) None

Builds the model.

Use [substitutions] to build the model with certain blocks types replaced by others.