The Entity Lookup System
What is the Entity Lookup System?
Much like how the item lookup system allows for specifying many options for ItemStacks in a simple, user-friendly string, the entity lookup system is designed to do the same for entities.
Keys Explained
In each string is the key for an entity. A key looks one of two ways:
- A vanilla minecraft entity: (eg
husk
) - An entity from another plugin: (eg
ecomobs:tarantula
)
You may also have noticed the ? in some of the keys. This means 'try to use the first entity, but if it doesn't exist, use the second entity' You can chain these together, but they're actually only useful for me to provide integrations in default configs without breaking things for people who don't use all my plugins together.
You can also use || . This means 'spawn the first entity, or the second entity'. These can also be chained together: in tests, this means any of the entities can pass, and in specifying the types of entities, this means that a random entity out of the options will be spawned on each call.
Modifiers
Entities can have modifiers applied to them in the key. For example, lets say you're configuring a mob in EcoMobs. You want it to be a massive slime, a baby zombie, or a charged creeper, but you're not sure how to do that, because it looks like you have to just specify an entity type. Actually, in all of my plugins, wherever it asks for an entity, it's actually doing a lookup. You can specify any of the following modifiers to it:
adult
Force the entity to be an adultattack-damage
Set the entities attack damageattack-speed
Set the entities attack speedbaby
Force the entity to be a babycharged
Set a creeper to be chargedexplosion-radius
Set a creepers explosion radiusfly-speed
Set the entities fly speedfollow-range
Set the entities follow rangehealth
Set the entities healthjump-strength
Set a horses jump strengthknockback
Set the entities attack knockbackknockback-resistance
Set the entities knockback resistancename
Set the entities display name, use quotes (") for multi-word namesno-ai
Set the entity to have no AIsize
Set the size of a slime or phantomspawn-reinforcements
Set a zombie to spawn reinforcementsspeed
Set the movement speed of the entitysilent
Set the entity to make no soundhead
Set the helmet itemchest
Set the chestplatelegs
Set the leggingsfeet
Set the bootshand
Set the held itemoff_hand
Set the held item in the offhandmodel-engine
Set the Model Engine ID and animation (for ID domodel-engine:id
, for ID and animation domodel-engine:id,animation
)
You simply chain the modifiers together, for example:
phantom size:5 follow-range:25 speed:2 health:200 name:"&4Deadly Phantom" model-engine:dragon,flap