GenContext

GenContext

class

Column being generated, handed to StaticStructure.generate

  • read-only Assigning to the field raises an error.

Fields

NameTypeDescription
pos read-only Vec2i Column position in sectors

Functions

GenContext:set_cell(bpos, block)

Write a block straight into a cell of the column being generated

bpos Vec3i Block position
block StaticBlock Block type, nil to clear the cell

GenContext:spawn_block(bpos, block, rotation)

Spawn a block with its logic into the column being generated

bpos Vec3i Block position
block StaticBlock Block type to spawn
rotation FQuat? Rotation, nil for identity

returns BlockLogic The spawned block logic

GenContext:clear_props(bpos)

Clear all props at the given position

bpos Vec3i Block position