Skip to content

Commit 52a6a0d

Browse files
Fix allow_metadata_inventory_put item count check (#34)
Currently, hoppers check the `allow_metadata_inventory_put` function, but they check whether they can insert *at least zero* items, meaning that they insert things even when they're not supposed to. This one-character change fixes that.
1 parent eee0dc0 commit 52a6a0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utility.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ local function send_item_to_inv(hopper_inv, target_pos, filtered_items, placer,
193193

194194
local stack_to_put = stack:take_item(1)
195195
if target_def.allow_metadata_inventory_put and placer -- backwards compatibility, older versions of this mod didn't record who placed the hopper
196-
and target_def.allow_metadata_inventory_put(target_pos, target_inv_name, stack_num, stack_to_put, placer) < 0 then
196+
and target_def.allow_metadata_inventory_put(target_pos, target_inv_name, stack_num, stack_to_put, placer) <= 0 then
197197
return false
198198
end
199199

0 commit comments

Comments
 (0)