Search in sources :

Example 1 with DummySlot

use of logisticspipes.utils.gui.DummySlot in project LogisticsPipes by RS485.

the class DummyContainerSlotClick method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    if (player instanceof EntityPlayerMP && ((EntityPlayerMP) player).openContainer instanceof DummyContainer) {
        DummyContainer container = (DummyContainer) ((EntityPlayerMP) player).openContainer;
        Slot slot = (Slot) container.inventorySlots.get(slotId);
        if (slot instanceof DummySlot || slot instanceof ColorSlot || slot instanceof FluidSlot) {
            container.handleDummyClick(slot, slotId, stack, button, 0, player);
        }
    }
}
Also used : DummyContainer(logisticspipes.utils.gui.DummyContainer) ColorSlot(logisticspipes.utils.gui.ColorSlot) DummySlot(logisticspipes.utils.gui.DummySlot) FluidSlot(logisticspipes.utils.gui.FluidSlot) ColorSlot(logisticspipes.utils.gui.ColorSlot) Slot(net.minecraft.inventory.Slot) DummySlot(logisticspipes.utils.gui.DummySlot) EntityPlayerMP(net.minecraft.entity.player.EntityPlayerMP) FluidSlot(logisticspipes.utils.gui.FluidSlot)

Aggregations

ColorSlot (logisticspipes.utils.gui.ColorSlot)1 DummyContainer (logisticspipes.utils.gui.DummyContainer)1 DummySlot (logisticspipes.utils.gui.DummySlot)1 FluidSlot (logisticspipes.utils.gui.FluidSlot)1 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)1 Slot (net.minecraft.inventory.Slot)1