MCPcopy
hub / github.com/icexin/gocraft / Block

Method Block

chunk.go:69–78  ·  view source on GitHub ↗
(id Vec3)

Source from the content-addressed store, hash-verified

67}
68
69func (c *Chunk) Block(id Vec3) int {
70 if id.Chunkid() != c.id {
71 log.Panicf("id %v chunk %v", id, c.id)
72 }
73 w, ok := c.blocks.Load(id)
74 if ok {
75 return w.(int)
76 }
77 return 0
78}
79
80func (c *Chunk) add(id Vec3, w int) {
81 if id.Chunkid() != c.id {

Callers 2

makeChunkMeshMethod · 0.45
drawWireFrameMethod · 0.45

Calls 1

ChunkidMethod · 0.80

Tested by

no test coverage detected