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>,IForgeBlockEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>> -
Field Summary
FieldsModifier 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.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFERFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbooleancanPlaceItem(int p_256567_, ItemStack p_255922_) booleancanTakeItem(Container p_282172_, int p_281387_, ItemStack p_283257_) voidprotected 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()protected voidloadAdditional(CompoundTag p_332537_, HolderLookup.Provider p_330403_) voidremoveComponentsFromTag(CompoundTag p_329882_) removeItem(int p_255828_, int p_255673_) removeItemNoUpdate(int p_255874_) voidprotected voidsaveAdditional(CompoundTag p_251872_, HolderLookup.Provider p_331563_) voidbooleanstillValid(Player p_256481_) private voidupdateState(int p_261806_) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadCustomOnly, loadStatic, loadWithComponents, onChunkUnloaded, onlyOpCanSetNbt, parseCustomNameSafe, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setLevel, setRemoved, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
countItem, getMaxStackSize, hasAnyMatching, hasAnyOf, setChanged, startOpen, stopOpenMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate
-
Field Details
-
MAX_BOOKS_IN_STORAGE
public static final int MAX_BOOKS_IN_STORAGE- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
items
-
lastInteractedSlot
private int lastInteractedSlot -
itemHandler
-
-
Constructor Details
-
ChiseledBookShelfBlockEntity
-
-
Method Details
-
updateState
private void updateState(int p_261806_) -
loadAdditional
- Overrides:
loadAdditionalin classBlockEntity
-
saveAdditional
- Overrides:
saveAdditionalin classBlockEntity
-
count
public int count() -
clearContent
public void clearContent()- Specified by:
clearContentin interfaceClearable
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfaceContainer
-
isEmpty
public boolean isEmpty() -
getItem
-
removeItem
- Specified by:
removeItemin interfaceContainer
-
removeItemNoUpdate
- Specified by:
removeItemNoUpdatein interfaceContainer
-
setItem
-
canTakeItem
- Specified by:
canTakeItemin interfaceContainer
-
getMaxStackSize
public int getMaxStackSize()- Specified by:
getMaxStackSizein interfaceContainer
-
stillValid
- Specified by:
stillValidin interfaceContainer
-
canPlaceItem
- Specified by:
canPlaceItemin interfaceContainer
-
getLastInteractedSlot
public int getLastInteractedSlot() -
applyImplicitComponents
- Overrides:
applyImplicitComponentsin classBlockEntity
-
collectImplicitComponents
- Overrides:
collectImplicitComponentsin classBlockEntity
-
removeComponentsFromTag
- Overrides:
removeComponentsFromTagin classBlockEntity
-
createUnSidedHandler
-
getCapability
Description 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 interfaceICapabilityProvider- Overrides:
getCapabilityin classCapabilityProvider<BlockEntity>- Parameters:
cap- The capability to checkside- 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.
-
invalidateCaps
public void invalidateCaps()- Specified by:
invalidateCapsin interfaceICapabilityProviderImpl<BlockEntity>- Overrides:
invalidateCapsin classCapabilityProvider<BlockEntity>
-
reviveCaps
public void reviveCaps()- Specified by:
reviveCapsin interfaceICapabilityProviderImpl<BlockEntity>- Overrides:
reviveCapsin classCapabilityProvider<BlockEntity>
-