-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.lua
49 lines (39 loc) · 1.38 KB
/
example.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--To load these examples, uncomment the last line in init.lua (remove the "--" at the beginning)
--First Example
node_definition ={
description = "Example",
drawtype = "mesh",
mesh = "example.obj",
sunlight_propagates = true,
paramtype2 = "facedir",
collision_box = {
type = "fixed",
fixed = {{0.95, -1.55, -0.55, -0.25, -0.65, 0.55}} --overwritten later
},
selection_box = {
type = "fixed",
fixed = {{0.95, -1.55, -0.55, -0.25, -0.65, 0.55}} --overwritten later
},
tiles = {"autobox_stone.png"},
groups = { cracky=2 },
}
autobox.register_node("autobox:example","example.box",node_definition,true)
--Second Example
node_definition ={
description = "Wagon",
drawtype = "mesh",
mesh = "wagon.obj",
sunlight_propagates = true,
paramtype2 = "facedir",
collision_box = {
type = "fixed",
fixed = {{0.95, -1.55, -0.55, -0.25, -0.65, 0.55}} --overwritten later
},
selection_box = {
type = "fixed",
fixed = {{0.95, -1.55, -0.55, -0.25, -0.65, 0.55}} --overwritten later
},
tiles = {"autobox_wagon.jpg"},
groups = { cracky=2 },
}
autobox.register_node("autobox:wagon","wagon.box",node_definition,true)