Something went wrong. Try again.
A Minecraft datapack generator written in go.
Something went wrong. Try again.
12345678910111213141516171819202122232425package function
import ( "path" "strings"
"tangled.org/cosmeak.tngl.sh/weave/internal/generator")
func (f Function) Emit() (generator.File, error) { content := strings.Join(f.commands, "\n")
namespace := "" if f.namespace != "" { namespace = f.namespace } else { namespace = "%namespace%" }
return generator.File{ Path: path.Join("data", namespace, "function", f.name+".mcfunction"), Content: []byte(content), }, nil}