diff --git a/src/util/Container.ts b/src/util/Container.ts index e660c87..8c1be52 100644 --- a/src/util/Container.ts +++ b/src/util/Container.ts @@ -112,8 +112,10 @@ export default class Container { inventory.set(floatingStackIndex, stack || new ItemStack("tiny:air")) } - if (stack.item.id != "tiny:air" && floatingStackIndex != mouseSlot.slotIndex) floatingStackIndex = mouseSlot.slotIndex - else floatingStackIndex = undefined + if (floatingStackIndex == undefined) floatingStackIndex = mouseSlot.slotIndex + else if (stack.item.id == "tiny:air" || floatingStackIndex == mouseSlot.slotIndex) { + floatingStackIndex = undefined + } } }