diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2015-04-10 15:23:38 -0700 |
---|---|---|
committer | Auke Kok <auke-jan.h.kok@intel.com> | 2015-04-10 15:23:38 -0700 |
commit | 0073de68e759906948e33feb937657eace75c143 (patch) | |
tree | 67d71d98e56dfd99b69a15e11dc8a89b77326a6a | |
parent | 5da6b39eeb42124e81b07e11014542d1bdb325a9 (diff) |
Melons: Place melons on their side.
Melons naturally grow on their side with stems attached, so place
them on their side with stem to the plant. I've modified the
textures to make them visually connect properly, and tuned the
bottom texture a bit more to look like an actual melon bottom.
Yes, I actually had a watermelon at my house and looked at it's
rear end.
-rw-r--r-- | melon.lua | 11 | ||||
-rw-r--r-- | textures/crops_melon_bottom.png | bin | 667 -> 725 bytes | |||
-rw-r--r-- | textures/crops_melon_stem.png | bin | 680 -> 678 bytes | |||
-rw-r--r-- | textures/crops_melon_top.png | bin | 628 -> 673 bytes |
4 files changed, 6 insertions, 5 deletions
@@ -11,10 +11,10 @@ of the license, or (at your option) any later version. --]] local faces = { - [1] = { x = -1, z = 0, r = 3, o = 1 } , - [2] = { x = 1, z = 0, r = 1, o = 3 } , - [3] = { x = 0, z = -1, r = 2, o = 0 } , - [4] = { x = 0, z = 1, r = 0, o = 2 } + [1] = { x = -1, z = 0, r = 3, o = 1, m = 14 }, + [2] = { x = 1, z = 0, r = 1, o = 3, m = 16 }, + [3] = { x = 0, z = -1, r = 2, o = 0, m = 5 }, + [4] = { x = 0, z = 1, r = 0, o = 2, m = 11 } } local interval = 30 @@ -102,6 +102,7 @@ minetest.register_node("crops:melon", { use_texture_alpha = false, walkable = true, groups = { snappy=3, flammable=3, oddly_breakable_by_hand=2 }, + paramtype2 = "facedir", drop = {max_items = 5, items = { { items = {'crops:melon_slice'}, rarity = 1 }, { items = {'crops:melon_slice'}, rarity = 1 }, @@ -180,7 +181,7 @@ minetest.register_abm({ if minetest.registered_nodes[n.name].drawtype == "plantlike" or minetest.registered_nodes[n.name].groups.flora == 1 or n.name == "air" then - minetest.set_node(t, {name = "crops:melon"}) + minetest.set_node(t, {name = "crops:melon", param2 = faces[r].m}) minetest.set_node(pos, {name = "crops:melon_plant_5_attached", param2 = faces[r].r}) end end diff --git a/textures/crops_melon_bottom.png b/textures/crops_melon_bottom.png Binary files differindex 572c1d0..020560c 100644 --- a/textures/crops_melon_bottom.png +++ b/textures/crops_melon_bottom.png diff --git a/textures/crops_melon_stem.png b/textures/crops_melon_stem.png Binary files differindex aff846b..e51fd95 100644 --- a/textures/crops_melon_stem.png +++ b/textures/crops_melon_stem.png diff --git a/textures/crops_melon_top.png b/textures/crops_melon_top.png Binary files differindex 796cb1b..9215931 100644 --- a/textures/crops_melon_top.png +++ b/textures/crops_melon_top.png |