Skip to content

Commit

Permalink
fix previous commit
Browse files Browse the repository at this point in the history
item stacks were swapped incorrectly
  • Loading branch information
j0code committed Feb 29, 2024
1 parent f593c01 commit 25dee2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/util/Container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}

Expand Down

0 comments on commit 25dee2b

Please sign in to comment.