1
0
Fork 0

Make grown pumpkins face away from the stem

This commit is contained in:
Wuzzy 2017-03-13 20:31:11 +01:00
parent 6456351722
commit 12bb62727d
1 changed files with 9 additions and 2 deletions

View File

@ -271,12 +271,15 @@ minetest.register_abm({
or n.name=="mcl_core:dirt" and nod.name=="air" and have_change == 0 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 or (soilgroup == 2 or soilgroup == 3) and nod.name=="air" and have_change == 0 then
have_change = 1 have_change = 1
minetest.add_node(newpos, {name="mcl_farming:pumpkin_face"}) local p2
if x == 1 then if x == 1 then
minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_r" }) minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_r" })
p2 = 3
else else
minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_l"}) minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_l"})
p2 = 1
end end
minetest.add_node(newpos, {name="mcl_farming:pumpkin_face", param2=p2})
end end
end end
if have_change == 0 then 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 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 or (soilgroup == 2 or soilgroup == 3) and nod2.name=="air" and have_change == 0 then
have_change = 1 have_change = 1
minetest.add_node(newpos, {name="mcl_farming:pumpkin_face"})
local p2
if z == 1 then if z == 1 then
minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_t" }) minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_t" })
p2 = 2
else else
minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_b" }) minetest.add_node(pos, {name="mcl_farming:pumpkintige_linked_b" })
p2 = 0
end end
minetest.add_node(newpos, {name="mcl_farming:pumpkin_face", param2=p2})
end end
end end
end end