Combat
How a bot picks targets, how it hits, and which techniques it uses.
A human opponent
PvpBot is built for training and recording, not for winning at all costs. No move is frame-perfect:
skill (0–100, default 50) sets the speed of the reactions, the timing and the aim of every
technique.
- Mace smashes and elytra hits land a little early or late; crit hops are sometimes mistimed.
- The axe against a shield comes after the shield is seen; the shield against a smash goes up a reaction late.
- Weapon-swap combos fumble now and then. Practised moves, like the mace stun or the pearl launch, come off most of the time.
- Arrows and pearls are a little off and react late to a juke.
Even at 100 there is a gap to play around. Reach is a player's (melee-range: 3.0, measured like vanilla,
from the eyes to the hitbox), aim turns at a limited speed (turn-speed) and ping-millis
simulates a real connection's latency.
On top of that come miss-chance (swings missed on purpose) and mistake-chance (hesitating
or panicking at the decisive moment).
Picking a target
auto-target: the bot looks for the nearest enemy withinmax-target-distanceby itself.target-playersandtarget-passive-mobsdecide whether players and passive mobs count.revenge: it hits back at whoever hits it.bot-vs-bot: bots attack each other without orders.- Factions decide who is an enemy, an ally or at peace.
priority-hp-target: at equal priority it prefers the target with the least health.
Detection
With detection on, a bot only knows about a target if:
- it can see it;
- it is very close (
detection-touch-radius); - or it was told about it by an order.
After losing sight it remembers the target for detection-memory-ticks. Crouching, being invisible or
wearing no armour shortens the distance you're noticed at.
It doesn't attack at once
A new bot leaves players alone for spawn-grace seconds. When it notices a player by itself, it sizes
them up for reaction-ticks before attacking. A hit, an order or a faction war is answered at once.
Melee
Swords, axes and spears. The bot keeps a fighting distance (melee-standoff) instead of walking into you,
and swings every attack-cooldown ticks.
The techniques, each switchable on its own:
| Setting | Technique |
|---|---|
crits, crit-chain | Crits from a real jump, back to back if wanted. |
cooldown-trick | Swings at 84.8% cooldown: full damage and knockback, but sooner. |
hit-select | Waits for a favourable angle and spacing. |
d-tap | Sideways sprint reset after a hit. |
mirror-punish | Hits back mid-air off your own knockback. |
sweep-hit | Sweep attack when 2 or more enemies are on it. |
shield-disable | Switches to an axe against a raised shield (shield-disable-chance of the time). |
shield-read-windup | Raises the shield when it reads your crit windup. |
Mace
With mace on, the bot uses the mace with tactics, not at every chance:
- Launch and smash: it launches with a wind charge or a jump only when the smash can land: close enough, shield down, target not running, and a few seconds between launches.
- Pearl launch (
mace-pearl-launch): throws a pearl and pops a wind charge on it mid-flight, going far higher. - Not always the mace:
special-weapon-melee-chanceof the time it fights with an ordinary weapon. - Wind Burst: a smash with a Wind Burst mace throws it back up for the next one
(
jump-resetchains smashes). - Defence: against an incoming smash it raises a shield (
mace-defence-shield), gets out of the way (mace-defence-flee) or takes it.mace-totem-chanceof the time it keeps a totem in the offhand instead of a shield.
Elytra mace
With elytra-mace (needs elytra, rockets and a mace) the bot:
- climbs on rockets above the fight, to
elytra-mace-heightblocks; - dives at where you're heading;
- smashes without landing: it drops the glide for the swing and picks it up again straight after, as a player does;
- climbs back up for another pass.
A last-moment sidestep gets out of the way.
With no rockets it uses whatever height it has: if Wind Burst, a wind charge, a pearl or a drop takes it up high, it opens the elytra, glides over you and dives.
Cart PvP
With cart-pvp (needs a Flame bow, arrows, rails and TNT minecarts) the bot:
- draws the bow and looses;
- puts a rail and a TNT minecart in the arrow's path;
- the arrow sets the cart off at your feet.
Before doing it, it works out the damage with vanilla's own explosion formula (distance, blocks in the way, armour, Protection, difficulty). It only goes ahead if:
- the trade favours it;
- its average damage taken is under
cart-max-self-damage; - not even the worst roll can kill it (unless it holds a totem);
- no ally is in the blast.
Weapon swapping
attribute-swap is the master switch for three techniques:
breach-swap: hits with a sword carrying the mace's Breach/Density enchantments;mace-stun: an axe to break the shield, then the mace straight after;spear-lunge: chained spear jabs to close distance (needs Lunge).
The rate limit is swap-cooldown.
Bows and crossbows
- Holds
ranged-optimal-rangeand switches to melee underranged-min-range. - With
arrow-predictionit leads moving targets. - Fires in volleys (
ranged-volley-size), then stops forranged-rest-ticksand closes in. - Against mace users: if it saw you holding a mace in the last few seconds, it loads a Slow Falling arrow first.
Survival
- Totems (
auto-totem): into the hand undertotem-health, after a short pause (totem-delay-ticks). - Food, shield, potions: eats without waste, blocks when hurt, drinks healing potions and eats golden
apples. It won't use an enchanted apple while it has a plain one. Buff potions (
buff-potions) only when there's actually a fight. - Retreat (
retreat): backs off when low. - Pearls (
pearls): to escape when nearly dead or to chase someone running away. - Cobwebs (
cobwebs):cobweb-global-cooldownstops a squad from chain-webbing you. - Water: an MLG bucket on long falls (
water-clutch), scoops up the water you place (drain), and when webbed tries to escape with water, sometimes fumbling. - Repair (
auto-repair): mends gear with Mending by collecting XP. - Enemy stashes (
break-stashes): breaks the shulker box or ender chest you place mid-fight.
Other
- Orbital Strike Cannon (
orbital): if the bot has the datapack's rods, it uses them without blowing itself up. It won't fire at anyone inside the blast radius, runs after firing, and holds fire if an ally is in the area. - Stasis (
stasis, off by default): blocks a killing hit and pulls the bot away like a pearl, healing it to half health. It's used per faction (/pvpbot faction set bosses stasis true) for characters that must not die.