MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / offset

Method offset

server/world/chunk/section/section.go:48–54  ·  view source on GitHub ↗
(x, y, z int)

Source from the content-addressed store, hash-verified

46}
47
48func (s *Section) offset(x, y, z int) (long, offset int) {
49 blockNumber := ((((y * 16) + z) * 16) + x) * s.blockBitsPerEntry
50 startLong := blockNumber >> 6
51 stateOffset := blockNumber & 63
52
53 return startLong, stateOffset
54}
55
56// X, Y, Z should be relative to the chunk section (AKA x&0x0f, y&0x0f, z&0x0f)
57func (s *Section) Block(x, y, z byte) AnvilBlock {

Callers 4

BlockMethod · 0.95
blockStateMethod · 0.95
setBlockStateMethod · 0.95
SetBlockMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected