Right-clicking a furnace as a guest did nothing: the host only handed
chests, barrels, hoppers, dispensers and shulker boxes over. It now opens
the furnace's own menu (minecraft:furnace, blast_furnace or smoker),
runs the guest's clicks through the host's AbstractFurnaceMenu (fuel slot,
take-only result, shift-clicks by recipe and fuel, a new input restarts
cooking) and keeps the client's progress arrows in step with
ContainerSetData. The dedicated server harness now opens a furnace and
smelts an ore in it on both servers.
Fixes#540
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A vanilla 26.3 client that died on a Horizon server stayed on its loading
screen after pressing Respawn (#566): ClientPacketListener.handleRespawn
starts a LevelLoadTracker that waits for the level info's "level chunks
load start" game event and the chunk under the player, and Horizon's
respawn sent neither the level info nor the chunk cache centre.
The hub's respawn now follows PlayerList.respawn: the entities paired with
the dead player are removed (one packet each), its chunks are dropped
without ForgetLevelChunk (as PlayerChunkSender does for a dead player) and
sent again, the abilities, then Respawn (with the last death location),
the teleport to the spawn facing its direction, the default spawn,
difficulty, experience, post effects, the level info, the permission
level, the chunk cache centre and the inventory. A dying guest also gets
the death animation event and no health update while dead, as vanilla's
ServerPlayer.die does.
Guests' commands also ran at the host's permission level: an operator on
a dedicated server could not run operator commands (and LAN guests ran
the host's level). They now run at the guest's own level, as the command
tree they are sent says.
The dedicated server harness covers it: after trading, the vanilla-codec
client is made an operator by the console, runs /kill, respawns, and the
packets from the death screen to the respawned inventory are compared
with vanilla's, then the level must load where it respawned. The client
also stops sending a movement packet beside each teleport acceptance
during the respawn: the 26.3 client sends the acceptance alone, and
vanilla's server kicks a second position in the same tick.
Fixes#566
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test_dedicated_server_parity summons a librarian beside the spawn and the
vanilla protocol client right-clicks it: the OpenScreen packet (title as
Entity.getDisplayName, UUIDs left out) and the MerchantOffers packet must
match vanilla's server. Villagers keep Xp, LastRestock and RestocksToday
before their offers are made (vanilla's null offers).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ClientboundUpdateRecipesPacket at join: the recipe property sets and the
stonecutter's recipes, from the data pack (lan/recipes.rs).
- On a player's first tick the minecraft:tick criteria are met: the recipes
their advancements grant go out in ClientboundRecipeBookAddPacket, then
ClientboundUpdateAdvancementsPacket with what the player may see
(lan/advancements.rs).
- Command replies reach remote players as the components vanilla sends:
Text keeps the Component it was built from (literal, translatable,
siblings, style), sendFailure wraps the message as vanilla does, and the
NBT wraps the elements of mixed lists.
The dedicated-server harness drops its known gaps: it compares these
packets (sorted where vanilla's hash maps order them per run) and the
replies to three failing commands, keeps only the first set_time among the
joining packets and turns random ticks off in the generated world.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The world was saved 20 wall-clock seconds after force-loading the area, so
on a busy machine chunks were still generating or their fluids flowing,
and random ticks changed blocks while the client was being sent its
chunks: which chunks differed varied from run to run. Wait until every
force-loaded chunk is loaded and 600 game ticks have passed, with
random_tick_speed 0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VanillaProtocolClient joins a server with vanilla's own codecs;
test_dedicated_server_parity.py compares a vanilla and a Horizon dedicated
server serving the same world.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>