Implement packet decoding for entities

This commit is contained in:
Tom
2020-09-17 00:13:08 -07:00
parent a981ab84f5
commit 8ecf08fa50
4 changed files with 270 additions and 19 deletions

View File

@ -68,6 +68,10 @@ func (w *World) GetBlockStatus(x, y, z int) BlockStatus {
return 0
}
func (w *World) UnloadChunk(loc ChunkLoc) {
delete(w.Chunks, loc)
}
func (w *World) UnaryBlockUpdate(pos pk.Position, bStateID BlockStatus) bool {
c := w.Chunks[ChunkLoc{X: pos.X >> 4, Z: pos.Z >> 4}]
if c == nil {