Skip to content

Commit

Permalink
close #182
Browse files Browse the repository at this point in the history
  • Loading branch information
Tnze committed May 20, 2022
1 parent 588b787 commit df664e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions level/chunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,10 @@ type BlockEntity struct {
Data nbt.RawMessage
}

func (b BlockEntity) UnpackXZ() (X, Z int) {
return int((uint8(b.XZ) >> 4) & 0xF), int(uint8(b.XZ) & 0xF)
}

func (b BlockEntity) WriteTo(w io.Writer) (n int64, err error) {
return pk.Tuple{
pk.Byte(b.XZ),
Expand Down

0 comments on commit df664e4

Please sign in to comment.