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.dyable-leather-armor
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
|
-- 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
|
if not player or (player:get_player_control() and player:get_player_control().sneak) then
|
||||||
return
|
return itemstack
|
||||||
end
|
end
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
if is_protected(pos, name) then
|
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)
|
-- spawn bone meal item (wtf dye?! is this how they make white cocoa)
|
||||||
add_item(pos, "mcl_dye:white")
|
add_item(pos, "mcl_dye:white")
|
||||||
-- TODO play some sounds
|
-- TODO play some sounds
|
||||||
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
local function composter_get_nodeboxes(level)
|
local function composter_get_nodeboxes(level)
|
||||||
|
|
Loading…
Reference in New Issue