__CreateEntity
Builtins · internal core builtin · accessible from
Bootstraponly
Creates a new entity.
When id is null, an id of the form <meta name>.<UUID> is generated. The new entity is reported to the validation cache.
Parameters
String? id— The id of the new entity, ornullto generate one.Entity(Base)? meta— The meta entity of the new entity.
Returns
Entity(Base) — The new entity.
Errors
A runtime error if id is in the Bootstrap package. A runtime type error if id is not a String, or meta is not an Entity.