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:
kabou 2022-04-02 00:35:51 +02:00 committed by cora
parent 2ba801dfc7
commit f37f8b6bca
1 changed files with 2 additions and 2 deletions

View File

@ -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)