Repository navigation
Metadata
Metadata can be configured in metadata.yml file.
Spawner metadata is configured under two sections:
-
Item-spawners.values: metadata that can be applied to items only -
Entity-spawners.values: metadata that can be applied to living entities
Item-spawners.default-value selects which item metadata is used when no item metadata is specified.
Item-spawners:
default-value: <item metadata key>This must match an existing key under Item-spawners.values.
If the configured value is invalid, the plugin falls back to its internal default metadata.
Item-spawners:
default-value: <item metadata key>
values:
<item metadata key>:
display:
name: '<#ffff00>Custom Spawner'
inside: <global item key>
list:
<global item key>:
weight: 1
amount: 1<item metadata key> is the item metadata name used by the plugin.
display:
name: '<#ffff00>Custom Spawner' # optional
inside: <global item key/spawner type> # optional-
name- spawner display name (supports %type% to include the formatted spawner type). -
inside- the item or entity that is shows rotating in the spawner.
This can be used for both item and entity metadata.
list:
<global item key>:
weight: 1
amount: 1Defines the drop pool for the item spawner.
Each key inside list must match an existing key from Global-items.
The list cannot be empty.
-
weight- weighted chance of this item being selected relative to the other entries in the same list. -
amount- how many of that item are dropped when this entry is selected; also supports ranged values (1-3).
Item metadata uses entries from Global-items.
Global-items:
<global item key>:
material: DIAMOND
name: "<#00ffff>Custom Item" # optional
lore: # optional
- "<#808080>Line 1"
- "<#808080>Line 2"
enchantments: # optional
sharpness: 5
unbreaking: 3
model: 0 # optionalDefines one reusable item entry.
-
material- item material type. -
name- display name. -
lore- item description. -
enchantments- enchantment and level pairs. -
model- custom model data value.
Entity-spawners:
values:
<entity metadata key>:
display:
name: "<#ff0000>Custom %type%" # optional
inside: ZOMBIE # optional
applicable:
list: # optional
- ZOMBIE
- HUSK
exclude: false # optional
traits:
- trait: silent
value: trueDefines one entity metadata entry.
-
display- same as item display configuration -
applicable:-
list- list of spawner types the metadata can be applied to. -
exclude- whentruethe list becomes a blacklist.
-
-
traits- a list of trait entries; each entry must have atrait: <trait ID>
traits:
- trait: silent
value: true
chance: 25 # optional
limit: 2 # optional
- trait: named
...Defines trait operations that are applied to spawned entities.
Must be a list of trait entries.
-
chance- chance for the trait to attempt applying to each entity -
limit:-
0or unset - unlimited. - positive
n- applies the trait until it reachesn(limit: 5) - negative
n- applies the trait until there arenentities left (limit: -3)
-
Built-in values:
attributebabyinvulnerablenamedsilenttransform
then: # optional
trigger: success # optional
traits:
- trait: silent
value: trueDefines chained traits that run after the parent trait.
If this list is empty or invalid, the chain is ignored.
The child traits only run on entities selected by the trigger.
Trigger values:
-
always: every processed entity -
success: only entities where the parent trait succeeded -
fail: only entities where the parent trait failed -
index:<n>: only the entity at that exact index -
after:<n>: only entities after that index -
before:<n>: only entities before that index -
every:<n>: every second entity by index rule used by the plugin
<n> starts at 0
traits:
- trait: attribute
attribute: scale
value: '*0.5'Changes one attribute on the spawned entity.
-
attribute- attribute to modify, see attributes. -
value- shift operation applied to the current attribute value.
All shift values:
-
n: setsnas the base value -
+n: addsnto the base value -
-n: subtractsnfrom the base value -
*n: multiplies the base value byn -
/n: divides the base value byn
If invalid, the trait fails to load.
Notes:
- This only succeeds on entities that support the selected attribute.
- When changing health, the plugin also updates the entity’s current health to match the new base value, with a minimum of
0.01.
traits:
- trait: baby
value: true # optional - default: trueMakes an entity baby or adult.
-
value- settruefor a baby,falsefor adult.
Notes:
- This only succeeds on ageable entities.
- On unsupported entities, the trait runs but does not succeed.
traits:
- trait: effect
potion: speed
duration: 200 # optional - default: 100
amplifier: 2 # optional - default: 1
ambient: false # optional - default: false
particles: true # optional - default: trueApplies a potion effect to the spawned entity.
-
potion- potion effect type, see potion effect types. -
duration- effect duration in ticks. -
amplifier- strength level of the effect (e.g.1= level I,2= level II); must be greater than0. -
ambient- should the effect be ambient (more and slightly translucent). -
particles- should the effect produce particles.
traits:
- trait: invulnerable
value: true # optional - default: trueSets whether the entity is invulnerable.
-
value- settrueto be invulnerable,falseto be vulnerable.
traits:
- trait: named
name: "<#ff0000>Elite %type%"
visible: true # optional - default: trueSets the entity custom name.
-
name- name the entity will have; supports %type% to include the formatted spawner type. -
visible- settrueto show always,falseto show only when looking at.
traits:
- trait: silent
value: true # optional - default: trueSets whether the entity is silent.
-
value- settrueto be silent,falseto make noise.
traits:
- trait: transform
to: WITHER_SKELETONReplaces the spawned entity with a new entity of another spawner type.
-
to- to what entity the spawned entity will be replaced with, see spawner types.
traits:
- trait: transform
to: WITHER_SKELETON
chance: 25
limit: 2
then:
trigger: success
traits:
- trait: attribute
attribute: scale
value: '*0.5'
- trait: silent
value: trueExplanation: When an entity spawns it has a 25% chance to be transformed into a Wither Skeleton and scaled half its size and set silent.