tangled
alpha
login
or
join now
cosmeak.dev
/
weave
0
fork
atom
A Minecraft datapack generator written in go.
0
fork
atom
overview
issues
pulls
pipelines
feat: basic example
cosmeak.dev
2 months ago
cf26dc6e
28d25730
+25
1 changed file
expand all
collapse all
unified
split
examples
basic
main.go
+25
examples/basic/main.go
···
1
1
+
package main
2
2
+
3
3
+
import (
4
4
+
"log"
5
5
+
6
6
+
"tangled.org/cosmeak.tngl.sh/weave"
7
7
+
"tangled.org/cosmeak.tngl.sh/weave/function"
8
8
+
)
9
9
+
10
10
+
func main() {
11
11
+
pack := weave.MkDatapack("demo", "My first basic datapack", 88, 88, []string{}).
12
12
+
AddFeature(function.MkFunction(
13
13
+
"set_day",
14
14
+
"time set day",
15
15
+
"say Daytime!",
16
16
+
)).
17
17
+
AddFeature(function.MkFunction(
18
18
+
"spawn_stand",
19
19
+
"summon armor_stand ~ ~ ~",
20
20
+
))
21
21
+
22
22
+
if err := pack.Generate("./out"); err != nil {
23
23
+
log.Fatal(err)
24
24
+
}
25
25
+
}