Exemple #1
0
func sendChunk(p Player, x, z int32, chunk *chunk.Chunk) {
	if chunk == nil {
		p.SendPacketSync(protocol.ChunkAllocation{X: x, Z: z, Init: false})
	} else {
		p.SendPacketSync(protocol.ChunkAllocation{X: x, Z: z, Init: true})
		p.SendPacketSync(chunk)
		p.SendPacketSync(chunk.EntitySpawnPacket())
	}
}