mirror of
https://github.com/mt-mods/round_trunks.git
synced 2024-08-19 21:14:09 +02:00
first commit
This commit is contained in:
commit
27c89129e9
1
README.md
Normal file
1
README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# round_trunks
|
1
depends.txt
Normal file
1
depends.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
default
|
45
init.lua
Normal file
45
init.lua
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
-- simple mesh-based round trees mod
|
||||||
|
-- by VanessaEzekowitz
|
||||||
|
--
|
||||||
|
-- Textures borrowed/derived from Mossmanikin's alternate trunks mod, cc-by-sa
|
||||||
|
-- code: WTFPL
|
||||||
|
|
||||||
|
local trees={
|
||||||
|
{ "default:tree", "round_default_tree_top.png" },
|
||||||
|
{ "default:jungletree", "default_jungletree_top.png" },
|
||||||
|
{ "default:pine_tree", "round_pine_tree_top.png" },
|
||||||
|
{ "default:acacia_tree", "round_acacia_tree_top.png" },
|
||||||
|
{ "default:cactus", "default_cactus_top.png" }
|
||||||
|
}
|
||||||
|
|
||||||
|
local trees2 = {}
|
||||||
|
|
||||||
|
for i in ipairs(trees) do
|
||||||
|
local nodename = trees[i][1]
|
||||||
|
local top = trees[i][2]
|
||||||
|
|
||||||
|
local oldnode = minetest.registered_nodes[nodename]
|
||||||
|
if not oldnode then return end
|
||||||
|
local newnode = table.copy(oldnode)
|
||||||
|
print(dump(newnode.tiles))
|
||||||
|
|
||||||
|
newnode.drawtype = "mesh"
|
||||||
|
newnode.mesh = "round_trunks_mesh.obj"
|
||||||
|
newnode.tiles[1] = top
|
||||||
|
newnode.tiles[2] = top
|
||||||
|
newnode.paramtype = "light"
|
||||||
|
|
||||||
|
minetest.register_node(":"..nodename, newnode)
|
||||||
|
table.insert(trees2, nodename)
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = trees2,
|
||||||
|
chance = 2,
|
||||||
|
interval = 1,
|
||||||
|
action = function(pos, node)
|
||||||
|
if node.param1 == 0 then
|
||||||
|
minetest.set_node(pos, {name = node.name, param2 = node.param2 })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
253
models/round_trunks_mesh.obj
Normal file
253
models/round_trunks_mesh.obj
Normal file
@ -0,0 +1,253 @@
|
|||||||
|
# Blender v2.73 (sub 0) OBJ File: 'tree-trunk.blend'
|
||||||
|
# www.blender.org
|
||||||
|
o Cylinder_Cylinder.001
|
||||||
|
v 0.097545 0.500000 -0.490393
|
||||||
|
v 0.000000 0.500000 -0.500000
|
||||||
|
v 0.000000 0.500000 0.000000
|
||||||
|
v -0.097544 0.500000 -0.490393
|
||||||
|
v -0.191341 0.500000 -0.461940
|
||||||
|
v -0.277785 0.500000 -0.415735
|
||||||
|
v -0.353553 0.500000 -0.353554
|
||||||
|
v -0.415734 0.500000 -0.277786
|
||||||
|
v -0.461940 0.500000 -0.191342
|
||||||
|
v -0.490393 0.500000 -0.097546
|
||||||
|
v -0.500000 0.500000 0.000000
|
||||||
|
v -0.490393 0.500000 0.097545
|
||||||
|
v -0.461940 0.500000 0.191341
|
||||||
|
v -0.415735 0.500000 0.277785
|
||||||
|
v -0.353554 0.500000 0.353553
|
||||||
|
v -0.277785 0.500000 0.415735
|
||||||
|
v -0.191342 0.500000 0.461940
|
||||||
|
v -0.097545 0.500000 0.490393
|
||||||
|
v 0.000000 0.500000 0.500000
|
||||||
|
v 0.097545 0.500000 0.490393
|
||||||
|
v 0.191342 0.500000 0.461940
|
||||||
|
v 0.277785 0.500000 0.415735
|
||||||
|
v 0.353553 0.500000 0.353553
|
||||||
|
v 0.415735 0.500000 0.277785
|
||||||
|
v 0.461940 0.500000 0.191342
|
||||||
|
v 0.490393 0.500000 0.097545
|
||||||
|
v 0.500000 0.500000 0.000000
|
||||||
|
v 0.490393 0.500000 -0.097545
|
||||||
|
v 0.461940 0.500000 -0.191342
|
||||||
|
v 0.415735 0.500000 -0.277785
|
||||||
|
v 0.353553 0.500000 -0.353553
|
||||||
|
v 0.277785 0.500000 -0.415735
|
||||||
|
v 0.191342 0.500000 -0.461940
|
||||||
|
v 0.000000 -0.500000 -0.500000
|
||||||
|
v 0.097545 -0.500000 -0.490393
|
||||||
|
v 0.000000 -0.500000 -0.000000
|
||||||
|
v 0.191342 -0.500000 -0.461940
|
||||||
|
v 0.277785 -0.500000 -0.415735
|
||||||
|
v 0.353553 -0.500000 -0.353553
|
||||||
|
v 0.415735 -0.500000 -0.277785
|
||||||
|
v 0.461940 -0.500000 -0.191342
|
||||||
|
v 0.490393 -0.500000 -0.097545
|
||||||
|
v 0.500000 -0.500000 -0.000000
|
||||||
|
v 0.490393 -0.500000 0.097545
|
||||||
|
v 0.461940 -0.500000 0.191342
|
||||||
|
v 0.415735 -0.500000 0.277785
|
||||||
|
v 0.353553 -0.500000 0.353553
|
||||||
|
v 0.277785 -0.500000 0.415735
|
||||||
|
v 0.191342 -0.500000 0.461940
|
||||||
|
v 0.097545 -0.500000 0.490393
|
||||||
|
v 0.000000 -0.500000 0.500000
|
||||||
|
v -0.097545 -0.500000 0.490393
|
||||||
|
v -0.191342 -0.500000 0.461940
|
||||||
|
v -0.277785 -0.500000 0.415735
|
||||||
|
v -0.353554 -0.500000 0.353553
|
||||||
|
v -0.415735 -0.500000 0.277785
|
||||||
|
v -0.461940 -0.500000 0.191341
|
||||||
|
v -0.490393 -0.500000 0.097545
|
||||||
|
v -0.500000 -0.500000 -0.000000
|
||||||
|
v -0.490393 -0.500000 -0.097546
|
||||||
|
v -0.461940 -0.500000 -0.191342
|
||||||
|
v -0.415734 -0.500000 -0.277786
|
||||||
|
v -0.353553 -0.500000 -0.353554
|
||||||
|
v -0.277785 -0.500000 -0.415735
|
||||||
|
v -0.191341 -0.500000 -0.461940
|
||||||
|
v -0.097544 -0.500000 -0.490393
|
||||||
|
vt 0.597545 0.990393
|
||||||
|
vt 0.500000 1.000000
|
||||||
|
vt 0.500000 0.500000
|
||||||
|
vt 0.402456 0.990393
|
||||||
|
vt 0.308659 0.961940
|
||||||
|
vt 0.222215 0.915735
|
||||||
|
vt 0.146447 0.853554
|
||||||
|
vt 0.084266 0.777786
|
||||||
|
vt 0.038060 0.691342
|
||||||
|
vt 0.009607 0.597546
|
||||||
|
vt 0.000000 0.500000
|
||||||
|
vt 0.009607 0.402455
|
||||||
|
vt 0.038060 0.308659
|
||||||
|
vt 0.084265 0.222215
|
||||||
|
vt 0.146446 0.146447
|
||||||
|
vt 0.222215 0.084265
|
||||||
|
vt 0.308658 0.038060
|
||||||
|
vt 0.402455 0.009607
|
||||||
|
vt 0.500000 0.000000
|
||||||
|
vt 0.597545 0.009607
|
||||||
|
vt 0.691342 0.038060
|
||||||
|
vt 0.777785 0.084265
|
||||||
|
vt 0.853553 0.146447
|
||||||
|
vt 0.915735 0.222215
|
||||||
|
vt 0.961940 0.308658
|
||||||
|
vt 0.990393 0.402455
|
||||||
|
vt 1.000000 0.500000
|
||||||
|
vt 0.990393 0.597545
|
||||||
|
vt 0.961940 0.691342
|
||||||
|
vt 0.915735 0.777785
|
||||||
|
vt 0.853553 0.853553
|
||||||
|
vt 0.777785 0.915735
|
||||||
|
vt 0.691342 0.961940
|
||||||
|
vt 0.375001 1.000000
|
||||||
|
vt 0.375001 0.000000
|
||||||
|
vt 0.250001 1.000001
|
||||||
|
vt 0.250001 0.000000
|
||||||
|
vt 0.125000 1.000001
|
||||||
|
vt 0.125001 0.000000
|
||||||
|
vt 0.000000 1.000001
|
||||||
|
vt 0.000000 0.000001
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.875000 1.000000
|
||||||
|
vt 0.875000 0.000000
|
||||||
|
vt 0.750000 1.000000
|
||||||
|
vt 0.750000 0.000000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 -0.000000
|
||||||
|
vn 0.195100 0.000000 -0.980800
|
||||||
|
vn -0.000000 0.000000 -1.000000
|
||||||
|
vn 0.382700 0.000000 -0.923900
|
||||||
|
vn 0.555600 0.000000 -0.831500
|
||||||
|
vn 0.707100 0.000000 -0.707100
|
||||||
|
vn 0.831500 0.000000 -0.555600
|
||||||
|
vn 0.923900 0.000000 -0.382700
|
||||||
|
vn 0.980800 -0.000000 -0.195100
|
||||||
|
vn 1.000000 -0.000000 0.000000
|
||||||
|
vn 0.980800 -0.000000 0.195100
|
||||||
|
vn 0.923900 -0.000000 0.382700
|
||||||
|
vn 0.831500 -0.000000 0.555600
|
||||||
|
vn 0.707100 -0.000000 0.707100
|
||||||
|
vn 0.555600 -0.000000 0.831500
|
||||||
|
vn 0.382700 -0.000000 0.923900
|
||||||
|
vn 0.195100 -0.000000 0.980800
|
||||||
|
vn 0.000000 -0.000000 1.000000
|
||||||
|
vn -0.195100 -0.000000 0.980800
|
||||||
|
vn -0.382700 -0.000000 0.923900
|
||||||
|
vn -0.555600 -0.000000 0.831500
|
||||||
|
vn -0.707100 -0.000000 0.707100
|
||||||
|
vn -0.831500 -0.000000 0.555600
|
||||||
|
vn -0.923900 0.000000 0.382700
|
||||||
|
vn -0.980800 0.000000 0.195100
|
||||||
|
vn -1.000000 0.000000 0.000000
|
||||||
|
vn -0.980800 0.000000 -0.195100
|
||||||
|
vn -0.923900 0.000000 -0.382700
|
||||||
|
vn -0.831500 0.000000 -0.555600
|
||||||
|
vn -0.707100 0.000000 -0.707100
|
||||||
|
vn -0.555600 0.000000 -0.831500
|
||||||
|
vn -0.382700 0.000000 -0.923900
|
||||||
|
vn -0.195100 0.000000 -0.980800
|
||||||
|
g Cylinder_Cylinder.001_Cylinder_Cylinder.001_top
|
||||||
|
s off
|
||||||
|
f 1/1/1 2/2/1 3/3/1
|
||||||
|
f 2/2/1 4/4/1 3/3/1
|
||||||
|
f 4/4/1 5/5/1 3/3/1
|
||||||
|
f 5/5/1 6/6/1 3/3/1
|
||||||
|
f 6/6/1 7/7/1 3/3/1
|
||||||
|
f 7/7/1 8/8/1 3/3/1
|
||||||
|
f 8/8/1 9/9/1 3/3/1
|
||||||
|
f 9/9/1 10/10/1 3/3/1
|
||||||
|
f 10/10/1 11/11/1 3/3/1
|
||||||
|
f 11/11/1 12/12/1 3/3/1
|
||||||
|
f 12/12/1 13/13/1 3/3/1
|
||||||
|
f 13/13/1 14/14/1 3/3/1
|
||||||
|
f 14/14/1 15/15/1 3/3/1
|
||||||
|
f 15/15/1 16/16/1 3/3/1
|
||||||
|
f 16/16/1 17/17/1 3/3/1
|
||||||
|
f 17/17/1 18/18/1 3/3/1
|
||||||
|
f 18/18/1 19/19/1 3/3/1
|
||||||
|
f 19/19/1 20/20/1 3/3/1
|
||||||
|
f 20/20/1 21/21/1 3/3/1
|
||||||
|
f 21/21/1 22/22/1 3/3/1
|
||||||
|
f 22/22/1 23/23/1 3/3/1
|
||||||
|
f 23/23/1 24/24/1 3/3/1
|
||||||
|
f 24/24/1 25/25/1 3/3/1
|
||||||
|
f 25/25/1 26/26/1 3/3/1
|
||||||
|
f 26/26/1 27/27/1 3/3/1
|
||||||
|
f 27/27/1 28/28/1 3/3/1
|
||||||
|
f 28/28/1 29/29/1 3/3/1
|
||||||
|
f 29/29/1 30/30/1 3/3/1
|
||||||
|
f 30/30/1 31/31/1 3/3/1
|
||||||
|
f 31/31/1 32/32/1 3/3/1
|
||||||
|
f 32/32/1 33/33/1 3/3/1
|
||||||
|
f 33/33/1 1/1/1 3/3/1
|
||||||
|
g Cylinder_Cylinder.001_Cylinder_Cylinder.001_bottom
|
||||||
|
f 34/19/2 35/20/2 36/3/2
|
||||||
|
f 35/20/2 37/21/2 36/3/2
|
||||||
|
f 37/21/2 38/22/2 36/3/2
|
||||||
|
f 38/22/2 39/23/2 36/3/2
|
||||||
|
f 39/23/2 40/24/2 36/3/2
|
||||||
|
f 40/24/2 41/25/2 36/3/2
|
||||||
|
f 41/25/2 42/26/2 36/3/2
|
||||||
|
f 42/26/2 43/27/2 36/3/2
|
||||||
|
f 43/27/2 44/28/2 36/3/2
|
||||||
|
f 44/28/2 45/29/2 36/3/2
|
||||||
|
f 45/29/2 46/30/2 36/3/2
|
||||||
|
f 46/30/2 47/31/2 36/3/2
|
||||||
|
f 47/31/2 48/32/2 36/3/2
|
||||||
|
f 48/32/2 49/33/2 36/3/2
|
||||||
|
f 49/33/2 50/1/2 36/3/2
|
||||||
|
f 50/1/2 51/2/2 36/3/2
|
||||||
|
f 51/2/2 52/4/2 36/3/2
|
||||||
|
f 52/4/2 53/5/2 36/3/2
|
||||||
|
f 53/5/2 54/6/2 36/3/2
|
||||||
|
f 54/6/2 55/7/2 36/3/2
|
||||||
|
f 55/7/2 56/8/2 36/3/2
|
||||||
|
f 56/8/2 57/9/2 36/3/2
|
||||||
|
f 57/9/2 58/10/2 36/3/2
|
||||||
|
f 58/10/2 59/11/2 36/3/2
|
||||||
|
f 59/11/2 60/12/2 36/3/2
|
||||||
|
f 60/12/2 61/13/2 36/3/2
|
||||||
|
f 61/13/2 62/14/2 36/3/2
|
||||||
|
f 62/14/2 63/15/2 36/3/2
|
||||||
|
f 63/15/2 64/16/2 36/3/2
|
||||||
|
f 64/16/2 65/17/2 36/3/2
|
||||||
|
f 65/17/2 66/18/2 36/3/2
|
||||||
|
f 66/18/2 34/19/2 36/3/2
|
||||||
|
g Cylinder_Cylinder.001_Cylinder_Cylinder.001_sides
|
||||||
|
s 1
|
||||||
|
f 1/34/3 35/35/3 34/19/4 2/2/4
|
||||||
|
f 35/35/3 1/34/3 33/36/5 37/37/5
|
||||||
|
f 37/37/5 33/36/5 32/38/6 38/39/6
|
||||||
|
f 38/39/6 32/38/6 31/40/7 39/41/7
|
||||||
|
f 39/42/7 31/43/7 30/44/8 40/45/8
|
||||||
|
f 40/45/8 30/44/8 29/46/9 41/47/9
|
||||||
|
f 41/47/9 29/46/9 28/48/10 42/49/10
|
||||||
|
f 42/49/10 28/48/10 27/2/11 43/19/11
|
||||||
|
f 43/19/11 27/2/11 26/34/12 44/35/12
|
||||||
|
f 44/35/12 26/34/12 25/36/13 45/37/13
|
||||||
|
f 45/37/13 25/36/13 24/38/14 46/39/14
|
||||||
|
f 46/39/14 24/38/14 23/40/15 47/41/15
|
||||||
|
f 47/42/15 23/43/15 22/44/16 48/45/16
|
||||||
|
f 48/45/16 22/44/16 21/46/17 49/47/17
|
||||||
|
f 49/47/17 21/46/17 20/48/18 50/49/18
|
||||||
|
f 50/49/18 20/48/18 19/2/19 51/19/19
|
||||||
|
f 51/19/19 19/2/19 18/34/20 52/35/20
|
||||||
|
f 52/35/20 18/34/20 17/36/21 53/37/21
|
||||||
|
f 53/37/21 17/36/21 16/38/22 54/39/22
|
||||||
|
f 54/39/22 16/38/22 15/40/23 55/41/23
|
||||||
|
f 55/40/23 15/41/23 14/39/24 56/38/24
|
||||||
|
f 56/38/24 14/39/24 13/37/25 57/36/25
|
||||||
|
f 57/36/25 13/37/25 12/35/26 58/34/26
|
||||||
|
f 58/34/26 12/35/26 11/19/27 59/2/27
|
||||||
|
f 59/2/27 11/19/27 10/49/28 60/48/28
|
||||||
|
f 60/48/28 10/49/28 9/47/29 61/46/29
|
||||||
|
f 61/46/29 9/47/29 8/45/30 62/44/30
|
||||||
|
f 62/44/30 8/45/30 7/42/31 63/43/31
|
||||||
|
f 63/42/31 7/43/31 6/44/32 64/45/32
|
||||||
|
f 64/45/32 6/44/32 5/46/33 65/47/33
|
||||||
|
f 66/49/34 4/48/34 2/2/4 34/19/4
|
||||||
|
f 65/47/33 5/46/33 4/48/34 66/49/34
|
BIN
textures/round_acacia_tree_top.png
Normal file
BIN
textures/round_acacia_tree_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 673 B |
BIN
textures/round_default_tree_top.png
Normal file
BIN
textures/round_default_tree_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 744 B |
BIN
textures/round_pine_tree_top.png
Normal file
BIN
textures/round_pine_tree_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 726 B |
Loading…
Reference in New Issue
Block a user