A Minecraft datapack generator written in go.

feat: basic example

+25
+25
examples/basic/main.go
··· 1 + package main 2 + 3 + import ( 4 + "log" 5 + 6 + "tangled.org/cosmeak.tngl.sh/weave" 7 + "tangled.org/cosmeak.tngl.sh/weave/function" 8 + ) 9 + 10 + func main() { 11 + pack := weave.MkDatapack("demo", "My first basic datapack", 88, 88, []string{}). 12 + AddFeature(function.MkFunction( 13 + "set_day", 14 + "time set day", 15 + "say Daytime!", 16 + )). 17 + AddFeature(function.MkFunction( 18 + "spawn_stand", 19 + "summon armor_stand ~ ~ ~", 20 + )) 21 + 22 + if err := pack.Generate("./out"); err != nil { 23 + log.Fatal(err) 24 + } 25 + }