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

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
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.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.minecraft.world.Nameable, net.minecraft.world.WorldlyContainer, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.client.extensions.IMenuProviderExtension, net.neoforged.neoforge.common.extensions.IBlockEntityExtension, net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>

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.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    net.neoforged.neoforge.attachment.AttachmentHolder.AsField
  • Field Summary

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

    level, remove, worldPosition

    Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    ATTACHMENTS_NBT_KEY

    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, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setData, setLevel, setRemoved, triggerEvent

    Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    areAttachmentsCompatible, deserializeAttachments, getData, hasData, serializeAttachments

    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.neoforged.neoforge.attachment.IAttachmentHolder

    getData, hasData, setData

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension

    deserializeNBT, getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT

    Methods inherited from interface net.neoforged.neoforge.client.extensions.IMenuProviderExtension

    shouldTriggerClientSideContainerClosingOnOpen

    Methods inherited from interface net.minecraft.world.Nameable

    hasCustomName
  • 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