Class BaseSlot

java.lang.Object
net.minecraft.world.inventory.Slot
net.minecraftforge.items.SlotItemHandler
org.moddingx.libx.menu.slot.BaseSlot

public class BaseSlot extends net.minecraftforge.items.SlotItemHandler
A slot that is meant to be used together with BaseItemStackHandler. The slot will use the unrestricted item handler as inventory, but it will use the base inventory for mayPlace(ItemStack) to allow validators to run.
  • Field Summary

    Fields inherited from class net.minecraft.world.inventory.Slot

    container, x, y
  • Constructor Summary

    Constructors
    Constructor
    Description
    BaseSlot(net.minecraftforge.items.IItemHandler inventory, net.minecraftforge.items.IItemHandler unrestricted, int index, int x, int y)
    Creates a new BaseSlot with the given base and unrestricted inventory.
    BaseSlot(BaseItemStackHandler inventory, int index, int x, int y)
    Creates a new BaseSlot with the given BaseItemStackHandler
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    mayPlace(net.minecraft.world.item.ItemStack stack)
     

    Methods inherited from class net.minecraftforge.items.SlotItemHandler

    getItem, getItemHandler, getMaxStackSize, getMaxStackSize, initialize, mayPickup, onQuickCraft, remove, set

    Methods inherited from class net.minecraft.world.inventory.Slot

    allowModification, checkTakeAchievements, getContainerSlot, getNoItemIcon, getSlotIndex, hasItem, isActive, isHighlightable, isSameInventory, onQuickCraft, onSwapCraft, onTake, safeInsert, safeInsert, safeTake, setBackground, setByPlayer, setChanged, tryRemove

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BaseSlot

      public BaseSlot(BaseItemStackHandler inventory, int index, int x, int y)
      Creates a new BaseSlot with the given BaseItemStackHandler
    • BaseSlot

      public BaseSlot(net.minecraftforge.items.IItemHandler inventory, net.minecraftforge.items.IItemHandler unrestricted, int index, int x, int y)
      Creates a new BaseSlot with the given base and unrestricted inventory.
  • Method Details

    • mayPlace

      public boolean mayPlace(@Nonnull net.minecraft.world.item.ItemStack stack)
      Overrides:
      mayPlace in class net.minecraftforge.items.SlotItemHandler