Skip to content

Commit

Permalink
fix locking mode in interface
Browse files Browse the repository at this point in the history
  • Loading branch information
GlodBlock committed Jul 11, 2024
1 parent 7c6ceef commit c7c1754
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import appeng.api.storage.channels.IItemStorageChannel;
import appeng.api.storage.data.IAEItemStack;
import appeng.util.inv.IAEAppEngInventory;
import appeng.util.inv.InvOperation;
import appeng.util.item.AEItemStack;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.wrapper.RangedWrapper;
Expand Down Expand Up @@ -37,8 +38,14 @@ public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate
if (overflow != null && overflow.getStackSize() == originAmt) {
return super.insertItem(slot, stack, simulate);
} else if (overflow != null) {
if (!simulate) {
this.getTileEntity().onChangeInventory(this, slot, InvOperation.INSERT, ItemStack.EMPTY, stack);
}
return overflow.createItemStack();
} else {
if (!simulate) {
this.getTileEntity().onChangeInventory(this, slot, InvOperation.INSERT, ItemStack.EMPTY, stack);
}
return ItemStack.EMPTY;
}
} else {
Expand Down

0 comments on commit c7c1754

Please sign in to comment.