Skip to content

API reference Obsidian.API.World.Features

BlockSet class

A set of blocks written as block ids and block tags (#minecraft:logs), like vanilla's HolderSet<Block>.

public sealed class BlockSet

In Obsidian.API.

Remarks

Feature data writes these as a single string or a list; the source generator emits new BlockSet(...), and plugins' feature types can have properties of this type too. Tags are resolved the first time the set is used.

Constructors

public BlockSet(params string[] entries);

Properties

public IReadOnlyList<string> Entries { get; }

Methods

Contains(IBlock)

public bool Contains(IBlock block);

Whether the block's type (any state) is in the set.

ContainsRegistryId(int)

public bool ContainsRegistryId(int registryId);

Whether the block with the registry id (any of its states) is in the set.

On this page