Fix ME Portable Cell voiding/dupes & disabled slot idiocy
Fixes #383, fixes #299
This commit is contained in:
@@ -20,13 +20,14 @@ package appeng.client.gui.implementations;
|
|||||||
|
|
||||||
|
|
||||||
import appeng.api.implementations.guiobjects.IPortableCell;
|
import appeng.api.implementations.guiobjects.IPortableCell;
|
||||||
|
import appeng.container.implementations.ContainerMEPortableCell;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
||||||
|
|
||||||
public class GuiMEPortableCell extends GuiMEMonitorable {
|
public class GuiMEPortableCell extends GuiMEMonitorable {
|
||||||
|
|
||||||
public GuiMEPortableCell(final InventoryPlayer inventoryPlayer, final IPortableCell te) {
|
public GuiMEPortableCell(final InventoryPlayer inventoryPlayer, final IPortableCell te) {
|
||||||
super(inventoryPlayer, te);
|
super(inventoryPlayer, te, new ContainerMEPortableCell(inventoryPlayer, te));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -961,8 +961,12 @@ public abstract class AEBaseContainer extends Container {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, @NotNull EntityPlayer player) {
|
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, @NotNull EntityPlayer player) {
|
||||||
|
final var slot = this.getSlot(slotId);
|
||||||
|
if (slot instanceof SlotDisabled) {
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
if (slotId >= 0 && clickTypeIn == ClickType.PICKUP) {
|
if (slotId >= 0 && clickTypeIn == ClickType.PICKUP) {
|
||||||
final var slot = this.getSlot(slotId);
|
|
||||||
if (slot instanceof AppEngSlot appEngSlot) {
|
if (slot instanceof AppEngSlot appEngSlot) {
|
||||||
var slotStack = slot.getStack();
|
var slotStack = slot.getStack();
|
||||||
var draggedStack = this.invPlayer.getItemStack();
|
var draggedStack = this.invPlayer.getItemStack();
|
||||||
|
|||||||
Reference in New Issue
Block a user