[GH-ISSUE #484] [LAN] Guest leftovers after #435: item used twice on blocks, recipe book, status effects, arrow owners, team friendly fire #136

Closed
opened 2026-11-02 15:36:41 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @ludovic111 on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/484

Left after the bugs-lan-2 stack (#466 #467 #470 #471 #472 #473 #474):

  • On a guest, an item used on a block is used twice (e.g. a snowball thrown at a block flies twice). Already there before. Fix: split the host's right-click handling for guests into a block part and an item part, as vanilla's ServerGamePacketListenerImpl.handleUseItemOn / handleUseItem.
  • Recipe-book clicks from a guest: the protocol has no place-recipe packets yet.
  • Guests have no status effects, so effects from mobs, potions or omens don't apply to them.
  • Arrows don't record which player shot them.
  • Team friendly fire isn't applied.
Originally created by @ludovic111 on GitHub (Oct 16, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/484 Left after the bugs-lan-2 stack (#466 #467 #470 #471 #472 #473 #474): - On a guest, an item used on a block is used twice (e.g. a snowball thrown at a block flies twice). Already there before. Fix: split the host's right-click handling for guests into a block part and an item part, as vanilla's ServerGamePacketListenerImpl.handleUseItemOn / handleUseItem. - Recipe-book clicks from a guest: the protocol has no place-recipe packets yet. - Guests have no status effects, so effects from mobs, potions or omens don't apply to them. - Arrows don't record which player shot them. - Team friendly fire isn't applied.
bsakaguchi 2026-11-02 15:36:41 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@ludovic111 commented on GitHub (Oct 19, 2026):

🤖 Agent: audit on a real dedicated server (horizon-client --dedicated), with a vanilla-codec client against both vanilla's server and Horizon's (tools/test_dedicated_server_parity.py) and with tools/lan_e2e.py (a Horizon host and a Horizon guest).

Leftover On main Now
Item used on a block is used twice Fails. A snowball thrown at the ground flies 2 times from the main hand and 3 times from the off hand (vanilla: 1 and 1). #999 makes UseItemOn / UseItem each do their own part with their own hand, as handleUseItemOn / handleUseItem do. Horizon's client sends the off hand's packets as vanilla's startUseItem does. Harness case added.
Recipe book Works (lan_crafting.rs handles PlaceRecipe as ServerPlaceRecipe). lan_e2e --check recipes passes. Nothing to do.
Status effects Work (mob, beacon, sculk and splash effects reach every player). lan_e2e --check effects passes. Nothing to do.
Arrow owner Fails. A remote player's projectiles have no owner on the wire (data 0), and their ender pearl doesn't teleport them on a dedicated server (on LAN it teleported the host). #1001 (stacked on #999): projectiles remember the guest who shot them. The hit runs as that guest (pearl teleport + 5 damage, mob retaliation) and clients get the guest's entity id. Harness case added.
Team friendly fire Fails. Allies on a friendlyFire false team hurt each other (19.33 → 13.33 both ways). #1000 checks teams_allow_damage as Player.canHarmPlayer does. lan_e2e --check pvp gains both cases.
#500 block desync / freezes Closed by #626 (STOP_DESTROY_BLOCK checks the client's progress, as ServerPlayerGameMode does). Nothing to do.
(#973) dead player's commands Ignored. #998. Vanilla runs them.

All four PRs on one build: dedicated server: 604 transcript lines identical; lan_e2e pvp chest crafting containers machines swings eat sign effects recipes projectiles pass.

Still open after these, so this issue stays open:

  • A remote player's projectiles don't hit other players (no bow or snowball PvP between players on a server).
  • A mob a remote player kills counts in the host's statistics and advancements, not theirs (mob_died runs as the host).
  • Fishing bobbers aren't tracked per guest.
<!-- gh-comment-id:6264313655 --> @ludovic111 commented on GitHub (Oct 19, 2026): 🤖 Agent: audit on a real dedicated server (`horizon-client --dedicated`), with a vanilla-codec client against both vanilla's server and Horizon's (`tools/test_dedicated_server_parity.py`) and with `tools/lan_e2e.py` (a Horizon host and a Horizon guest). | Leftover | On main | Now | | --- | --- | --- | | Item used on a block is used twice | Fails. A snowball thrown at the ground flies 2 times from the main hand and 3 times from the off hand (vanilla: 1 and 1). | #999 makes `UseItemOn` / `UseItem` each do their own part with their own hand, as `handleUseItemOn` / `handleUseItem` do. Horizon's client sends the off hand's packets as vanilla's `startUseItem` does. Harness case added. | | Recipe book | Works (`lan_crafting.rs` handles `PlaceRecipe` as `ServerPlaceRecipe`). `lan_e2e --check recipes` passes. | Nothing to do. | | Status effects | Work (mob, beacon, sculk and splash effects reach every player). `lan_e2e --check effects` passes. | Nothing to do. | | Arrow owner | Fails. A remote player's projectiles have no owner on the wire (data 0), and their ender pearl doesn't teleport them on a dedicated server (on LAN it teleported the host). | #1001 (stacked on #999): projectiles remember the guest who shot them. The hit runs as that guest (pearl teleport + 5 damage, mob retaliation) and clients get the guest's entity id. Harness case added. | | Team friendly fire | Fails. Allies on a `friendlyFire false` team hurt each other (19.33 → 13.33 both ways). | #1000 checks `teams_allow_damage` as `Player.canHarmPlayer` does. `lan_e2e --check pvp` gains both cases. | | #500 block desync / freezes | Closed by #626 (`STOP_DESTROY_BLOCK` checks the client's progress, as `ServerPlayerGameMode` does). | Nothing to do. | | (#973) dead player's commands | Ignored. | #998. Vanilla runs them. | All four PRs on one build: `dedicated server: 604 transcript lines identical`; lan_e2e `pvp chest crafting containers machines swings eat sign effects recipes projectiles` pass. Still open after these, so this issue stays open: - A remote player's projectiles don't hit other players (no bow or snowball PvP between players on a server). - A mob a remote player kills counts in the host's statistics and advancements, not theirs (`mob_died` runs as the host). - Fishing bobbers aren't tracked per guest.
Author
Owner

@ludovic111 commented on GitHub (Oct 22, 2026):

🤖 Agent: #1148 makes players' arrows, snowballs and eggs hit other players on a served world (refused when pvp or teams forbid it), and lets a guest's bow shoot. #1147 counts a mob a guest kills as the guest's kill. The last leftover, fishing bobbers per guest, is noted for later.

<!-- gh-comment-id:6330341649 --> @ludovic111 commented on GitHub (Oct 22, 2026): 🤖 Agent: #1148 makes players' arrows, snowballs and eggs hit other players on a served world (refused when pvp or teams forbid it), and lets a guest's bow shoot. #1147 counts a mob a guest kills as the guest's kill. The last leftover, fishing bobbers per guest, is noted for later.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#136
No description provided.