41 lines
1.3 KiB
Go
41 lines
1.3 KiB
Go
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()
|
|
}
|