mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-17 00:21:07 +01:00
Add bonemealing callback to wheat.
* Adds a _mcl_on_bonemealing callback to the unripe wheat node definitions.
This commit is contained in:
parent
5217c88daa
commit
2cec651783
1 changed files with 6 additions and 0 deletions
|
@ -64,6 +64,12 @@ for i=1,7 do
|
|||
dig_by_water=1,destroy_by_lava_flow=1, dig_by_piston=1},
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
_mcl_blast_resistance = 0,
|
||||
_mcl_on_bonemealing = function(pointed_thing, placer)
|
||||
local pos = pointed_thing.under
|
||||
local n = minetest.get_node(pos)
|
||||
local stages = math.random(2, 5)
|
||||
return mcl_farming:grow_plant("plant_wheat", pos, n, stages, true)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue