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, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionWorldlyInventoryBlockEntity(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 TypeMethodDescriptionfinal booleancanPlaceItemThroughFace(int slotId, net.minecraft.world.item.ItemStack stack, net.minecraft.core.Direction side) final booleancanTakeItemThroughFace(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.darkhax.bookshelf.api.block.entity.InventoryBlockEntity
canPlaceItem, clearContent, countItem, createInventory, createMenu, dropContents, getContainerSize, getInventory, getItem, getMaxStackSize, hasAnyOf, isEmpty, load, markDirty, readInventory, removeItem, removeItemNoUpdate, saveAdditional, saveInventory, setChanged, setItem, startOpen, stillValid, stopOpenMethods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canOpen, canUnlock, createMenu, getCustomName, getDefaultName, getDisplayName, getName, setCustomNameMethods 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, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
areAttachmentsCompatible, deserializeAttachments, getData, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.Clearable
clearContentMethods inherited from interface net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getContainerSize, getItem, getMaxStackSize, hasAnyMatching, hasAnyOf, isEmpty, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpenMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, hasData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
deserializeNBT, getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBTMethods inherited from interface net.neoforged.neoforge.client.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpenMethods 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:
getSlotsForFacein interfacenet.minecraft.world.WorldlyContainer
-
canPlaceItemThroughFace
public final boolean canPlaceItemThroughFace(int slotId, net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.core.Direction side) - Specified by:
canPlaceItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
canTakeItemThroughFace
public final boolean canTakeItemThroughFace(int slotId, net.minecraft.world.item.ItemStack stack, net.minecraft.core.Direction side) - Specified by:
canTakeItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-