items and struture loading

This commit is contained in:
adman
2026-03-12 23:13:25 +01:00
parent 047c4d02ff
commit e0cf1834f1
7 changed files with 124 additions and 12 deletions
+3
View File
@@ -69,6 +69,7 @@ func LookupBlockByStateId(version string, stateId int32) (block *Block, ok bool)
if b.MinStateId <= stateId && stateId <= b.MaxStateId {
block = b
ok = true
return
}
}
return
@@ -100,6 +101,8 @@ func FromBlockState(version string, stateId int32) (b *Block, stateData map[stri
return
}
// TODO: mc stores these as strings so we will do the same
func mcDataBlockStateTypeParse(n int32, s *BlockState) (v any, err error) {
switch s.Type {
case "int":