Files
go-mc/data/registryid/bootstrap/builtinregistries.go
patyhank 185020e31c
Some checks failed
CodeQL / Analyze (go) (push) Has been cancelled
Go / Test (1.22) (push) Has been cancelled
Go / Test (^1.22) (push) Has been cancelled
Squashed below commits
nbt chat message

fixes some bug

chunk temp

relocate module

items id
2025-08-27 20:29:40 +08:00

18 lines
431 B
Go

package bootstrap
import (
"git.konjactw.dev/falloutBot/go-mc/data/registryid"
"git.konjactw.dev/falloutBot/go-mc/level/block"
"git.konjactw.dev/falloutBot/go-mc/registry"
)
func RegisterBlocks(reg *registry.Registry[block.Block]) {
reg.Clear()
for i, key := range registryid.Block {
id, val := reg.Put(key, block.FromID[key])
if int32(i) != id || val == nil || *val == nil {
panic("register blocks failed")
}
}
}