mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-22 16:09:33 +01:00
Turn farmland to dirt when piston extends above
This commit is contained in:
parent
b7971ef796
commit
2270121d03
1 changed files with 4 additions and 0 deletions
|
@ -81,6 +81,10 @@ local piston_on = function (pos, node)
|
|||
if success then
|
||||
minetest.add_node(pos, {param2 = node.param2, name = pistonspec.onname})
|
||||
minetest.add_node(np, {param2 = node.param2, name = pistonspec.pusher})
|
||||
local below = minetest.get_node({x=np.x,y=np.y-1,z=np.z})
|
||||
if below.name == "mcl_farming:soil" or below.name == "mcl_farming:soil_wet" then
|
||||
minetest.set_node({x=np.x,y=np.y-1,z=np.z}, {name = "mcl_core:dirt"})
|
||||
end
|
||||
mesecon:mvps_process_stack(stack)
|
||||
minetest.sound_play("piston_extend", {
|
||||
pos = pos,
|
||||
|
|
Loading…
Reference in a new issue