aicompanion-0.2.2.jar
Curse Maven Snippet
What's new
0.2.2 — Plays by the same rules you do
Bundles PlayerEngine 1.0.46. Self-contained jar as always — don't install a standalone engine alongside it.
Nothing to do after updating. The new settings are added to config/aicompanion.json automatically and
all default to sensible values.
Mobs can see it now
- Hostile mobs hunt the companion the way they hunt you. They never did before. The companion is a
LivingEntityrather than a real player, and every vanilla mob looks for targets through a hard-coded player filter — so zombies, skeletons, spiders and creepers walked straight past it. The only way it ever got attacked was retaliation after it swung first. Covers the goal-based hostiles plus piglins and hoglins; piglins honour the gold-armour truce, so kit it out and it can walk the Nether. Endermen still only aggro on real players staring at them. - This also switched on the whole defence system, which had never run once in a real world: all of
it was gated on "is a mob targeting the companion", which was permanently false. Rather than ship
that untested, it is behind four settings — fighting back and shield use are on, running away is
off. The companion stands its ground and keeps working instead of abandoning a farm to sprint over
the horizon. Turn
behavior.defenseFleeFromHostileson when you want to see the other behaviour.
Gear wears out
- Fixed: swords and axes never lost durability. Mining wore tools down correctly, but melee did not — the attack path was hand-written and never called the hook that damages a weapon on hit. A companion's sword was effectively unbreakable.
- Fixed: armour never wore out either, for the same class of reason. It absorbed damage forever.
- Fixed: it swung far too fast. Attack cadence was a flat 5 ticks regardless of weapon, at full damage every time — roughly 4 swings a second where you get 1.6 with the same diamond sword. It now uses the real attack-speed attribute and scales damage by cooldown like a player does.
- Melee reach tightened from 4 blocks to the vanilla 3.
- Known gap: shields still don't wear out. Fishing rods, shears, hoes and flint & steel always did.
Buildings get built instead of appearing
build_structurenow builds with its hands. It walks to the site, picks somewhere to stand that the plan doesn't need to fill and that it can get back out of, and places a couple of blocks a tick within arm's reach — swinging, making placement noise, and moving along as each spot is used up. Previously up to 256 blocks a tick with no reach check and no walking, which meant a small house materialised in a single tick at coordinates the model named from anywhere on the map.- Courses go bottom-up and outside-in, so it never stands where a block has to go and a flat roof partly scaffolds itself. Doorways and windows are carved first — that's what stops it sealing itself inside a house cut into a hillside.
- If it genuinely can't reach the rest (the middle of a wide roof), it says so and finishes those from where it stands rather than stalling. If it gets shut in anyway, it digs out — and isn't charged twice for the blocks it has to replace.
- A partly-finished build now says it's partly finished and can be resumed by repeating the same description; it places only what's missing. Interrupting a build mid-way keeps the plan instead of throwing it away.
- Duplicate positions in a generated plan are collapsed, which also stops the material bill charging twice for one block.
- Fixed a bug this exposed: retrying a build re-measured the ground against the part already standing, read its own roof as ground level, and could refuse a job that was half done.
behavior.buildPhysicalPlacement: falserestores the old instant behaviour exactly, if you want it.
Farming and harvesting replant again
- Fixed: harvested tiles were left bare, and the companion insisted it was out of seeds while carrying hundreds of them. Ask it to tend a field and it would strip the wheat, plant nothing, and answer "I need to get more wheat seeds" with 418 of them in its pockets. Telling it otherwise didn't help — it genuinely could not see them.
- The cause was that the farm only ever looked at the companion's hotbar, nine of its thirty-six slots. Seeds anywhere else were invisible, and since planting needs the stack in hand, a full backpack of seeds could never be used. Anything the companion picked up while working — which is most of what it carries — landed out of view.
- It now searches the whole inventory and moves a stack into its hand when it finds one, the way you would. Bone meal had exactly the same blind spot and is fixed with it, so it will fertilise from the backpack too.
0.2.1 — Skills that can finish a sentence, and building underground
Bundles PlayerEngine 1.0.44. Self-contained jar as always — don't install a standalone engine alongside it.
⚠️ Two things to do after updating
1. Run this command:
/companion skills reset farming
The Farming skill changed in this version, and a copy already on disk is never overwritten
automatically — that protects skills you have edited yourself. Without this it keeps tending the wrong
field (see below). The command backs the old one up to farming.md.bak. Fresh installs need nothing.
2. Open config/aicompanion.json and set:
"llm": { "maxTokens": 1000 }
The old default of 200 was too small for the skills to work — see below. New installs get 1000
automatically; an existing config keeps whatever it has, so this one is manual. The companion now
tells you in red, on every message, while the value is too low.
The farming skill could never run
- Fixed: skills no longer get cut off mid-reply. A skill hands the companion a command to reproduce word for word, and the farming one is about 700 characters. At the old default token limit the reply was truncated part-way through that command every single time, so no command ever ran — the companion simply stood there having said it was starting. Four attempts, nothing built, and the only clue was a JSON parse error in the log.
- A cut-off reply now says so. It was previously reported — to you and to the companion — as "not valid JSON", which is wrong and unfixable: the reply was fine, it just stopped early. The companion would re-send the same too-long command and be cut off again. It's now named properly in chat and in the log, and the companion is asked to be brief instead.
- The default token limit is now 1000, up from 200. This costs nothing: the limit is a ceiling,
not a budget — you're billed for what's actually generated, and a short reply is short either way.
Use
llm.maxRequestsandbehavior.maxAutonomousTurnsto control spend.
Farming stops talking over you
- A tended field no longer repeats itself every few seconds. Waiting for crops to regrow used to print "standing by for regrowth" and "pass complete: harvested=0, sown=0" on a loop — about 120 lines in half an hour, all saying the same nothing, and loud enough to bury messages that mattered. It now says why it's standing still once, then stays quiet until something actually changes. A different reason, like running out of seeds, still comes through straight away, and progress reports during an active pass are unchanged.
It tends the field it just built
- Fixed: after building a field it would tend whichever one happened to be nearest. Between
finishing the build and starting to farm there's a pause while it thinks, and it walks back to you
during that pause — so "now tending the crops" could mean a field 37 blocks from the one it had just
made. This went unnoticed whenever an older field was nearby; build somewhere new and it would find
nothing to do while reporting success.
farmnow takes the field's coordinates, and the skill passes the ones it built at. - Tending several fields at once still works exactly as before — the range applies around that point, so everything close to it gets worked in the same pass.
A full inventory no longer brings it to a halt
- It makes room for itself instead of getting stuck. With a full inventory it could not pick anything up, and the gather that needed one more log just retried — in one session, 3,814 times over 27 minutes, without placing a single block of the farm it was building. The one piece of code that frees a slot could only run if it was already touching the item it was trying to collect, which a full inventory is exactly what prevents. It now runs whenever there's no room.
- It tells you. That whole 27 minutes produced nothing in chat at all — you had to notice and ask. The companion now says "I can't pick anything up — my inventory is full", and tells its own reasoning the same thing, so it goes and deposits something rather than repeating the same request.
- "It's unreachable" no longer means "I'm full". Those are different problems and needed different answers; only one of them was ever reported.
- It stops hoovering junk once full. Walking around, it picks up every stray cobblestone and leaf. Once there's no free slot it will now only take things that stack onto what it's already carrying, so it stops spending its last slots on debris. Below that, collecting is unchanged.
Building in caves
- It can place blocks underground. Ask for a crafting table in a cave and you got "I can't build that here — the plan came out 28 blocks underground" every single time, however you phrased it. It was measuring the ground from the sky, so anything with a roof over it — a cave, a mineshaft, a ravine, the inside of your base — read as buried under the whole hillside and was refused. It now measures the floor it is actually standing on. Building above ground is unchanged.
- It stops arguing with itself about where the ground is. The refusal used to quote a ground level that contradicted the reason it gave, so it would "correct" itself one block lower and fail again — six times in a row in one session before the owner told it to stop.
groundLevelis now the block it is standing on, as the prompt always claimed. Underground it was reporting the surface far overhead, so every height it reasoned about down there was wrong — and standing on a rooftop over water it reported the water, seven blocks down, so a field built "at ground level" would have gone in the lake. It now asks the game which block is holding it up, which is also right when it's stood on the very edge of something.
Also fixed
- You get told when it's too far away to hear you. Past 64 blocks your messages were silently
dropped — indistinguishable from a dead companion or a broken model. It now says
(<name> is 154 blocks away and can't hear you — /companion come), at most once every 30 seconds.
This mod has no additional files

