From 2cec651783f731167388b5b0b58a8fef05a54c47 Mon Sep 17 00:00:00 2001 From: kabou Date: Sat, 30 Apr 2022 05:59:14 +0200 Subject: [PATCH] Add bonemealing callback to wheat. * Adds a _mcl_on_bonemealing callback to the unripe wheat node definitions. --- mods/ITEMS/mcl_farming/wheat.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mods/ITEMS/mcl_farming/wheat.lua b/mods/ITEMS/mcl_farming/wheat.lua index a254ed36c..9b3d08464 100644 --- a/mods/ITEMS/mcl_farming/wheat.lua +++ b/mods/ITEMS/mcl_farming/wheat.lua @@ -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