worldgen water, fixes
This commit is contained in:
49
internal/world/blocks/default.go
Normal file
49
internal/world/blocks/default.go
Normal file
@@ -0,0 +1,49 @@
|
||||
package blocks
|
||||
|
||||
import "edgaru089.ml/go/gl01/internal/world"
|
||||
|
||||
const (
|
||||
Nil = iota
|
||||
|
||||
Debug
|
||||
DebugDir
|
||||
DebugNonexist
|
||||
|
||||
Stone
|
||||
Dirt
|
||||
Grass
|
||||
Bedrock
|
||||
Sand
|
||||
LogOak
|
||||
LeavesOak
|
||||
PlanksOak
|
||||
|
||||
Water
|
||||
|
||||
Count
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
world.RegisterBlockBehaviour(1, world.BlockBehaviourStatic(world.BlockAppearance{Name: "debug"}))
|
||||
world.RegisterBlockBehaviour(2, world.BlockBehaviourStatic(world.BlockAppearance{Name: "debug_dir", RenderType: world.SixTexture}))
|
||||
world.RegisterBlockBehaviour(3, world.BlockBehaviourStatic(world.BlockAppearance{Name: "debug_nonexist"}))
|
||||
|
||||
world.RegisterBlockBehaviour(4, world.BlockBehaviourStatic(world.BlockAppearance{Name: "stone"}))
|
||||
world.RegisterBlockBehaviour(5, world.BlockBehaviourStatic(world.BlockAppearance{Name: "dirt"}))
|
||||
world.RegisterBlockBehaviour(6, world.BlockBehaviourStatic(world.BlockAppearance{Name: "grass", RenderType: world.ThreeTexture}))
|
||||
world.RegisterBlockBehaviour(7, world.BlockBehaviourStatic(world.BlockAppearance{Name: "bedrock"}))
|
||||
world.RegisterBlockBehaviour(8, world.BlockBehaviourStatic(world.BlockAppearance{Name: "sand"}))
|
||||
world.RegisterBlockBehaviour(9, world.BlockBehaviourStatic(world.BlockAppearance{Name: "log_oak", RenderType: world.ThreeTexture}))
|
||||
world.RegisterBlockBehaviour(10, world.BlockBehaviourStatic(world.BlockAppearance{Name: "leaves_oak"}))
|
||||
|
||||
world.RegisterBlockBehaviour(11, world.BlockBehaviourStatic(world.BlockAppearance{Name: "planks_oak"}))
|
||||
|
||||
world.RegisterBlockBehaviour(12, WaterBehaviour{})
|
||||
|
||||
if Count != 13 {
|
||||
panic("world.DefaultBlocks: block count not correct (check for block numbering in default_blocks.go)")
|
||||
}
|
||||
|
||||
world.DoneRegisteringBlockBehaviour()
|
||||
}
|
||||
Reference in New Issue
Block a user