Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ Releases are numbered **2.x.yy**: `x` is the major version and `yy` a two-digit
[Versioning](README.md#versioning)). Every version needs a section here before it can be merged; CI
publishes the section as the GitHub release notes.

## [2.0.07] - 2026-10-09

### Added
- The survival campaign picks its build plot. Starting on rough ground no longer means building
into a hill or a tree and pausing at the first blocked placement: the campaign looks up to 16
blocks around the start, once, for the nearest clear, level plot that fits every building of the
chosen tier, and keeps the old spot two blocks east of the start whenever that already fits. When
nothing fits it pauses straight away and says so; `.grind resume` builds at the old spot anyway.
The search reads each column once from loaded chunks and took at most 10 ms in the game tests,
where a test arena with a pillar on every third column is refused until a clean patch is opened.

## [2.0.06] - 2026-10-09

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ AI contributors: read [handover.md](handover.md) for current progress, architect

1. Install Fabric Loader for Minecraft 26.2.
2. Put Fabric API and `agalarhack-*.jar` in `.minecraft/mods/`.
3. Launch the Fabric profile. The HUD should report **Agalar Hack 2.0.06**.
3. Launch the Fabric profile. The HUD should report **Agalar Hack 2.0.07**.

## Versioning

Expand Down
2 changes: 1 addition & 1 deletion docs/ADDONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ This client is not on a Maven repository, so depend on the jar you have:

```gradle
dependencies {
modImplementation files("libs/agalarhack-2.0.06.jar")
modImplementation files("libs/agalarhack-2.0.07.jar")
}
```

Expand Down
24 changes: 16 additions & 8 deletions docs/AUTOGRIND.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# AutoGrind

`.grind survival` starts the full survival campaign. Choose a flat, empty plot in the Overworld before starting;
its southwest floor corner is two blocks east of the starting position. `.grind status` reports the
current milestone or actionable pause, `.grind stop` cancels it, and `.grind resume` continues the
same task after a pause. A new campaign in the same loaded world reuses its base location and checks
live inventory again. Disconnecting or loading an unrelated world clears the base.
`.grind survival` starts the full survival campaign in the Overworld. Its buildings go on the
nearest clear, level plot: on open level ground that is the spot two blocks east of the start, as
before; otherwise the campaign searches up to 16 blocks around it once, in loaded chunks, for a plot
that fits every building the chosen tier will put up (the iron house, the diamond annex and walkway,
the max portal and enchanting area). A plot fits when nothing but grass-like blocks stands in the
build volume, the ground is solid rather than water, at most two blocks low anywhere, and level under
at least 80% of the floor. When nothing fits, the campaign pauses at once and says so: move to
open, level ground and start again, or `.grind resume` to build at the default corner anyway.
`.grind status` reports the current milestone or actionable pause, `.grind stop` cancels it, and
`.grind resume` continues the same task after a pause. A new campaign in the same loaded world
reuses its base location and checks live inventory again; a base chosen for a lower tier is not
re-checked for a higher one. Disconnecting or loading an unrelated world clears the base.

| Command | Result |
| --- | --- |
Expand Down Expand Up @@ -102,7 +109,8 @@ Unit tests cover all campaign item prerequisite chains, gear tiers, crafting lay
ordering, building/portal geometry, storage reserves, station slot arithmetic and owned Baritone
process cancellation. Real-client scenarios cover ordinary resource breaking and pickup, crafting,
station placement, cooking, diamond/iron equipment recipes, Netherite smithing, survival startup and
stop, exact building placements, chest transfers, storage withdrawal and automatic equipment.
stop, exact building placements, build plot choice on rough ground, chest transfers, storage
withdrawal and automatic equipment.

The regular client suite verifies Baritone absence; bridge unit tests also use API-shaped stubs.
`tools/test-baritone.sh` runs a separate installed-Baritone 1.19.0 / Minecraft 26.2 fixture with a
Expand All @@ -115,6 +123,6 @@ test-only cleanup does not fix or establish clean shutdown for a normal installe
suite also exercises pressure storage, full-chest stack merging and near-broken tool replacement. A complete randomly generated survival world from empty
inventory through the Nether and all enchants is not a deterministic integration-test fixture.
Baritone availability, terrain access, animal/resource availability and server interaction rules
can require manual intervention. Build footprints need clear supports; existing blocks are not
removed. Full chests, unrelated station contents, and server-rejected placements remain resumable
can require manual intervention. Existing blocks are never removed: rough ground with no level plot
in reach pauses the campaign at its start rather than later at a blocked placement. Full chests, unrelated station contents, and server-rejected placements remain resumable
pauses or specific failures. Eight-item smelting batches can exceed the requested minimum.
13 changes: 10 additions & 3 deletions docs/MAJOR_GELISTIRME_PLANI.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,14 @@ kalır ve özel pathfinder yazılmaz.
külçe, taşınan cevheri eritmeye tercih ediliyor. Adı değiştirilmiş, büyülü ve kırılmak üzere olan
eşyalar alınmıyor, iki boş yuva korunuyor, ulaşılamayan sandık kampanyayı duraklatmıyor.
Kampanya deposu ve içerik kaydı `GrindStorage`'da.
3. **İnşaat alanı seçimi.** Oyuncunun durduğu yerde düz alan yoksa tarayıcı bütçesiyle yakında
uygun bir alan aransın. Bulunamazsa net bir duraklatma mesajı verilsin.
3. ✅ **İnşaat alanı seçimi (2.0.07).** Kampanya yeni bir dünyada başlarken, kademenin bütün
binalarının (ev, depo eki, portal, büyü alanı) taban alanına uyan en yakın temiz ve düz alanı
16 blok içinde, yalnızca yüklü chunk'larda bir kez arıyor. Her sütunun üst bloğu bir kez okunuyor
ve sonuç tekrar kullanılıyor; arama süresi günlüğe yazılıyor (game testlerinde en fazla 10 ms).
Düz zeminde konum eskisiyle aynı.
Alan yoksa kampanya baştan, net bir mesajla duraklıyor; `.grind resume` varsayılan köşeyi kabul
ediyor. Not: "tarayıcı bütçesi" yerine tek seferlik, sınırlı bir okuma seçildi (en fazla birkaç
bin sütun), çünkü kampanyanın görev listesi tabanın konumu belli olmadan kurulamıyor.
4. **Avlanmada keşif.** Yüklü hayvan yoksa Baritone ile sınırlı bir keşif yapılsın. Baritone yoksa
bugünkü duraklatma kalır.
5. **İlk şablon.** Bastion bulma ve yağmalama güvenilir biçimde test edilemiyor. Bu madde ancak
Expand Down Expand Up @@ -187,7 +193,8 @@ E (kanıt) her adımda paralel
| 2.0.04 | ✅ D1 ilk adım: AutoGrind görev sınıfları ayrıldı (davranış değişmeden) |
| 2.0.05 | ✅ D1 devamı (seyahat, istasyon, erişim yardımcıları) ve C2 overlay kare süreleri |
| 2.0.06 | ✅ D1 son adım (envanter yardımcıları) ve D2 depodan geri alma |
| 2.0.07+ | D3–D4 AutoGrind 2 adımları, ESP kutu maliyeti, C3 (ölçüm sonucuna göre) |
| 2.0.07 | ✅ D3 inşaat alanı seçimi |
| 2.0.08+ | D4 avlanmada keşif, ESP kutu maliyeti, C3 (ölçüm sonucuna göre) |
| 2.1.00 | B: Addon API 2 ve sürüm sözleşmesi, A4 güncelleme denetleyicisi |

## Riskler
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ fabric_api_version=0.157.0+26.2
# Version scheme 2.x.yy: x is the major line, yy a two-digit minor update (00-99). Raise yy for each
# release; raise x (and reset yy to 00) for a major one. The Minecraft version above is separate.
# The build rejects anything else.
mod_version=2.0.06
mod_version=2.0.07
maven_group=me.mrhakan
archives_base_name=agalarhack
7 changes: 7 additions & 0 deletions handover.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@
recomputes `GrindWithdrawal.plan` (pure, top-down: carried, then stored, then ingredients) from
live contents after opening, skips unreachable chests, and has its own 2,400-tick budget because
its goal ticks it directly. `EnchantTask`'s XP coal sets `useStorage = false`.
- 2.0.07 (D3): `startSurvival` in a new world (or after a no-plot pause that was not resumed) calls
`GrindPlot.choose` (pure) over `SurvivalBlueprint.footprint(tier)` with a cached `LoadedTerrain`
that reads each column's top non-replaceable block in feet-10..feet+8 once. The default corner is
tried first. No plot: the base is the default corner, `provisionalBase` is set, and the runner is
paused with a "No clear, level spot" reason; `resume()` clears the flag, a restart searches again.
Structure offsets (`PORTAL_X`, `ENCHANTING_X/Z`) and the enchanting layout now live in
`SurvivalBlueprint` so the footprint and the tasks cannot drift apart.
- 2.0.05: `OverlayTimings` is the frame-based counterpart of `ModuleTimings` (a `ModuleTimings` with
a 120-frame window and 180-frame expiry). `WorldOverlays.collect` opens a frame each time it runs,
which also closes the previous one; an overlay's labels and deferred lines add into one slot, so
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ public final class SurvivalTasksGameTest implements FabricClientGameTest {
g.stop();
// Restarting in the same loaded world must retain completed base storage.
g.startSurvival(SurvivalProgression.Tier.MAX);
// Should no plot fit the MAX buildings around this arena, the campaign starts paused;
// resuming accepts the default corner, which is all this scenario needs.
g.resume();
g.useBaritone(false);
});
for (int i = 0; i < 300; i++) {
Expand Down Expand Up @@ -159,7 +162,8 @@ public final class SurvivalTasksGameTest implements FabricClientGameTest {
})) throw new AssertionError("Level-30 enchanting did not return enchanted gear and consume three levels");
context.runOnClient(c -> g.stop());
storedSuppliesAreTakenBack(context, world, g, base, chest);
org.slf4j.LoggerFactory.getLogger("agalarhack-gametest").info("Survival placement, storage, equipment, template duplication, enchanting and storage withdrawal passed");
buildPlotSearch(context, world, g, base.offset(0, 0, 96));
org.slf4j.LoggerFactory.getLogger("agalarhack-gametest").info("Survival placement, storage, equipment, template duplication, enchanting, storage withdrawal and build plot search passed");
}
}
/**
Expand Down Expand Up @@ -211,6 +215,55 @@ private static void storedSuppliesAreTakenBack(ClientGameTestContext context, Te
context.runOnClient(c -> g.stop());
}

/**
* D3: on rough ground the campaign finds a level plot nearby instead of building where it
* stands, and says so plainly when there is none. The arena is level stone with a two-high
* pillar on every third column, so no house footprint fits anywhere in reach, until a clean
* patch is opened a few blocks east.
*/
private static void buildPlotSearch(ClientGameTestContext context, TestSingleplayerContext world, GrindExecutor g, BlockPos start) {
int reach = GrindPlot.SEARCH_RADIUS + 12;
world.getServer().runOnServer(server -> {
ServerPlayer p = world.getConnection().getServerPlayer();
var level = p.level();
for (int x = -reach; x <= reach; x++) for (int z = -reach; z <= reach; z++) {
level.setBlockAndUpdate(start.offset(x, -1, z), Blocks.STONE.defaultBlockState());
boolean pillar = Math.floorMod(x, 3) == 1 && Math.floorMod(z, 3) == 1;
for (int y = 0; y <= GrindPlot.SCAN_TOP + 1; y++)
level.setBlockAndUpdate(start.offset(x, y, z), pillar && y <= 1 ? Blocks.COBBLESTONE.defaultBlockState() : Blocks.AIR.defaultBlockState());
}
p.teleportTo(start.getX() + 0.5, start.getY(), start.getZ() + 0.5);
});
world.getConnection().waitForChunksRender();
context.waitTicks(40);
context.runOnClient(c -> {
g.reset();
if (g.startSurvival(SurvivalProgression.Tier.IRON) != GrindExecutor.StartResult.STARTED)
throw new AssertionError("The campaign did not start on rough ground");
if (g.state() != TaskRunner.State.NEEDS_MOVEMENT || g.blockedReason() == null || !g.blockedReason().startsWith("No clear, level spot"))
throw new AssertionError("Rough ground with no plot should pause with a clear reason; state=" + g.state() + " reason=" + g.blockedReason());
g.stop();
});
// A clean patch east of the start: x 8..16, z -3..5 from the player.
world.getServer().runOnServer(server -> {
var level = world.getConnection().getServerPlayer().level();
for (int x = 8; x <= 16; x++) for (int z = -3; z <= 5; z++) for (int y = 0; y <= 1; y++)
level.setBlockAndUpdate(start.offset(x, y, z), Blocks.AIR.defaultBlockState());
});
context.waitTicks(20);
int[] corner = context.computeOnClient(c -> {
if (g.startSurvival(SurvivalProgression.Tier.IRON) != GrindExecutor.StartResult.STARTED || g.state() != TaskRunner.State.RUNNING)
throw new AssertionError("The campaign did not start on the open patch; state=" + g.state() + " reason=" + g.blockedReason());
String[] parts = g.baseCoordinates().split(" ");
g.stop();
return new int[]{Integer.parseInt(parts[0]) - start.getX(), Integer.parseInt(parts[1]) - start.getY(), Integer.parseInt(parts[2]) - start.getZ()};
});
// The iron house is five by five with a path cell north of it, so its corner must sit at x 8..12, z -2..1.
if (corner[0] < 8 || corner[0] > 12 || corner[2] < -2 || corner[2] > 1 || corner[1] != 0)
throw new AssertionError("The chosen plot " + corner[0] + " " + corner[1] + " " + corner[2] + " is not on the open patch");
context.runOnClient(c -> g.reset());
}

/** Named iron ingots, unnamed iron ingots and sticks in the chest, read on the server. */
private static int[] chestContents(TestSingleplayerContext world, BlockPos chest) {
return world.getServer().computeOnServer(server -> {
Expand Down
Loading
Loading