Skip to content

API reference Obsidian.API

Tag record

A tag: a named group of a registry's entries, like the blocks a pickaxe mines (minecraft:mineable/pickaxe).

public sealed record Tag : IEquatable<Tag>

In Obsidian.API.

Remarks

Plugins add to vanilla's tags and make their own with tag files in their data/ folder, like a data pack's, or programmatically; vanilla's tags then hold the plugins' entries too.

Constructors

public Tag();

Properties

public int Count { get; }

Entries

public required ImmutableArray<int> Entries { get; init; }

The ids of the tag's entries in its registry.

Identifier

public string Identifier { get; }

The tag's identifier, like minecraft:mineable/pickaxe.

Name

public required string Name { get; init; }

The tag's name, the last part of its path, like pickaxe.

Namespace

public string Namespace { get; init; }

The tag's namespace: minecraft for vanilla's tags.

Path

public string Path { get; }

The tag's path in its registry, like mineable/pickaxe.

Registry

public string Registry { get; }

The registry the tag groups entries of, like block or worldgen/biome.

public bool Replace { get; init; }

Type

public required string Type { get; init; }

The tag's registry followed by the folders of its path, like block/mineable.

On this page