Class ShelfBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.ShelfBlockEntity
- All Implemented Interfaces:
Iterable<ItemStack>,DebugValueSource,Clearable,Container,ItemOwner,ListBackedContainer,IAttachmentHolder,ContainerExtension,IBlockEntityExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.BlockEntityPathElementNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsFieldNested classes/interfaces inherited from interface net.minecraft.world.Container
Container.ContainerIteratorNested classes/interfaces inherited from interface net.minecraft.util.debug.DebugValueSource
DebugValueSource.Registration, DebugValueSource.ValueGetter<T>Nested classes/interfaces inherited from interface net.minecraft.world.entity.ItemOwner
ItemOwner.OffsetFromOwner -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate booleanprivate final NonNullList<ItemStack> private static final org.slf4j.Loggerstatic final intFields 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_BUFFER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyImplicitComponents(DataComponentGetter p_435051_) protected voidbooleangetItems()getUpdateTag(HolderLookup.Provider p_433122_) floatlevel()protected voidloadAdditional(ValueInput p_433152_) position()voidremoveComponentsFromTag(ValueOutput p_433784_) protected voidsaveAdditional(ValueOutput p_435995_) voidvoidsetChanged(Holder.Reference<GameEvent> pGameEvent) booleanstillValid(Player p_433189_) Don't rename this method to canInteractWith due to conflicts with ContainerswapItemNoUpdate(int pSlot, ItemStack pStack) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, preRemoveSideEffects, problemPath, registerDebugValues, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setComponents, setData, setLevel, setRemoved, syncData, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, 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.Container
canTakeItem, countItem, getEntitiesWithContainerOpen, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, iterator, startOpen, stopOpenMethods inherited from interface net.neoforged.neoforge.common.extensions.ContainerExtension
onTransfer, setItemMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdateMethods inherited from interface net.minecraft.world.entity.ItemOwner
asLivingEntityMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.minecraft.world.level.block.entity.ListBackedContainer
acceptsItemType, canPlaceItem, clearContent, count, getContainerSize, getItem, isEmpty, removeItem, removeItemNoUpdate, setItem, setItemNoUpdate
-
Field Details
-
MAX_ITEMS
public static final int MAX_ITEMS- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ALIGN_ITEMS_TO_BOTTOM_TAG
- See Also:
-
items
-
alignItemsToBottom
private boolean alignItemsToBottom
-
-
Constructor Details
-
ShelfBlockEntity
-
-
Method Details
-
loadAdditional
- Overrides:
loadAdditionalin classBlockEntity
-
saveAdditional
- Overrides:
saveAdditionalin classBlockEntity
-
getUpdatePacket
- Overrides:
getUpdatePacketin classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTagin classBlockEntity
-
getItems
- Specified by:
getItemsin interfaceListBackedContainer
-
stillValid
Description copied from interface:ContainerDon't rename this method to canInteractWith due to conflicts with Container- Specified by:
stillValidin interfaceContainer
-
swapItemNoUpdate
-
setChanged
-
setChanged
public void setChanged()- Specified by:
setChangedin interfaceContainer- Overrides:
setChangedin classBlockEntity
-
applyImplicitComponents
- Overrides:
applyImplicitComponentsin classBlockEntity
-
collectImplicitComponents
- Overrides:
collectImplicitComponentsin classBlockEntity
-
removeComponentsFromTag
- Overrides:
removeComponentsFromTagin classBlockEntity
-
level
-
position
-
getVisualRotationYInDegrees
public float getVisualRotationYInDegrees()- Specified by:
getVisualRotationYInDegreesin interfaceItemOwner
-
getAlignItemsToBottom
public boolean getAlignItemsToBottom()
-