worldgen water, fixes

This commit is contained in:
2022-01-28 15:24:03 +08:00
parent 7b6c16789c
commit 904221ac14
13 changed files with 245 additions and 72 deletions

View File

@@ -21,7 +21,13 @@ type Chunk struct {
renderChanged bool
vao, vbo uint32
vbolen int
vertUpdate chan []Vertex
water struct {
vao, vbo uint32
vbolen int
}
vertUpdate chan []Vertex
world *World
}
func (c *Chunk) SetChunkID(x, z int) {
@@ -30,8 +36,9 @@ func (c *Chunk) SetChunkID(x, z int) {
c.renderChanged = true
}
func (c *Chunk) SetBlock(x, y, z int, id int) {
func (c *Chunk) SetBlock(x, y, z int, id, aux int) {
c.Id[x][y][z] = uint16(id)
c.Aux[x][y][z] = uint16(aux)
c.renderChanged = true
}