gl01/internal/world/default_blocks.go

41 lines
1.3 KiB
Go
Raw Normal View History

2022-01-20 21:58:50 +08:00
package world
const (
BlockNil = iota
BlockDebug
BlockDebugDir
BlockDebugNonexist
BlockStone
BlockDirt
BlockGrass
BlockBedrock
BlockSand
BlockLogOak
BlockLeavesOak
BlockCount
)
func init() {
RegisterBlockBehaviour(1, BlockBehaviourStatic(BlockAppearance{Name: "debug"}))
RegisterBlockBehaviour(2, BlockBehaviourStatic(BlockAppearance{Name: "debug_dir", RenderType: SixTexture}))
RegisterBlockBehaviour(3, BlockBehaviourStatic(BlockAppearance{Name: "debug_nonexist"}))
RegisterBlockBehaviour(4, BlockBehaviourStatic(BlockAppearance{Name: "stone"}))
RegisterBlockBehaviour(5, BlockBehaviourStatic(BlockAppearance{Name: "dirt"}))
RegisterBlockBehaviour(6, BlockBehaviourStatic(BlockAppearance{Name: "grass", RenderType: ThreeTexture}))
RegisterBlockBehaviour(7, BlockBehaviourStatic(BlockAppearance{Name: "bedrock"}))
RegisterBlockBehaviour(8, BlockBehaviourStatic(BlockAppearance{Name: "sand"}))
RegisterBlockBehaviour(9, BlockBehaviourStatic(BlockAppearance{Name: "log_oak", RenderType: ThreeTexture}))
RegisterBlockBehaviour(10, BlockBehaviourStatic(BlockAppearance{Name: "leaves_oak"}))
if BlockCount != 11 {
panic("world.DefaultBlocks: block count not correct (check for block numbering in default_blocks.go)")
}
DoneRegisteringBlockBehaviour()
}