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>,Clearable,Container,MenuConstructor,MenuProvider,Nameable,RandomizableContainer,WorldlyContainer,IAttachmentHolder,IBlockEntityExtension,IMenuProviderExtension
public class ShulkerBoxBlockEntity
extends RandomizableContainerBlockEntity
implements WorldlyContainer
-
Nested Class Summary
Nested ClassesNested 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.ContainerIterator -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DyeColorstatic final intstatic final intstatic final intprivate NonNullList<ItemStack> static final floatstatic final floatprivate intstatic final intprivate floatprivate floatstatic final intprivate static final int[]Fields inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
lootTable, lootTableSeedFields 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_BUFFERFields inherited from interface net.minecraft.world.RandomizableContainer
LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG -
Constructor Summary
ConstructorsConstructorDescriptionShulkerBoxBlockEntity(BlockPos pPos, BlockState pBlockState) ShulkerBoxBlockEntity(DyeColor pColor, BlockPos pPos, BlockState pBlockState) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlaceItemThroughFace(int pIndex, ItemStack pItemStack, Direction pDirection) Returnstrueif automation can insert the given item in the given slot from the given side.booleancanTakeItemThroughFace(int pIndex, ItemStack pStack, Direction pDirection) Returnstrueif automation can extract the given item in the given slot from the given side.protected AbstractContainerMenucreateMenu(int pId, Inventory pPlayer) private static voiddoNeighborUpdates(Level pLevel, BlockPos pPos, BlockState pState) getBoundingBox(BlockState pState) getColor()intprotected Componentprotected NonNullList<ItemStack> getItems()floatgetProgress(float pPartialTicks) int[]getSlotsForFace(Direction pSide) booleanisClosed()protected voidloadAdditional(ValueInput pInput) voidloadFromTag(ValueInput pInput) private voidmoveCollidedEntities(Level pLevel, BlockPos pPos, BlockState pState) voidpreRemoveSideEffects(BlockPos pPos, BlockState pState) protected voidsaveAdditional(ValueOutput pOutput) protected voidsetItems(NonNullList<ItemStack> pItems) voidvoidstatic voidtick(Level pLevel, BlockPos pPos, BlockState pState, ShulkerBoxBlockEntity pBlockEntity) booleantriggerEvent(int pId, int pType) private voidupdateAnimation(Level pLevel, BlockPos pPos, BlockState pState) Methods inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
applyImplicitComponents, canOpen, collectImplicitComponents, createMenu, getItem, getLootTable, getLootTableSeed, isEmpty, removeComponentsFromTag, removeItem, removeItemNoUpdate, setItem, setLootTable, setLootTableSeedMethods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canUnlock, clearContent, getCustomName, getDisplayName, getName, stillValidMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, problemPath, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, syncDataMethods 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.Clearable
clearContentMethods inherited from interface net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, isEmpty, iterator, removeItem, removeItemNoUpdate, setChanged, setItem, stillValidMethods 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, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdateMethods inherited from interface net.neoforged.neoforge.common.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpen, writeClientSideDataMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.minecraft.world.Nameable
hasCustomNameMethods inherited from interface net.minecraft.world.RandomizableContainer
getBlockPos, getLevel, setLootTable, tryLoadLootTable, trySaveLootTable, unpackLootTable
-
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 -
itemStacks
-
openCount
private int openCount -
animationStatus
-
progress
private float progress -
progressOld
private float progressOld -
color
-
-
Constructor Details
-
ShulkerBoxBlockEntity
-
ShulkerBoxBlockEntity
-
-
Method Details
-
tick
public static void tick(Level pLevel, BlockPos pPos, BlockState pState, ShulkerBoxBlockEntity pBlockEntity) -
updateAnimation
-
getAnimationStatus
-
getBoundingBox
-
moveCollidedEntities
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfaceContainer
-
triggerEvent
public boolean triggerEvent(int pId, int pType) - 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 pIndex, ItemStack pItemStack, @Nullable Direction pDirection) Returnstrueif automation can insert the given item in the given slot from the given side.- Specified by:
canPlaceItemThroughFacein interfaceWorldlyContainer
-
canTakeItemThroughFace
Returnstrueif automation can extract the given item in the given slot from the given side.- Specified by:
canTakeItemThroughFacein interfaceWorldlyContainer
-
getProgress
public float getProgress(float pPartialTicks) -
getColor
-
createMenu
- Specified by:
createMenuin classBaseContainerBlockEntity
-
isClosed
public boolean isClosed()
-