Skip to content

Commit f3f8b22

Browse files
kilbithparamat
authored andcommittedJul 8, 2015
Convert stairs in meshnode
1 parent 585b2bc commit f3f8b22

File tree

2 files changed

+49
-2
lines changed

2 files changed

+49
-2
lines changed
 

Diff for: ‎mods/stairs/init.lua

+10-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,22 @@ stairs = {}
77
function stairs.register_stair(subname, recipeitem, groups, images, description, sounds)
88
minetest.register_node(":stairs:stair_" .. subname, {
99
description = description,
10-
drawtype = "nodebox",
10+
drawtype = "mesh",
11+
mesh = "stairs.obj",
1112
tiles = images,
1213
paramtype = "light",
1314
paramtype2 = "facedir",
1415
is_ground_content = false,
1516
groups = groups,
1617
sounds = sounds,
17-
node_box = {
18+
selection_box = {
19+
type = "fixed",
20+
fixed = {
21+
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
22+
{-0.5, 0, 0, 0.5, 0.5, 0.5},
23+
},
24+
},
25+
collision_box = {
1826
type = "fixed",
1927
fixed = {
2028
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},

Diff for: ‎mods/stairs/models/stairs.obj

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Blender v2.72 (sub 0) OBJ File: ''
2+
# www.blender.org
3+
o stair
4+
v -0.500000 -0.500000 0.500000
5+
v -0.500000 -0.000000 0.500000
6+
v -0.500000 0.000000 -0.500000
7+
v -0.500000 -0.500000 -0.500000
8+
v 0.500000 -0.500000 0.500000
9+
v 0.500000 -0.500000 -0.500000
10+
v 0.500000 0.000000 -0.500000
11+
v 0.500000 -0.000000 0.500000
12+
v -0.500000 -0.000000 0.500000
13+
v -0.500000 0.500000 0.500000
14+
v -0.500000 0.500000 0.000000
15+
v -0.500000 0.000000 0.000000
16+
v 0.500000 -0.000000 0.500000
17+
v 0.500000 0.000000 0.000000
18+
v 0.500000 0.500000 0.000000
19+
v 0.500000 0.500000 0.500000
20+
vt 1.000000 0.000000
21+
vt 1.000000 0.500000
22+
vt 0.000000 0.500000
23+
vt 0.000000 0.000000
24+
vt 1.000000 1.000000
25+
vt 0.000000 1.000000
26+
vt 0.500000 1.000000
27+
vt 0.500000 0.500000
28+
s off
29+
f 1/1 2/2 3/3 4/4
30+
f 5/4 6/1 7/2 8/3
31+
f 1/4 5/1 8/2 2/3
32+
f 4/1 3/2 7/3 6/4
33+
f 1/1 4/5 6/6 5/4
34+
f 2/5 8/6 7/4 3/1
35+
f 9/2 10/5 11/7 12/8
36+
f 13/3 14/8 15/7 16/6
37+
f 9/3 13/2 16/5 10/6
38+
f 12/2 11/5 15/6 14/3
39+
f 10/5 16/6 15/3 11/2

0 commit comments

Comments
 (0)
Please sign in to comment.