Grindstone on the menu engine; LAN guests use grindstones

GrindstoneMenu now runs on horizon_client::menu (Kind::Grindstone): its
input filter, computeResult, the result's onTake (both inputs cleared,
the experience sum handed to the caller) and quickMoveStack, verified
against the vanilla class by test_menu_click_parity with enchanted,
damaged and cursed tools and books.

Single player routes the grindstone's clicks, drags and double clicks
through the engine and rolls the orbs and level event 1042 (now playing
block.grindstone.use) where the result is taken. The LAN host opens
minecraft:grindstone for guests on the same engine and awards the orbs at
the block; guests read enchantments, stored enchantments, repair cost and
custom names from the server's stacks, and the host now sends repair
cost.

Part of #868.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-22 05:31:00 +02:00
parent c8f02d91b7
commit 4fecf43d28
19 changed files with 297 additions and 55 deletions
@@ -179,6 +179,7 @@ public final class VanillaMenuOracle {
}
case "loom" -> new LoomMenu(0, inv);
case "stonecutter" -> new StonecutterMenu(0, inv);
case "grindstone" -> new GrindstoneMenu(0, inv);
default -> throw new IllegalArgumentException(kind);
};
}