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
@@ -28,13 +28,8 @@ import appeng.container.guisync.GuiSync;
import appeng.container.slot.*;
import appeng.helpers.DualityInterface;
import appeng.helpers.IInterfaceHost;
import appeng.tile.inventory.AppEngInternalInventory;
import appeng.tile.inventory.AppEngInternalOversizedInventory;
import appeng.util.Platform;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ClickType;
import net.minecraft.item.ItemStack;
public class ContainerInterface extends ContainerUpgradeable implements IOptionalSlotHost {
@@ -71,19 +66,6 @@ public class ContainerInterface extends ContainerUpgradeable implements IOptiona
}
}
@Override
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) {
if (slotId >= 0 && slotId < this.inventorySlots.size()) {
if (this.inventorySlots.get(slotId) instanceof SlotOversized) {
((AppEngInternalOversizedInventory) ((SlotOversized) this.inventorySlots.get(slotId)).getItemHandler()).limitExtraction(true);
ItemStack ret = super.slotClick(slotId, dragType, clickTypeIn, player);
((AppEngInternalOversizedInventory) ((SlotOversized) this.inventorySlots.get(slotId)).getItemHandler()).limitExtraction(false);
return ret;
}
}
return super.slotClick(slotId, dragType, clickTypeIn, player);
}
@Override
protected int getHeight() {
return 256;