Appearance
helix / EntityNbtValue
Class: EntityNbtValue โ
Defined in: core/values/entity-nbt/value.ts:6
An entity's NBT, assembled from its schema at codegen against the target version.
Extends โ
Extended by โ
Constructors โ
Constructor โ
new EntityNbtValue(
schema,fields,entity?,withId?):EntityNbtValue
Defined in: core/values/entity-nbt/value.ts:8
Parameters โ
schema โ
Record<string, FieldSpec<never>>
fields โ
Record<string, unknown>
entity? โ
string
The entity this schema curates, when it names one - summon infers the type from it.
withId? โ
boolean = false
Whether to write the entity's own id key - see asPassenger.
Returns โ
EntityNbtValue
Overrides โ
Properties โ
entity? โ
readonlyoptionalentity?:string
Defined in: core/values/entity-nbt/value.ts:12
The entity this schema curates, when it names one - summon infers the type from it.
fields โ
readonlyfields:Record<string,unknown>
Defined in: core/values/entity-nbt/value.ts:10
lowered โ
protectedreadonlylowered:true=true
Defined in: core/values/value.ts:14
Tells lowered values apart from plain objects (e.g. NBT compounds).
Inherited from โ
schema โ
readonlyschema:Record<string,FieldSpec<never>>
Defined in: core/values/entity-nbt/value.ts:9
value โ
readonlyvalue:NbtInput
Defined in: core/values/nbt/snbt.ts:27
Inherited from โ
withId โ
readonlywithId:boolean=false
Defined in: core/values/entity-nbt/value.ts:14
Whether to write the entity's own id key - see asPassenger.
Methods โ
asPassenger() โ
asPassenger<
T>(this):T
Defined in: core/values/entity-nbt/value.ts:20
A copy that also writes its own id, for nested entities like Passengers.
Type Parameters โ
T โ
T extends EntityNbtValue
Parameters โ
this โ
T
Returns โ
T
keys() โ
keys():
string[] |undefined
Defined in: core/values/nbt/snbt.ts:32
The top-level keys of a compound, or undefined for raw SNBT or anything else.
Returns โ
string[] | undefined
Inherited from โ
tagged() โ
tagged<
T>(this, ...names):T
Defined in: core/values/entity-nbt/value.ts:25
A copy with extra Tags appended, so a caller can find what it summoned.
Type Parameters โ
T โ
T extends EntityNbtValue
Parameters โ
this โ
T
names โ
...string[]
Returns โ
T