Fix oversized slot weirdness (#331)

This commit is contained in:
Neeve
2023-12-20 13:52:07 +11:00
committed by GitHub
parent 7f83c73a28
commit 8fb12119ef
5 changed files with 64 additions and 47 deletions
@@ -27,7 +27,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.items.ItemHandlerHelper;
import net.minecraftforge.items.ItemStackHandler;
import javax.annotation.Nonnull;
@@ -46,7 +45,6 @@ public class AppEngInternalInventory extends ItemStackHandler implements Iterabl
protected ItemStack previousStack = ItemStack.EMPTY;
protected IAEItemFilter filter;
protected boolean dirtyFlag = false;
protected boolean limitExtraction;
public AppEngInternalInventory(final IAEAppEngInventory inventory, final int size, final int maxStack, IAEItemFilter filter) {
super(size);
@@ -221,8 +219,4 @@ public class AppEngInternalInventory extends ItemStackHandler implements Iterabl
public void setTileEntity(final IAEAppEngInventory te) {
this.te = te;
}
public void limitExtraction(boolean limitExtraction) {
this.limitExtraction = limitExtraction;
}
}
@@ -77,8 +77,6 @@ public class AppEngInternalOversizedInventory extends AppEngInternalInventory {
this.previousStack = this.getStackInSlot(slot).copy();
}
if (limitExtraction)
return super.extractItem(slot, amount, simulate);
if (amount == 0)
return ItemStack.EMPTY;