Class WorldlyInventoryBlockEntity<T extends net.minecraft.world.Container>

java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.darkhax.bookshelf.api.block.entity.InventoryBlockEntity<T>
net.darkhax.bookshelf.api.block.entity.WorldlyInventoryBlockEntity<T>
Type Parameters:
T - The type of inventory held by the BlockEntity.
All Implemented Interfaces:
net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity, net.fabricmc.fabric.api.screenhandler.v1.FabricScreenHandlerFactory, net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.minecraft.world.Nameable, net.minecraft.world.WorldlyContainer

public abstract class WorldlyInventoryBlockEntity<T extends net.minecraft.world.Container> extends InventoryBlockEntity<T> implements net.minecraft.world.WorldlyContainer
An implementation of InventoryBlockEntity that allows the inventory to be externally accessed by stuff like hoppers.
  • Field Summary

    Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity

    level, remove, worldPosition

    Fields inherited from interface net.minecraft.world.Container

    DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    WorldlyInventoryBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    canPlaceItemThroughFace(int slotId, net.minecraft.world.item.ItemStack stack, net.minecraft.core.Direction side)
     
    final boolean
    canTakeItemThroughFace(int slotId, net.minecraft.world.item.ItemStack stack, net.minecraft.core.Direction side)
     
    final int[]
    getSlotsForFace(net.minecraft.core.Direction side)
     

    Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity

    canOpen, canUnlock, createMenu, getCustomName, getDefaultName, getDisplayName, getName, setCustomName

    Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity

    addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setLevel, setRemoved, triggerEvent

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.world.Clearable

    clearContent

    Methods inherited from interface net.minecraft.world.Container

    canPlaceItem, canTakeItem, countItem, getContainerSize, getItem, getMaxStackSize, hasAnyMatching, hasAnyOf, isEmpty, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpen

    Methods inherited from interface net.fabricmc.fabric.api.screenhandler.v1.FabricScreenHandlerFactory

    shouldCloseCurrentScreen

    Methods inherited from interface net.minecraft.world.Nameable

    hasCustomName

    Methods inherited from interface net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity

    getRenderData
  • Constructor Details

    • WorldlyInventoryBlockEntity

      public WorldlyInventoryBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • getSlotsForFace

      public final int[] getSlotsForFace(net.minecraft.core.Direction side)
      Specified by:
      getSlotsForFace in interface net.minecraft.world.WorldlyContainer
    • canPlaceItemThroughFace

      public final boolean canPlaceItemThroughFace(int slotId, net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.core.Direction side)
      Specified by:
      canPlaceItemThroughFace in interface net.minecraft.world.WorldlyContainer
    • canTakeItemThroughFace

      public final boolean canTakeItemThroughFace(int slotId, net.minecraft.world.item.ItemStack stack, net.minecraft.core.Direction side)
      Specified by:
      canTakeItemThroughFace in interface net.minecraft.world.WorldlyContainer