Add StructureManager and NBT template loader for large structures
This commit is contained in:
parent
e33370a049
commit
788983dc88
12 changed files with 1435 additions and 11 deletions
14
scratch.go
14
scratch.go
|
|
@ -1,17 +1,13 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"regionio/internal/worldgen"
|
||||
)
|
||||
|
||||
func main() {
|
||||
f, _ := os.Open("generated/reports/blocks.json")
|
||||
var data map[string]interface{}
|
||||
json.NewDecoder(f).Decode(&data)
|
||||
|
||||
glowstone := data["minecraft:glowstone"]
|
||||
b, _ := json.MarshalIndent(glowstone, "", " ")
|
||||
fmt.Println("glowstone:", string(b))
|
||||
tmpl, _ := worldgen.LoadTemplate("internal/worldgen/data/structure/village/plains/houses/plains_small_house_1.nbt")
|
||||
for i, b := range tmpl.Palette {
|
||||
fmt.Printf("Palette[%d] = %d\n", i, b)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue