Class InventoryHelperForge

java.lang.Object
net.darkhax.bookshelf.impl.util.InventoryHelperForge
All Implemented Interfaces:
IInventoryHelper

public class InventoryHelperForge extends Object implements IInventoryHelper
  • Constructor Details

    • InventoryHelperForge

      public InventoryHelperForge()
  • Method Details

    • getCraftingPlayer

      public net.minecraft.world.entity.player.Player getCraftingPlayer(net.minecraft.world.Container container)
      Specified by:
      getCraftingPlayer in interface IInventoryHelper
    • canItemsStack

      public boolean canItemsStack(net.minecraft.world.item.ItemStack original, net.minecraft.world.item.ItemStack toStack)
      Description copied from interface: IInventoryHelper
      Checks if two ItemStack may be stacked together.
      Specified by:
      canItemsStack in interface IInventoryHelper
      Parameters:
      original - The original stack.
      toStack - The stack attempting to be stacked into the original.
      Returns:
      Can the two stacks be stacked together.
    • getInventory

      @Nullable public @Nullable IInventoryAccess getInventory(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, @Nullable @Nullable net.minecraft.core.Direction direction)
      Description copied from interface: IInventoryHelper
      Attempts to provide access to an inventory stored at the given position.
      Specified by:
      getInventory in interface IInventoryHelper
      Parameters:
      level - The world to query.
      pos - The position to look at.
      direction - The side of the inventory being accessed.
      Returns:
      Access to the inventory at the given position.
    • openMenu

      public void openMenu(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.MenuProvider provider, Consumer<net.minecraft.network.FriendlyByteBuf> buf, boolean allowFakes)
      Specified by:
      openMenu in interface IInventoryHelper
    • getCraftingRemainder

      public net.minecraft.world.item.ItemStack getCraftingRemainder(net.minecraft.world.item.ItemStack stack)
      Specified by:
      getCraftingRemainder in interface IInventoryHelper
    • hasCraftingRemainder

      public boolean hasCraftingRemainder(net.minecraft.world.item.ItemStack stack)
      Specified by:
      hasCraftingRemainder in interface IInventoryHelper
    • isFakePlayer

      public boolean isFakePlayer(net.minecraft.world.entity.player.Player player)
      Specified by:
      isFakePlayer in interface IInventoryHelper