mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 12:01:06 +01:00
Prevent bonemealing grass from making flowers and also bonemealing the block above the grass
This commit is contained in:
parent
afc270195a
commit
4eda77acd1
1 changed files with 3 additions and 2 deletions
|
@ -126,10 +126,11 @@ if not olddef then
|
||||||
else
|
else
|
||||||
local oldhandler = olddef._on_bone_meal
|
local oldhandler = olddef._on_bone_meal
|
||||||
local newhandler = function(itemstack, placer, pointed_thing)
|
local newhandler = function(itemstack, placer, pointed_thing)
|
||||||
bonemeal_grass(pointed_thing, placer)
|
local res = bonemeal_grass(pointed_thing, placer)
|
||||||
if oldhandler then
|
if oldhandler then
|
||||||
oldhandler(itemstack, placer, pointed_thing)
|
res = oldhandler(itemstack, placer, pointed_thing) or res
|
||||||
end
|
end
|
||||||
|
return res
|
||||||
end
|
end
|
||||||
minetest.override_item(nodename, {_on_bone_meal = newhandler})
|
minetest.override_item(nodename, {_on_bone_meal = newhandler})
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue