Singular entities
pig: entity = @e[type=minecraft:pig]
Braces are not required around a selector. A singular entity uses limit-one selection and replaces the previous variable tag whenever it is assigned.
DATACRAFT V2
Entity values connect typed variables to Minecraft selectors without repeatedly storing large selectors in commands.
pig: entity = @e[type=minecraft:pig]
Braces are not required around a selector. A singular entity uses limit-one selection and replaces the previous variable tag whenever it is assigned.
The runtime registers the currently executing entity, gives it a generated namespace tag, and stores its UUID in an entity object. This lets an entity survive storage in lists and function calls.
pigs: set[entity] = @e[type=minecraft:pig]
An entity set is a generated tag shared by every member. Union, intersection, insertion, removal, membership, and iteration operate directly on tags.
When an entity value is interpolated into a raw command, DataCraft emits an appropriate tag selector. Runtime helpers centralize common register, resolve, retag, and cleanup operations.