1
0
Fork 0

Add bonemealing callback to carrots.

* Adds a _mcl_on_bonemealing callback to the unripe carrot plants.
This commit is contained in:
kabou 2022-04-30 06:08:38 +02:00 committed by teknomunk
parent 69032c3222
commit 2d8bb12fad
1 changed files with 6 additions and 0 deletions

View File

@ -45,6 +45,12 @@ for i=1, 7 do
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,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_carrot", pos, n, stages, true)
end
})
end