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,SlotProvider,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(@Nullable Holder.Reference<GameEvent> gameEvent) voidSets the given item stack to the specified slot in the inventory (can be crafting or armor sections).voidAn extension ofContainer.setItem(int, ItemStack)that allows non-transactional side-effects to be skipped.booleanstillValid(Player p_433189_) swapItemNoUpdate(int slot, ItemStack stack) 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, getSlot, hasAnyMatching, hasAnyOf, iterator, startOpen, stopOpenMethods inherited from interface net.neoforged.neoforge.common.extensions.ContainerExtension
onTransferMethods 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, setItemNoUpdateMethods inherited from interface net.minecraft.world.entity.SlotProvider
getSlotsFromRange
-
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
- Specified by:
stillValidin interfaceContainer
-
swapItemNoUpdate
-
setItem
Description copied from interface:ContainerSets the given item stack to the specified slot in the inventory (can be crafting or armor sections).- Specified by:
setItemin interfaceContainer- Specified by:
setItemin interfaceListBackedContainer
-
setItem
Description copied from interface:ContainerExtensionAn extension ofContainer.setItem(int, ItemStack)that allows non-transactional side-effects to be skipped. Non-transactional side-effects include for example callingsetChangedor making changes to the world.- Specified by:
setItemin interfaceContainerExtension- Parameters:
insideTransaction- Whentrue, non-transactional actions should be deferred. Whenfalse, non-transactional actions can be performed immediately.- See Also:
-
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()
-