diff --git a/homedecor/exterior.lua b/homedecor/exterior.lua index 9452caba..817090ca 100644 --- a/homedecor/exterior.lua +++ b/homedecor/exterior.lua @@ -353,25 +353,6 @@ if minetest.get_modpath("bucket") then }) end -local shrub_model = { - type = "fixed", - fixed = { - {-0.312500,-0.500000,0.250000,-0.187500,-0.437500,0.375000}, --NodeBox 1 - {0.187500,-0.500000,-0.125000,0.312500,-0.437500,0.000000}, --NodeBox 2 - {0.000000,-0.500000,-0.312500,0.125000,-0.437500,-0.187500}, --NodeBox 3 - {-0.375000,-0.500000,-0.062500,-0.250000,-0.437500,0.062500}, --NodeBox 4 - {0.000000,-0.500000,-0.250000,0.125000,-0.437500,-0.125000}, --NodeBox 5 - {0.187500,-0.437500,-0.187500,0.375000,-0.375000,0.062500}, --NodeBox 6 - {-0.062500,-0.437500,0.125000,0.187500,-0.375000,0.375000}, --NodeBox 7 - {-0.062500,-0.437500,-0.375000,0.187500,-0.375000,-0.062500}, --NodeBox 8 - {-0.375000,-0.437500,0.187500,-0.125000,-0.375000,0.431179}, --NodeBox 9 - {-0.437500,-0.437500,-0.125000,-0.187500,-0.375000,0.125000}, --NodeBox 10 - {-0.437500,-0.375000,-0.437500,0.439966,-0.312500,0.420887}, --NodeBox 11 - {-0.500000,-0.312500,-0.500000,0.500000,0.500000,0.500000}, --NodeBox 12 - {0.000000,-0.500000,0.187500,0.125000,-0.437500,0.312500}, --NodeBox 13 - } -} - homedecor.shrub_colors = { "green", "red", @@ -383,7 +364,8 @@ local shrub_cbox = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 } for _, color in ipairs(homedecor.shrub_colors) do minetest.register_node("homedecor:shrubbery_large_"..color, { description = S("Shrubbery ("..color..")"), - drawtype = "allfaces_optional", + drawtype = "mesh", + mesh = "homedecor_cube.obj", tiles = {"homedecor_shrubbery_"..color.."_top.png"}, paramtype = "light", is_ground_content = false, @@ -393,11 +375,12 @@ for _, color in ipairs(homedecor.shrub_colors) do minetest.register_node("homedecor:shrubbery_"..color, { description = S("Shrubbery ("..color..")"), - drawtype = "nodebox", + drawtype = "mesh", + mesh = "homedecor_shrubbery.obj", tiles = { - "homedecor_shrubbery_"..color.."_top.png", - "homedecor_shrubbery_bottom.png", - "homedecor_shrubbery_"..color.."_sides.png" + "homedecor_shrubbery_"..color..".png", + "homedecor_shrubbery_"..color.."_bottom.png", + "homedecor_shrubbery_roots.png" }, paramtype = "light", is_ground_content = false, @@ -405,7 +388,6 @@ for _, color in ipairs(homedecor.shrub_colors) do sounds = default.node_sound_leaves_defaults(), selection_box = shrub_cbox, collision_box = shrub_cbox, - node_box = shrub_model }) end diff --git a/homedecor/models/homedecor_cube.mtl b/homedecor/models/homedecor_cube.mtl new file mode 100644 index 00000000..70d3ba1d --- /dev/null +++ b/homedecor/models/homedecor_cube.mtl @@ -0,0 +1,10 @@ +# Blender MTL File: 'None' +# Material Count: 1 + +newmtl None +Ns 0 +Ka 0.000000 0.000000 0.000000 +Kd 0.8 0.8 0.8 +Ks 0.8 0.8 0.8 +d 1 +illum 2 diff --git a/homedecor/models/homedecor_cube.obj b/homedecor/models/homedecor_cube.obj new file mode 100644 index 00000000..d0a18993 --- /dev/null +++ b/homedecor/models/homedecor_cube.obj @@ -0,0 +1,23 @@ +# Blender v2.73 (sub 0) OBJ File: 'cobe+1.001.blend' +# www.blender.org +o Cylinder +v -0.499500 -0.499500 0.499500 +v -0.499500 -0.499500 -0.499500 +v 0.499500 -0.499500 -0.499500 +v 0.499500 -0.499500 0.499500 +v -0.499500 0.499500 0.499500 +v -0.499500 0.499500 -0.499500 +v 0.499500 0.499500 -0.499500 +v 0.499500 0.499500 0.499500 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +g Cylinder_Cylinder_None +s off +f 5/1 6/2 2/3 1/4 +f 6/1 7/2 3/3 2/4 +f 7/1 8/2 4/3 3/4 +f 8/1 5/2 1/3 4/4 +f 1/1 2/2 3/3 4/4 +f 8/1 7/2 6/3 5/4 diff --git a/homedecor/models/homedecor_shrubbery.obj b/homedecor/models/homedecor_shrubbery.obj new file mode 100644 index 00000000..c4e6c8ad --- /dev/null +++ b/homedecor/models/homedecor_shrubbery.obj @@ -0,0 +1,117 @@ +# Blender v2.73 (sub 0) OBJ File: 'shrubbery.blend' +# www.blender.org +o Cylinder +v -0.499483 -0.312503 0.499551 +v -0.499483 -0.312503 -0.499449 +v 0.499517 -0.312503 -0.499449 +v 0.499517 -0.312503 0.499551 +v -0.499483 0.499185 0.499551 +v -0.499483 0.499185 -0.499449 +v 0.499517 0.499185 -0.499449 +v 0.499517 0.499185 0.499551 +v 0.187330 -0.499815 0.249801 +v 0.187330 -0.499815 0.124926 +v 0.312205 -0.499815 0.124926 +v 0.312205 -0.499815 0.249801 +v 0.062455 -0.312503 0.374676 +v 0.062455 -0.312503 0.000051 +v 0.437080 -0.312503 0.000051 +v 0.437080 -0.312503 0.374676 +v 0.350010 -0.406159 0.287607 +v 0.149524 -0.406159 0.287607 +v 0.350010 -0.406159 0.087120 +v 0.149524 -0.406159 0.087120 +v 0.000017 -0.499815 -0.187261 +v 0.000017 -0.499815 -0.312136 +v 0.124892 -0.499815 -0.312136 +v 0.124892 -0.499815 -0.187261 +v -0.124858 -0.312503 -0.062386 +v -0.124858 -0.312503 -0.437011 +v 0.249767 -0.312503 -0.437011 +v 0.249767 -0.312503 -0.062386 +v 0.162698 -0.406159 -0.149456 +v -0.037789 -0.406159 -0.149456 +v 0.162698 -0.406159 -0.349942 +v -0.037789 -0.406159 -0.349942 +v -0.312170 -0.499815 0.312239 +v -0.312170 -0.499815 0.187364 +v -0.187295 -0.499815 0.187364 +v -0.187295 -0.499815 0.312239 +v -0.437045 -0.312503 0.437114 +v -0.437045 -0.312503 0.062489 +v -0.062420 -0.312503 0.062489 +v -0.062420 -0.312503 0.437114 +v -0.149490 -0.406159 0.350045 +v -0.349976 -0.406159 0.350045 +v -0.149490 -0.406159 0.149558 +v -0.349976 -0.406159 0.149558 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt -0.000000 0.187500 +vt 1.000000 0.187500 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 0.375000 0.437500 +vt 0.500000 0.437500 +vt 0.500000 0.562500 +vt 0.375000 0.562500 +vt 0.725343 0.656248 +vt 0.812500 0.750000 +vt 0.437500 0.750000 +vt 0.524656 0.656248 +vt 0.287844 0.906248 +vt 0.375000 1.000000 +vt 0.087156 0.906248 +vt 0.725344 0.906248 +vt 0.812500 1.000000 +vt 0.437500 1.000000 +vt 0.524656 0.906248 +vt 0.287844 0.656248 +vt 0.375000 0.750000 +vt 0.000000 0.750000 +vt 0.087156 0.656248 +vt 0.250000 0.562495 +vt 0.125000 0.562495 +vt 0.250000 0.812495 +vt 0.125000 0.812495 +vt 0.687500 0.812495 +vt 0.562500 0.812495 +vt 0.687500 0.562495 +vt 0.562500 0.562495 +g Cylinder_Cylinder_top-sides +s off +f 5/1 6/2 2/3 1/4 +f 6/1 7/2 3/3 2/4 +f 7/1 8/2 4/3 3/4 +f 8/1 5/2 1/3 4/4 +f 8/5 7/6 6/1 5/2 +g Cylinder_Cylinder_bottom +f 1/5 2/6 3/1 4/2 +g Cylinder_Cylinder_roots +f 9/7 10/8 11/9 12/10 +f 17/11 16/12 13/13 18/14 +f 19/15 15/16 16/2 17/17 +f 20/18 14/19 15/20 19/21 +f 18/22 13/23 14/24 20/25 +f 9/26 18/22 20/25 10/27 +f 10/28 20/15 19/17 11/29 +f 11/30 19/18 17/21 12/31 +f 12/32 17/11 18/14 9/33 +f 21/7 22/8 23/9 24/10 +f 29/11 28/12 25/13 30/14 +f 31/15 27/16 28/2 29/17 +f 32/18 26/19 27/20 31/21 +f 30/22 25/23 26/24 32/25 +f 21/26 30/22 32/25 22/27 +f 22/28 32/15 31/17 23/29 +f 23/30 31/18 29/21 24/31 +f 24/32 29/11 30/14 21/33 +f 33/7 34/8 35/9 36/10 +f 41/11 40/12 37/13 42/14 +f 43/15 39/16 40/2 41/17 +f 44/18 38/19 39/20 43/21 +f 42/22 37/23 38/24 44/25 +f 33/26 42/22 44/25 34/27 +f 34/28 44/15 43/17 35/29 +f 35/30 43/18 41/21 36/31 +f 36/32 41/11 42/14 33/33 diff --git a/homedecor/textures/homedecor_shrubbery_bottom.png b/homedecor/textures/homedecor_shrubbery_bottom.png deleted file mode 100644 index 15b0b6d8..00000000 Binary files a/homedecor/textures/homedecor_shrubbery_bottom.png and /dev/null differ diff --git a/homedecor/textures/homedecor_shrubbery_green_top.png b/homedecor/textures/homedecor_shrubbery_green.png similarity index 100% rename from homedecor/textures/homedecor_shrubbery_green_top.png rename to homedecor/textures/homedecor_shrubbery_green.png diff --git a/homedecor/textures/homedecor_shrubbery_green_bottom.png b/homedecor/textures/homedecor_shrubbery_green_bottom.png new file mode 100644 index 00000000..e8c4a134 Binary files /dev/null and b/homedecor/textures/homedecor_shrubbery_green_bottom.png differ diff --git a/homedecor/textures/homedecor_shrubbery_green_sides.png b/homedecor/textures/homedecor_shrubbery_green_sides.png deleted file mode 100644 index 6c9661a5..00000000 Binary files a/homedecor/textures/homedecor_shrubbery_green_sides.png and /dev/null differ diff --git a/homedecor/textures/homedecor_shrubbery_red_top.png b/homedecor/textures/homedecor_shrubbery_red.png similarity index 100% rename from homedecor/textures/homedecor_shrubbery_red_top.png rename to homedecor/textures/homedecor_shrubbery_red.png diff --git a/homedecor/textures/homedecor_shrubbery_red_bottom.png b/homedecor/textures/homedecor_shrubbery_red_bottom.png new file mode 100644 index 00000000..1f289fc7 Binary files /dev/null and b/homedecor/textures/homedecor_shrubbery_red_bottom.png differ diff --git a/homedecor/textures/homedecor_shrubbery_red_sides.png b/homedecor/textures/homedecor_shrubbery_red_sides.png deleted file mode 100644 index b961ed13..00000000 Binary files a/homedecor/textures/homedecor_shrubbery_red_sides.png and /dev/null differ diff --git a/homedecor/textures/homedecor_shrubbery_roots.png b/homedecor/textures/homedecor_shrubbery_roots.png new file mode 100644 index 00000000..b33659e1 Binary files /dev/null and b/homedecor/textures/homedecor_shrubbery_roots.png differ diff --git a/homedecor/textures/homedecor_shrubbery_yellow_top.png b/homedecor/textures/homedecor_shrubbery_yellow.png similarity index 100% rename from homedecor/textures/homedecor_shrubbery_yellow_top.png rename to homedecor/textures/homedecor_shrubbery_yellow.png diff --git a/homedecor/textures/homedecor_shrubbery_yellow_bottom.png b/homedecor/textures/homedecor_shrubbery_yellow_bottom.png new file mode 100644 index 00000000..8fd3010d Binary files /dev/null and b/homedecor/textures/homedecor_shrubbery_yellow_bottom.png differ diff --git a/homedecor/textures/homedecor_shrubbery_yellow_sides.png b/homedecor/textures/homedecor_shrubbery_yellow_sides.png deleted file mode 100644 index b21fac55..00000000 Binary files a/homedecor/textures/homedecor_shrubbery_yellow_sides.png and /dev/null differ