Search in sources :

Example 1 with IFakeSlot

use of convenientadditions.api.gui.container.IFakeSlot in project ConvenientAdditions by Necr0.

the class CAContainer method slotClick.

@Override
public ItemStack slotClick(int index, int button, ClickType mode, EntityPlayer player) {
    InventoryPlayer inventoryplayer = player.inventory;
    ItemStack held = inventoryplayer.getItemStack();
    if (index >= 0) {
        Slot s = getSlot(index);
        if (s instanceof IFakeSlot) {
            return ((IFakeSlot) s).slotClick(this, button, mode, player);
        }
    }
    return super.slotClick(index, button, mode, player);
}
Also used : InventoryPlayer(net.minecraft.entity.player.InventoryPlayer) IFakeSlot(convenientadditions.api.gui.container.IFakeSlot) Slot(net.minecraft.inventory.Slot) IFakeSlot(convenientadditions.api.gui.container.IFakeSlot) ItemStack(net.minecraft.item.ItemStack)

Aggregations

IFakeSlot (convenientadditions.api.gui.container.IFakeSlot)1 InventoryPlayer (net.minecraft.entity.player.InventoryPlayer)1 Slot (net.minecraft.inventory.Slot)1 ItemStack (net.minecraft.item.ItemStack)1