Fighters
On this page(4)
A fighter is a fake player or a fake mob that walks to your zone mobs and hits them for a
while. The shipped warband summons three clones of you, bulwark two iron golems and
infestation a swarm of silverfish.
There are two ways to make one:
- the
npcaction: fake players (a skin, equipment, a poof when they leave); - the
entityaction with anattack:block: any mob (see Entities).
Both take the same attack: block.
npc
- type: npc
count: 3
at: random-mobs
skin: player
equipment: copy-player
lifetime: 160
attack: { per-second: 2, damage: '{damage} * 2', target: nearest, move: walk, speed: 0.3, radius: 12 }| Key | Default | What it does |
|---|---|---|
count | 1 | 1 to 16 fake players |
at | around-player | around-player (1.5 to 2.5 blocks from your feet), around-target (around the mob that procced) or random-mobs (next to different alive mobs of yours; when there are fewer mobs than count, the rest around the mob of the proc) |
skin | player | player (your own skin), { player: Notch } (that account's skin) or { texture: ..., signature: ... } |
equipment | none | copy-player or a map of slots (Equipment) |
lifetime | 160 | Ticks, 1 to 600. They leave with a poof |
attack | none | Without it they stand still |
animation | none | rotation and scale tracks only (Animation); no color, never a rotation with attack |
model | none | A model instead of the player look (Models) |
About skins:
{ player: <name> }is looked up once and kept until the module turns off. The first fighters may wear the default skin while it arrives. A name without a skin is one warning.- A named skin needs an online-mode server, or an online-mode proxy.
{ texture, signature }: a texture without its signature is the default skin, with a warning.- On an offline server without a proxy,
skin: playeris the default skin.
An npc without attack faces you when it appears. A fighter faces its first mob: the mob of the
proc while it lives, else you.
attack
attack:
damage: '{damage} * 3' # required
per-second: 1
target: nearest
move: walk
speed: 0.3
radius: 12| Key | Default | What it does |
|---|---|---|
damage | required | Each hit, read once when it appears. 0 or less, or not a number = it does not fight |
per-second | 1 | Hits per second, 0.1 to 10 |
target | nearest | Which mob it picks (below) |
move | walk | walk = straight to its mob at speed (no pathfinding); teleport = it appears next to each new mob |
speed | 0.3 | Blocks per tick, 0.05 to 2 |
radius | 12 | How far it looks for a mob, 1 to 64 blocks |
target | It picks |
|---|---|
nearest | The nearest alive mob within radius |
target | The mob that procced while it lives, then the nearest |
random | A random mob within radius |
farthest, lowest-health, highest-health, lowest-health-percent, highest-health-percent | The orders of the mobs selector, within radius |
How a fighter fights
- It hits within 1.8 blocks and swings its arm. An iron golem, ravager, hoglin, zoglin or warden plays its attack swing instead.
- It looks for another mob only when its mob dies. With no mob in sight, or with the zones module off, it stands.
- Its hits are enchant hits: they count on the damage hologram and the boss bar, and a kill pays the rewards. They never make an enchant proc.
- Fighters are silent: add a
soundaction for that. - They count in
enchants.max-entitiesandenchants.max-entities-per-tick. Fake players also count inenchants.max-npcs(6 shipped).
Examples
# Two iron golems that walk to your mobs for 15 seconds.
- type: loop
times: 2
actions:
- type: entity
entity: IRON_GOLEM
at: '{player_pos}'
offset: '{random:-2:2}, 0, {random:-2:2}'
lifetime: 300
attack: { per-second: 1, damage: '{damage} * 5', target: nearest, move: walk, speed: 0.2 }
# A zombie in red leather with your sword.
- type: entity
entity: ZOMBIE
at: '{player_pos}'
lifetime: 100
attack: { per-second: 1, damage: '{damage}' }
equipment:
helmet: { material: LEATHER_HELMET, color: '#FF0000' }
main-hand: sword
# One assassin that teleports to the weakest mob each time.
- type: npc
skin: { player: Notch }
lifetime: 120
attack: { per-second: 3, damage: '{damage} * 1.5', target: lowest-health-percent, move: teleport }attack.damage is read once, when the fighter appears. A fighter summoned at a weak swing keeps
that damage for its whole life.