Skip to content

Commit 6cf227a

Browse files
committed
[Fix]: Fix a bug where Controller blocks would randomly stop inserting items
1 parent 768d239 commit 6cf227a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/net/p3pp3rf1y/sophisticatedcore/controller/ControllerBlockEntityBase.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ public long insert(ItemVariant resource, long maxAmount, @Nullable TransactionCo
648648
}
649649
}
650650

651-
return (insertIntoAnyEmpty ? insertIntoStorages(emptySlotsStorages, resource, remaining, ctx, false) : maxAmount - remaining);
651+
return maxAmount - (insertIntoAnyEmpty ? insertIntoStorages(emptySlotsStorages, resource, remaining, ctx, false) : remaining);
652652
}
653653

654654
private long insertIntoStoragesThatMatchStack(ItemVariant resource, long maxAmount, ItemStackKey stackKey, @Nullable TransactionContext ctx) {

0 commit comments

Comments
 (0)