Effective Entity With Spawn Egg
An EffectiveEntity that also gets a matching spawn-egg item.
The framework auto-creates a SummoningEggItem (namespaced <id>_spawn_egg) which spawns this entity where used. Override getSpawnEggMaterial, getSpawnPlacement or editSpawnEggMeta to customize the egg; hand it out with getSpawnEggItem.
Properties
Functions
Manually adds entity to the tracking cache (spawns do this automatically).
Registers an interact handler for entities of this custom type (matched by key). To instead handle a plain vanilla EntityType, register through EffectiveEntityInteractable.addInteractHandler with a non-custom entity.
Resolves the persistent-data key for the declared additional arg name — use it to read the per-entity value via EffectiveDataContainerUtils. See getAdditionalArgs for the full flow.
Builds (but does not add to the world) an entity of this type at location — null falls back to the first world's origin. Use spawnEntity to actually place it.
createEntity variant that also applies additionalArgs to the new entity.
Makes entities of this type turn to look at nearby targets.
Configures a freshly created entity (attributes, name, equipment, …). Called on every create.
Customizes the spawn egg's meta (name, lore, model).
Declares extra, per-instance parameters this entity type accepts — values baked into an individual entity's persistent data at creation, so two entities of the same type can carry different settings.
Namespaced keys backing this type's getAdditionalArgs (key → PDC type), or null if none.
Currently tracked live entities of this type.
Convenience alias of getEntities for this type.
Tracked entities of this type standing on the given block position.
The base EntityType to spawn.
Owning plugin and a plugin-unique id; together they form the getNamespacedKey.
Unique identity as "<plugin-name>/<id>", both lowercased.
A single spawn-egg stack for this entity.
A spawn-egg stack of amount for this entity.
Material used for the spawn egg (default: pig spawn egg).
How the entity is placed when the egg is used (default: vanilla placement).
Removes entity from the tracking cache (matched by UUID).
Creates and spawns an entity of this type at location, adding it to the tracking cache.
spawnEntity variant that also applies additionalArgs.