טלי ברגר

Fabric 1.21.11 mod. Depends only on Fabric API.

Do not depend on Carpet or HeroBot.

Add a custom item "Bot Spawn Egg" (with a simple egg texture), available in the Creative inventory (Spawn Eggs or Tools tab).

Right-clicking a block with it creates one server-side fake player (a real ServerPlayer with a dummy network connection, like Carpet's fake player) next to the clicked block.

Bot names are automatic and unique: Bot1, Bot2, Bot3, and so on.

The egg is consumed in survival mode but not in creative mode.

Sneaking and right-clicking an existing bot removes it, but only if the player who clicked is in creative mode.

In survival mode this does nothing.

Also add one command /pvpbot killall that removes all bots.

On spawn each bot gets: a netherite sword in the main hand, full netherite armor, 64 golden apples in the inventory, and 3 totems of undying (one in the offhand, two in the inventory).

When the offhand totem is used up, the bot immediately moves another totem from its inventory to its offhand.

Every server tick, each bot acts independently:

  1. Finds the nearest real player (never another bot) within 32 blocks.
  2. Looks at their eyes and runs toward them while sprinting and

jumping repeatedly (bunny hop), like a real player.

  1. When within 3 blocks, it jumps and attacks on the way down

to get a critical hit, only if the attack cooldown is full.

It stops sprinting just before the hit so the critical hit works.

  1. If its health is 8 or lower (4 hearts) and it has golden

apples, it stops attacking, switches to a golden apple, and eats it (about 1.6 seconds). It keeps eating one apple after another, with no waiting between them, until its health is 10 or higher (5 hearts). Then it goes back to fighting.

  1. If no real player is nearby, it stands still.

Bots must never attack each other.

Maximum 10 bots at the same time.

Kodari AI
KodariWed at 1:10 pm 4
PvpBotSpawner
A Fabric 1.21.11 mod adding a "Bot Spawn Egg" creative item that spawns server-side fake players (real ServerPlayers with dummy connections) with unique auto-names (Bot1, Bot2, etc.). Bots receive netherite gear, golden apples, and totems, auto-refilling offhand totems. Each tick, bots independently hunt nearest real players within 32 blocks, bunny-hop sprint toward them, perform critical jump attacks within 3 blocks, eat golden apples when below 4 hearts until 5 hearts, and stand still when no targets exist. Sneak-right-click removes bots in creative mode only. Includes /pvpbot killall command. Maximum 10 bots, never attack each other.

I couldn’t complete this reliably: the fake player needs a working server connection and lifecycle, and the available API findings don’t establish a safe implementation. No files were created.

Kodari can make mistakes. Review important code before using.
Files

No files in this session

Code