mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-25 02:42:25 +01:00
Return itemstack in composter_harvest()
.
* `composter_harvest()` is a `on_rightclick` handler and should return what remains of the ItemStack that was passed to it.
This commit is contained in:
parent
2ba801dfc7
commit
f37f8b6bca
@ -116,7 +116,7 @@ local function composter_harvest(pos, node, player, itemstack, pointed_thing)
|
||||
-- handler for harvesting bone meal from a ready composter when rightclicked
|
||||
--
|
||||
if not player or (player:get_player_control() and player:get_player_control().sneak) then
|
||||
return
|
||||
return itemstack
|
||||
end
|
||||
local name = player:get_player_name()
|
||||
if is_protected(pos, name) then
|
||||
@ -128,7 +128,7 @@ local function composter_harvest(pos, node, player, itemstack, pointed_thing)
|
||||
-- spawn bone meal item (wtf dye?! is this how they make white cocoa)
|
||||
add_item(pos, "mcl_dye:white")
|
||||
-- TODO play some sounds
|
||||
|
||||
return itemstack
|
||||
end
|
||||
|
||||
local function composter_get_nodeboxes(level)
|
||||
|
Loading…
Reference in New Issue
Block a user