From 1420883ee1ca3030c754a993886831e0247041d5 Mon Sep 17 00:00:00 2001 From: osmarks Date: Wed, 15 Aug 2018 22:27:55 +0100 Subject: [PATCH] fix oopsle --- backend-chests.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend-chests.lua b/backend-chests.lua index dae1089..9a08868 100644 --- a/backend-chests.lua +++ b/backend-chests.lua @@ -84,7 +84,7 @@ local function find_space(quantity, item) for name, items in pairs(index) do for i = 1, inventories[name].size() do local item_in_slot = index[name][i] - if not item_in_slot or (item_in_slot.ID == item.ID and item_in_slot.meta == item.meta and item.NBT_hash == item_in_slot == NBT.hash) then -- slot is free or contains same type of item + if not item_in_slot or (item_in_slot.ID == item.ID and item_in_slot.meta == item.meta and item_in_slot.NBT_hash == item.NBT_hash) then -- slot is free or contains same type of item table.insert(locations, { inventory = name, slot = i }) local available_space = item.max_count if item_in_slot then available_space = available_space - item_in_slot.count end