Skip to content

Commit

Permalink
Fabric: fix extraction not checking for resource type
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n committed Feb 12, 2024
1 parent e28c64a commit 62b7f55
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public long extract(ItemVariant resource, long maxAmount, TransactionContext tra
StoragePreconditions.notBlankNotNegative(resource, maxAmount);
int amount = Ints.saturatedCast(maxAmount);

if (!inventory.extractItem(slot, amount, true).isEmpty()) {
if (resource.matches(inventory.extractItem(slot, amount, true))) {
updateSnapshots(transaction);
inventory.setSendUpdates(false);
var extracted = inventory.extractItem(slot, amount, false);
Expand Down Expand Up @@ -94,7 +94,7 @@ protected ItemStack createSnapshot() {
protected void readSnapshot(ItemStack snapshot) {
inventory.setSendUpdates(false);
inventory.setStackInSlot(slot, snapshot);
inventory.setSendUpdates(false);
inventory.setSendUpdates(true);
}

@Override
Expand Down

0 comments on commit 62b7f55

Please sign in to comment.