Class OutputSlot

java.lang.Object
net.minecraft.world.inventory.Slot
net.darkhax.bookshelf.common.api.menu.slot.OutputSlot

public class OutputSlot extends net.minecraft.world.inventory.Slot
A basic output slot implementation.
  • Field Summary

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

    container, index, x, y
  • Constructor Summary

    Constructors
    Constructor
    Description
    OutputSlot(net.minecraft.world.Container potContainer, int slot, int x, int y)
     
    OutputSlot(net.minecraft.world.Container potContainer, int slot, int x, int y, @Nullable BiConsumer<net.minecraft.world.entity.player.Player,net.minecraft.world.item.ItemStack> takeFunc)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    mayPlace(@NotNull net.minecraft.world.item.ItemStack stack)
     
    void
    onTake(@NotNull net.minecraft.world.entity.player.Player player, @NotNull net.minecraft.world.item.ItemStack stack)
     

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

    allowModification, checkTakeAchievements, getContainerSlot, getItem, getMaxStackSize, getMaxStackSize, getNoItemIcon, getSlotIndex, hasItem, isActive, isFake, isHighlightable, isSameInventory, mayPickup, onQuickCraft, onQuickCraft, onSwapCraft, remove, safeInsert, safeInsert, safeTake, set, setBackground, setByPlayer, setByPlayer, setChanged, tryRemove

    Methods inherited from class java.lang.Object

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

    • OutputSlot

      public OutputSlot(net.minecraft.world.Container potContainer, int slot, int x, int y)
    • OutputSlot

      public OutputSlot(net.minecraft.world.Container potContainer, int slot, int x, int y, @Nullable @Nullable BiConsumer<net.minecraft.world.entity.player.Player,net.minecraft.world.item.ItemStack> takeFunc)
  • Method Details

    • mayPlace

      public boolean mayPlace(@NotNull @NotNull net.minecraft.world.item.ItemStack stack)
      Overrides:
      mayPlace in class net.minecraft.world.inventory.Slot
    • onTake

      public void onTake(@NotNull @NotNull net.minecraft.world.entity.player.Player player, @NotNull @NotNull net.minecraft.world.item.ItemStack stack)
      Overrides:
      onTake in class net.minecraft.world.inventory.Slot