Skip to content

Commit

Permalink
remove dep
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Feb 8, 2024
1 parent c298d95 commit 532a2ed
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,12 @@ public long getTotalItems(BlockPos pos) {
public void assertAnyContained(BlockPos pos, Item... items) {
Storage<ItemVariant> storage = itemStorageAt(pos);
boolean noneFound = true;
for (Item item : items) {
if (storage.extract(ItemVariant.of(item), 1, null) > 0) {
noneFound = false;
break;
try (Transaction t = TransferUtil.getTransaction()) {
for (Item item : items) {
if (storage.extract(ItemVariant.of(item), 1, t) > 0) {
noneFound = false;
break;
}
}
}
if (noneFound)
Expand Down

0 comments on commit 532a2ed

Please sign in to comment.