diff --git a/server/session/world.go b/server/session/world.go index 96ffe288e..5fca88d99 100644 --- a/server/session/world.go +++ b/server/session/world.go @@ -851,12 +851,13 @@ func (s *Session) ViewBlockUpdate(pos cube.Pos, b world.Block, layer int) { Layer: uint32(layer), }) if v, ok := b.(world.NBTer); ok { - NBTData := v.EncodeNBT() - NBTData["x"], NBTData["y"], NBTData["z"] = int32(pos.X()), int32(pos.Y()), int32(pos.Z()) - s.writePacket(&packet.BlockActorData{ - Position: blockPos, - NBTData: NBTData, - }) + if nbtData := v.EncodeNBT(); nbtData != nil { + nbtData["x"], nbtData["y"], nbtData["z"] = int32(pos.X()), int32(pos.Y()), int32(pos.Z()) + s.writePacket(&packet.BlockActorData{ + Position: blockPos, + NBTData: nbtData, + }) + } } }