Fix OpenInv crash (#512)

This commit is contained in:
IzzelAliz 2022-03-07 15:27:58 +08:00
parent 04b7a110f8
commit 9010e2e302
No known key found for this signature in database
GPG Key ID: EE50E123A11D8338

View File

@ -32,7 +32,7 @@ public abstract class InventoryMixin implements Container, IInventoryBridge, Pla
@Shadow protected abstract boolean hasRemainingSpaceForItem(ItemStack stack1, ItemStack stack2);
// @formatter:on
private List<HumanEntity> transactions = new ArrayList<>();
private List<HumanEntity> transaction = new ArrayList<>();
private int maxStack = MAX_STACK;
public int canHold(ItemStack stack) {
@ -75,17 +75,17 @@ public abstract class InventoryMixin implements Container, IInventoryBridge, Pla
@Override
public void onOpen(CraftHumanEntity who) {
transactions.add(who);
transaction.add(who);
}
@Override
public void onClose(CraftHumanEntity who) {
transactions.remove(who);
transaction.remove(who);
}
@Override
public List<HumanEntity> getViewers() {
return transactions;
return transaction;
}
@Override