mojira.dev

Kengo

Assigned

No issues.

Comments

Additional information:

1. Still reproduces on BDS 1.26.66.1 (client 26.66).

2. I logged outgoing packets with @minecraft/server-net (beforeEvents.packetSend, packet type + recipients only) while changing a SimulatedPlayer's equipment one step at a time. Results (recipient = the real player watching):

- SimulatedPlayer spawns: AddPlayerPacket, MobArmorEquipmentPacket, 2x MobEquipmentPacket (main hand + offhand) -> sent to the real player

- Offhand changed (setEquipment(Offhand, totem) or /replaceitem ... slot.weapon.offhand): NO packet to the real player (only InventoryContent/InventorySlot to the SimulatedPlayer itself)

- selectedSlotIndex changed (0 -> 8): MobEquipmentPacket -> sent to the real player

- Item in the currently selected hotbar slot replaced (container.setItem on the selected slot): NO packet to the real player

- Armor changed (/replaceitem ... slot.armor.head): MobArmorEquipmentPacket -> sent to the real player

So for SimulatedPlayers, MobEquipmentPacket is only broadcast on spawn and on a selected-slot change. Changes to the offhand, or to the item in the selected slot, are never broadcast, and other players keep seeing the old item.

Workaround: give the whole kit (main hand and offhand) in the same tick as spawnSimulatedPlayer. Those items are included in the spawn packets and render correctly.