Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

helix / ResourceId

Class: ResourceId<R> โ€‹

Defined in: core/values/resource.ts:13

A resource id typed by its registry, so a Biome can't be passed where an Enchantment is expected.

Named types like Biome are generated into resource.generated.ts from the command tree. It is still an IdValue, so Dimension.THE_END works wherever an Id does.

Biome("plains") -> "minecraft:plains" Enchantment("#ns:foo") -> "#ns:foo" (tag form preserved)

Extends โ€‹

Extended by โ€‹

Type Parameters โ€‹

R โ€‹

R extends string = string

Constructors โ€‹

Constructor โ€‹

new ResourceId<R>(id, registry): ResourceId<R>

Defined in: core/values/resource.ts:14

Parameters โ€‹

id โ€‹

string

registry โ€‹

R

The registry this id resolves against, e.g. "minecraft:enchantment".

Returns โ€‹

ResourceId<R>

Overrides โ€‹

IdValue.constructor

Properties โ€‹

registry โ€‹

readonly registry: R

Defined in: core/values/resource.ts:17

The registry this id resolves against, e.g. "minecraft:enchantment".

Methods โ€‹

render() โ€‹

render(): string

Defined in: core/values/id.ts:14

Returns โ€‹

string

Inherited from โ€‹

IdValue.render

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.