From 12bb62727d2d6955cbec6a8a878a4ee6a4ba6405 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 13 Mar 2017 20:31:11 +0100 Subject: [PATCH] Make grown pumpkins face away from the stem --- mods/ITEMS/mcl_farming/pumpkin.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_farming/pumpkin.lua b/mods/ITEMS/mcl_farming/pumpkin.lua index 35f9943f3..114f6e660 100644 --- a/mods/ITEMS/mcl_farming/pumpkin.lua +++ b/mods/ITEMS/mcl_farming/pumpkin.lua @@ -271,12 +271,15 @@ minetest.register_abm({ or n.name=="mcl_core:dirt" and nod.name=="air" and have_change == 0 or (soilgroup == 2 or soilgroup == 3) and nod.name=="air" and have_change == 0 then have_change = 1 - minetest.add_node(newpos, {name="mcl_farming:pumpkin_face"}) + local p2 if x == 1 then minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_r" }) + p2 = 3 else minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_l"}) + p2 = 1 end + minetest.add_node(newpos, {name="mcl_farming:pumpkin_face", param2=p2}) end end if have_change == 0 then @@ -290,12 +293,16 @@ minetest.register_abm({ or n.name=="mcl_core:dirt" and nod2.name=="air" and have_change == 0 or (soilgroup == 2 or soilgroup == 3) and nod2.name=="air" and have_change == 0 then have_change = 1 - minetest.add_node(newpos, {name="mcl_farming:pumpkin_face"}) + + local p2 if z == 1 then minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_t" }) + p2 = 2 else minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_b" }) + p2 = 0 end + minetest.add_node(newpos, {name="mcl_farming:pumpkin_face", param2=p2}) end end end