Class ChiseledBookShelfBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.ChiseledBookShelfBlockEntity
- All Implemented Interfaces:
- Clearable,- Container,- ICapabilityProvider,- ICapabilityProviderImpl<BlockEntity>,- ICapabilitySerializable<CompoundTag>,- IForgeBlockEntity,- INBTSerializable<CompoundTag>
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProviderCapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate LazyOptional<?>private final NonNullList<ItemStack>private intprivate static final org.slf4j.Loggerstatic final intFields inherited from class net.minecraft.world.level.block.entity.BlockEntitylevel, remove, worldPositionFields inherited from interface net.minecraft.world.ContainerDEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZEFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntityINFINITE_EXTENT_AABB
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanPlaceItem(int p_256567_, ItemStack p_255922_) booleancanTakeItem(Container p_282172_, int p_281387_, ItemStack p_283257_) voidintcount()protected IItemHandler<T> LazyOptional<T>getCapability(Capability<T> cap, Direction side) Retrieves the Optional handler for the capability requested on the specific side.intgetItem(int p_256203_) intintvoidbooleanisEmpty()voidload(CompoundTag p_249911_) removeItem(int p_255828_, int p_255673_) removeItemNoUpdate(int p_255874_) voidprotected voidsaveAdditional(CompoundTag p_251872_) voidbooleanstillValid(Player p_256481_) private voidupdateState(int p_261806_) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntityaddEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProviderareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCapsMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.ContainercountItem, hasAnyMatching, hasAnyOf, setChanged, startOpen, stopOpenMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvidergetCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntitydeserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
- 
Field Details- 
MAX_BOOKS_IN_STORAGEpublic static final int MAX_BOOKS_IN_STORAGE- See Also:
 
- 
LOGGERprivate static final org.slf4j.Logger LOGGER
- 
items
- 
lastInteractedSlotprivate int lastInteractedSlot
- 
itemHandler
 
- 
- 
Constructor Details- 
ChiseledBookShelfBlockEntity
 
- 
- 
Method Details- 
updateStateprivate void updateState(int p_261806_) 
- 
load- Overrides:
- loadin class- BlockEntity
 
- 
saveAdditional- Overrides:
- saveAdditionalin class- BlockEntity
 
- 
countpublic int count()
- 
clearContentpublic void clearContent()- Specified by:
- clearContentin interface- Clearable
 
- 
getContainerSizepublic int getContainerSize()- Specified by:
- getContainerSizein interface- Container
 
- 
isEmptypublic boolean isEmpty()
- 
getItem
- 
removeItem- Specified by:
- removeItemin interface- Container
 
- 
removeItemNoUpdate- Specified by:
- removeItemNoUpdatein interface- Container
 
- 
setItem
- 
canTakeItem- Specified by:
- canTakeItemin interface- Container
 
- 
getMaxStackSizepublic int getMaxStackSize()- Specified by:
- getMaxStackSizein interface- Container
 
- 
stillValid- Specified by:
- stillValidin interface- Container
 
- 
canPlaceItem- Specified by:
- canPlaceItemin interface- Container
 
- 
getLastInteractedSlotpublic int getLastInteractedSlot()
- 
createUnSidedHandler
- 
getCapabilityDescription copied from interface:ICapabilityProviderRetrieves the Optional handler for the capability requested on the specific side. The return value CAN be the same for multiple faces. Modders are encouraged to cache this value, using the listener capabilities of the Optional to be notified if the requested capability get lost.- Specified by:
- getCapabilityin interface- ICapabilityProvider
- Overrides:
- getCapabilityin class- CapabilityProvider<BlockEntity>
- Parameters:
- cap- The capability to check
- side- The Side to check from, CAN BE NULL. Null is defined to represent 'internal' or 'self'
- Returns:
- The requested an optional holding the requested capability.
 
- 
invalidateCapspublic void invalidateCaps()- Specified by:
- invalidateCapsin interface- ICapabilityProviderImpl<BlockEntity>
- Overrides:
- invalidateCapsin class- CapabilityProvider<BlockEntity>
 
- 
reviveCapspublic void reviveCaps()- Specified by:
- reviveCapsin interface- ICapabilityProviderImpl<BlockEntity>
- Overrides:
- reviveCapsin class- CapabilityProvider<BlockEntity>
 
 
-