-
Notifications
You must be signed in to change notification settings - Fork 1
Spawner modifiers
Spawner modifiers are special items that players can apply to a spawner to change how it behaves.
Examples include reducing the health of spawned mobs, applying potion effects, or adjusting the value of a spawner upgrade. Each modifier is configured in the modifiers.yml file.
Modifiers can be applied to a spawner in the upgrade GUI by clicking on the modifier in the bottom inventory. Modifiers can be removed by clicking on the modifier item in the upgrade GUI.
A modifier stays active on the spawner until it runs out of usages (if a usage limit is set), or until the player removes it.
Every modifier is defined under the Modifiers section and is identified by a
unique key.
The file contains one example modifier – generic. To add a new modifier, copy the entire
generic block and paste it below, then change generic to your chosen key and adjust the values.
Modifiers:
generic: # the modifier key
display: ...
item: ...
requirements: ...
effect: ...
new_modifier: # your new modifier
display: ...
...display: "<red-#ffbf00>Health reduction"A name shown to players when they apply or remove the modifier.
Defines the modifier item that will be given to players.
item:
material: PAPER
name: "<#red-#ffbf00>Health reduction modifier <#bfffff>(-%value%%)"
lore:
- ""
- "<#8fbfbf><!italic>Reduces mob health by %value% percent"
- " <#8fbfbf><!italic>upon spawning."
model: 0
glint: true-
material- item material type. -
name- display name, supports placeholders (see Parameters and placeholders). -
lore- item description, supports placeholders. -
model- custom model data value, set to0to disable. -
glint- whether the item has enchantment glint
Requirements control which spawners a modifier can be applied to.
requirements:
spawner-level: 0
spawner-types:
list: []
invert: false-
spawner-level- minimum spawner level required before this modifier can be applied; a spawner's level equals the total number of upgrade levels across all of its upgrades (e.g. a spawner with no upgrades is level0; one level-up in each of the 6 upgrade types makes it level6). You can use *%required_level%placeholder in the item name or lore to display this number. -
spawner-types:-
list- list of spawner types this modifier can be applied to (e.g.[ZOMBIE, SKELETON]). Leave empty ([]) to allow all types. -
invert- whenfalse(default),listis a whitelist; whentrue,listbecomes a blacklist.
-
The effect section defines what the modifier does. The required fields vary by effect type — see Effect types below.
effect:
type: EVALUATE_HEALTH
evaluate-type: SUBTRACT_PERCENTModifies the maximum health of every mob that spawns from the spawner.
effect:
type: EVALUATE_HEALTH
evaluate-type: <evaluate type> # see evaluate typesParameters required when giving the modifier item:
-
value- amount to apply (must be greater than0). -
usage- how many times this modifier activates before it stops working; use#infinitefor unlimited activations. -
chance- chance (1–100) that the modifier activates each time a mob spawns; use100for it to always activate.
Modifies the attack damage of every mob that spawns from the spawner.
effect:
type: EVALUATE_DAMAGE
evaluate-type: <evaluate type> # see evaluate typesParameters required when giving the modifier item:
-
value- amount to apply (must be greater than0). -
usage- how many times this modifier activates before it stops working; use#infinitefor unlimited activations. -
chance- chance (1–100) that the modifier activates each time a mob spawns; use100for it to always activate.
Modifies the scale of every mob that spawns from the spawner.
effect:
type: EVALUATE_SCALE
evaluate-type: <evaluate type> # see evaluate typesParameters required when giving the modifier item:
-
value- amount to apply (must be greater than0). -
usage- how many times this modifier activates before it stops working; use#infinitefor unlimited activations. -
chance- chance (1–100) that the modifier activates each time a mob spawns; use100for it to always activate.
Modifies the value of one of the spawner's upgrades — for example, increasing the spawn range or decreasing the spawn delay. This modifier does not use usage or chance.
effect:
type: EVALUATE_UPGRADE
evaluate-type: <evaluate type> # see evaluate types
upgrade-type: <upgrade type> # see upgrade typesParameters required when giving the modifier item:
-
value- amount to apply to the upgrade value (must be greater than0).
Applies a potion effect to every mob that spawns from the spawner.
effect:
type: GIVE_POTION
potion-type: <potion type> # e.g. poison, slowness, strengthParameters required when giving the modifier item:
-
duration- how long the potion effect lasts, in ticks (20 ticks = 1 second); use#infinitefor an infinite duration; must be greater than0. -
amplifier- strength level of the effect (e.g.1= level I,2= level II); must be greater than0. -
usage- how many times this modifier activates before stopping. use#infinitefor unlimited; must be greater than0. -
chance- activation chance per spawn (1–100).
The evaluate-type field controls how the value is applied to the base stat.
| Type | Description |
|---|---|
ADD |
Adds value directly to the base value. |
SUBTRACT |
Subtracts value from the base value. |
MULTIPLY |
Multiplies the base value by value. |
DEVIDE |
Divides the base value by value. |
ADD_PERCENT |
Adds value% of the base value to the base value. |
SUBTRACT_PERCENT |
Subtracts value% of the base value from the base value. |
Example: If a mob's base health is 20 and evaluate-type is SUBTRACT_PERCENT with value set to 50, the mob spawns with 10 health.
Used only by the EVALUATE_UPGRADE effect to choose which upgrade stat is affected.
| Type | Description |
|---|---|
RANGE |
The range within which a player must be for the spawner to activate. |
DELAY |
The delay between spawner spawn cycles. |
AMOUNT |
The number of entities spawned per cycle. |
NEARBY |
The maximum number of nearby entities before spawning is suppressed. |
XP |
The percentage increase in XP dropped. |
DROPS |
The percentage increase in item drops. |
When a modifier item is given to a player via a command, the command includes parameter values
(e.g. the health reduction amount or number of usages). These values can be displayed in the item's
name and lore using placeholders.
| Placeholder | Description | Used by |
|---|---|---|
%value% |
The main modifier value (e.g. percentage or flat amount). | All evaluate effects |
%usage% |
The number of activations remaining. Displays ∞ when set to infinite. | All effects with usage |
%chance% |
The activation chance percentage. | All effects with chance |
%duration% |
The potion effect duration in seconds. Displays ∞ when infinite. | GIVE_POTION |
%amplifier% |
The potion effect level. | GIVE_POTION |
%required_level% |
The minimum spawner level required to apply this modifier. | All modifiers |
Note! That some placeholders will display regular numbers, but for some you might want to display Roman numerals and it can be done by adding :r after the placeholder (e.g. %amplifier:r%).
Below is a complete modifiers.yml with two modifiers: one that reduces mob health and one that
applies a poison effect.
Modifiers:
health_reduction:
display: "<red>Health reduction"
effect:
type: EVALUATE_HEALTH
evaluate-type: SUBTRACT_PERCENT
requirements:
spawner-level: 0
spawner-types:
list: []
invert: false
item:
material: PAPER
name: "<red>Health reduction <gray>(-%value%%)"
lore:
- ""
- "<gray>Reduces mob health by %value%%"
- "<gray>Usages: %usage%"
- "<gray>Chance: %chance%%"
model: 0
glint: true
poison_spawner:
display: "<green>Poison spawner"
effect:
type: GIVE_POTION
potion-type: poison
requirements:
spawner-level: 3
spawner-types:
list: [ZOMBIE, SKELETON, CREEPER]
invert: false
item:
material: FERMENTED_SPIDER_EYE
name: "<green>Poison modifier <gray>(Poison %amplifier:r%)"
lore:
- ""
- "<gray>Applies Poison %amplifier:r% for %duration%s"
- "<gray>to each spawned mob."
- "<gray>Usages: %usage%"
- "<gray>Chance: %chance%%"
- ""
- "<yellow>Requires spawner level %required_level%"
- "<yellow>Only applies to Zombies, Skeletons and Creepers"
model: 0
glint: true