Class ShulkerBoxBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
net.minecraft.world.level.block.entity.ShulkerBoxBlockEntity
- All Implemented Interfaces:
Iterable<ItemStack>, TypedInstance<BlockEntityType<?>>, DebugValueSource, Clearable, Container, SlotProvider, MenuConstructor, MenuProvider, Nameable, RandomizableContainer, WorldlyContainer, IAttachmentHolder, ContainerExtension, IBlockEntityExtension, IMenuProviderExtension
public class ShulkerBoxBlockEntity
extends RandomizableContainerBlockEntity
implements WorldlyContainer
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AttachmentHolder
AttachmentHolder.AsFieldNested classes/interfaces inherited from interface Container
Container.ContainerIteratorNested classes/interfaces inherited from interface DebugValueSource
DebugValueSource.Registration, DebugValueSource.ValueGetter<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable DyeColorstatic final intstatic final intprivate static final Componentstatic final intprivate NonNullList<ItemStack> static final floatstatic final floatprivate intstatic final intprivate floatprivate floatstatic final intprivate static final int[]Fields inherited from class RandomizableContainerBlockEntity
lootTable, lootTableSeedFields inherited from class BlockEntity
level, remove, worldPositionFields inherited from class AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface Container
DEFAULT_DISTANCE_BUFFERFields inherited from interface RandomizableContainer
LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG -
Constructor Summary
ConstructorsConstructorDescriptionShulkerBoxBlockEntity(BlockPos worldPosition, BlockState blockState) ShulkerBoxBlockEntity(@Nullable DyeColor color, BlockPos worldPosition, BlockState blockState) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlaceItemThroughFace(int slot, ItemStack itemStack, @Nullable Direction direction) Returnstrueif automation can insert the given item in the given slot from the given side.booleancanTakeItemThroughFace(int slot, ItemStack itemStack, Direction direction) Returnstrueif automation can extract the given item in the given slot from the given side.protected AbstractContainerMenucreateMenu(int containerId, Inventory inventory) private static voiddoNeighborUpdates(Level level, BlockPos pos, BlockState blockState) getBoundingBox(BlockState state) @Nullable DyeColorgetColor()intprotected Componentprotected NonNullList<ItemStack> getItems()floatgetProgress(float a) int[]getSlotsForFace(Direction direction) booleanisClosed()protected voidloadAdditional(ValueInput input) voidloadFromTag(ValueInput input) private voidmoveCollidedEntities(Level level, BlockPos pos, BlockState state) voidpreRemoveSideEffects(BlockPos pos, BlockState state) protected voidsaveAdditional(ValueOutput output) protected voidsetItems(NonNullList<ItemStack> items) voidstartOpen(ContainerUser containerUser) voidstopOpen(ContainerUser containerUser) static voidtick(Level level, BlockPos pos, BlockState state, ShulkerBoxBlockEntity entity) booleantriggerEvent(int b0, int b1) private voidupdateAnimation(Level level, BlockPos pos, BlockState blockState) Methods inherited from class RandomizableContainerBlockEntity
applyImplicitComponents, canOpen, collectImplicitComponents, createMenu, getItem, getLootTable, getLootTableSeed, isEmpty, removeComponentsFromTag, removeItem, removeItemNoUpdate, setItem, setLootTable, setLootTableSeedMethods inherited from class BaseContainerBlockEntity
clearContent, getCustomName, getDisplayName, getName, isLocked, sendChestLockedNotifications, setItem, stillValidMethods inherited from class BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getAndClearAttachmentTypesToSync, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, problemPath, registerDebugValues, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, syncData, typeHolderMethods inherited from class AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Clearable
clearContentMethods inherited from interface Container
canPlaceItem, canTakeItem, countItem, getEntitiesWithContainerOpen, getItem, getMaxStackSize, getMaxStackSize, getSlot, hasAnyMatching, hasAnyOf, isEmpty, iterator, removeItem, removeItemNoUpdate, setChanged, setItem, stillValidMethods inherited from interface ContainerExtension
onTransfer, setItemMethods inherited from interface IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdateMethods inherited from interface IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpen, writeClientSideDataMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface Nameable
getPlainTextName, hasCustomNameMethods inherited from interface RandomizableContainer
getBlockPos, getLevel, setLootTable, tryLoadLootTable, trySaveLootTable, unpackLootTableMethods inherited from interface SlotProvider
getSlotsFromRange
-
Field Details
-
COLUMNS
public static final int COLUMNS- See Also:
-
ROWS
public static final int ROWS- See Also:
-
CONTAINER_SIZE
public static final int CONTAINER_SIZE- See Also:
-
EVENT_SET_OPEN_COUNT
public static final int EVENT_SET_OPEN_COUNT- See Also:
-
OPENING_TICK_LENGTH
public static final int OPENING_TICK_LENGTH- See Also:
-
MAX_LID_HEIGHT
public static final float MAX_LID_HEIGHT- See Also:
-
MAX_LID_ROTATION
public static final float MAX_LID_ROTATION- See Also:
-
SLOTS
private static final int[] SLOTS -
DEFAULT_NAME
-
itemStacks
-
openCount
private int openCount -
animationStatus
-
progress
private float progress -
progressOld
private float progressOld -
color
-
-
Constructor Details
-
ShulkerBoxBlockEntity
public ShulkerBoxBlockEntity(@Nullable DyeColor color, BlockPos worldPosition, BlockState blockState) -
ShulkerBoxBlockEntity
-
-
Method Details
-
tick
-
updateAnimation
-
getAnimationStatus
-
getBoundingBox
-
moveCollidedEntities
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfaceContainer
-
triggerEvent
public boolean triggerEvent(int b0, int b1) - Overrides:
triggerEventin classBlockEntity
-
doNeighborUpdates
-
preRemoveSideEffects
- Overrides:
preRemoveSideEffectsin classBlockEntity
-
startOpen
-
stopOpen
-
getDefaultName
- Specified by:
getDefaultNamein classBaseContainerBlockEntity
-
loadAdditional
- Overrides:
loadAdditionalin classBaseContainerBlockEntity
-
saveAdditional
- Overrides:
saveAdditionalin classBaseContainerBlockEntity
-
loadFromTag
-
getItems
- Specified by:
getItemsin classBaseContainerBlockEntity
-
setItems
- Specified by:
setItemsin classBaseContainerBlockEntity
-
getSlotsForFace
- Specified by:
getSlotsForFacein interfaceWorldlyContainer
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int slot, ItemStack itemStack, @Nullable Direction direction) Description copied from interface:WorldlyContainerReturnstrueif automation can insert the given item in the given slot from the given side.- Specified by:
canPlaceItemThroughFacein interfaceWorldlyContainer
-
canTakeItemThroughFace
Description copied from interface:WorldlyContainerReturnstrueif automation can extract the given item in the given slot from the given side.- Specified by:
canTakeItemThroughFacein interfaceWorldlyContainer
-
getProgress
public float getProgress(float a) -
getColor
-
createMenu
- Specified by:
createMenuin classBaseContainerBlockEntity
-
isClosed
public boolean isClosed()
-