Skip to content

Commit

Permalink
fix threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Feb 18, 2024
1 parent 7ed7a2a commit cd4f9b8
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,13 @@ public void updateCurrentLevel() {
if (observedInventory.hasInventory()) {

// Item inventory
try (Transaction t = TransferUtil.getTransaction()) {
Storage<ItemVariant> inv = observedInventory.getInventory();
if (invVersionTracker.stillWaiting(inv)) {
occupied = prevLevel;
totalSpace = 1f;

} else {
invVersionTracker.awaitNewVersion(inv);
Storage<ItemVariant> inv = observedInventory.getInventory();
if (invVersionTracker.stillWaiting(inv)) {
occupied = prevLevel;
totalSpace = 1f;
} else {
invVersionTracker.awaitNewVersion(inv);
try (Transaction t = TransferUtil.getTransaction()) {
for (StorageView<ItemVariant> view : inv) {
long space = view.getCapacity();
long count = view.getAmount();
Expand Down

0 comments on commit cd4f9b8

Please sign in to comment.