Skip to content

API reference Obsidian.API.World.Structures

CustomPoolElement class

A pool element type a plugin adds in code, like a NeoForge mod's pool element type: template pools name it in an element's element_type. Register it with RegisterWorldgenType<CustomPoolElement, T>.

public abstract class CustomPoolElement

In Obsidian.API.

Remarks

Obsidian reads the element's projection (rigid by default) itself; its other keys set the type's properties, read like a feature type's. Elements are shared between threads, so keep them stateless.

Constructors

protected CustomPoolElement();

Properties

Size

public virtual Vector Size { get; }

The element's size from its origin, before it's turned: the blocks it may place, which jigsaw assembly keeps apart from other pieces. At least one block each way.

Methods

GetJigsaws()

public virtual IReadOnlyList<PoolJigsaw> GetJigsaws();

The jigsaws that connect the element to other pieces, at positions from its origin before it's turned. By default, like vanilla's feature elements, one facing down at the origin named minecraft:bottom, so the element hangs off any jigsaw targeting that name.

Remarks

Jigsaws only connect pieces; they aren't placed.

Place(CustomPieceContext)

public abstract bool Place(CustomPieceContext context);

Places the part of the element in CustomPieceContext.Box, with its origin at CustomPieceContext.Origin turned by CustomPieceContext.Rotation.

Returns

Whether the element could be placed; jigsaw assembly ignores it, as vanilla does.

On this page