Some checks failed
build / build (push) Has been cancelled
Bug: /videoPlace (and any path that places an anchor) reported success on the server but the panel was invisible on the client — no quad, no video. Walking around did not help. Root cause: VideoAnchorBlockEntity did not override getUpdateTag() or getUpdatePacket(). The base implementations return an empty CompoundTag and null respectively, so url/facing/width/height were never carried in vanilla BE sync. There is also a packet-ordering race between level.setBlock() (queues a deferred chunk broadcast) and ServerPlayNetworking.send(SyncAnchorPayload) (writes immediately): if the payload arrives first, the client drops it because the BE does not exist yet, then the chunk packet creates the BE with defaults (url="") and the renderer silently no-ops. Fix: override getUpdateTag(HolderLookup.Provider) → toNbt(), and getUpdatePacket() → ClientboundBlockEntityDataPacket.create(this). NBT key names already line up between toNbt() and loadAdditional(), so vanilla wraps the CompoundTag in TagValueInput and existing load logic reads it. Also fixes the 'walk far away, come back' case — that path has no SyncAnchorPayload, just vanilla chunk re-sync.
457 B
457 B