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:
Clearable
,Container
,MenuConstructor
,MenuProvider
,Nameable
,RandomizableContainer
,WorldlyContainer
,IAttachmentHolder
,IMenuProviderExtension
,IBlockEntityExtension
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.ComponentHelper, BlockEntity.DataComponentInput
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DyeColor
static final int
static final int
static final int
private NonNullList
<ItemStack> static final float
static final float
private int
static final int
private float
private float
static final int
private static final int[]
Fields inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
lootTable, lootTableSeed
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER
Fields 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 TypeMethodDescriptionboolean
canPlaceItemThroughFace
(int pIndex, ItemStack pItemStack, Direction pDirection) Returnstrue
if automation can insert the given item in the given slot from the given side.boolean
canTakeItemThroughFace
(int pIndex, ItemStack pStack, Direction pDirection) Returnstrue
if automation can extract the given item in the given slot from the given side.protected AbstractContainerMenu
createMenu
(int pId, Inventory pPlayer) private static void
doNeighborUpdates
(Level pLevel, BlockPos pPos, BlockState pState) getBoundingBox
(BlockState pState) getColor()
int
protected Component
protected NonNullList
<ItemStack> getItems()
float
getProgress
(float pPartialTicks) int[]
getSlotsForFace
(Direction pSide) boolean
isClosed()
protected void
loadAdditional
(CompoundTag pTag, HolderLookup.Provider pRegistries) void
loadFromTag
(CompoundTag pTag, HolderLookup.Provider pLevelRegistry) private void
moveCollidedEntities
(Level pLevel, BlockPos pPos, BlockState pState) protected void
saveAdditional
(CompoundTag pTag, HolderLookup.Provider pRegistries) protected void
setItems
(NonNullList<ItemStack> pItems) void
void
static void
tick
(Level pLevel, BlockPos pPos, BlockState pState, ShulkerBoxBlockEntity pBlockEntity) boolean
triggerEvent
(int pId, int pType) private void
updateAnimation
(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, setLootTableSeed
Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canUnlock, clearContent, getCustomName, getDisplayName, getName, stillValid
Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.Clearable
clearContent
Methods inherited from interface net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, isEmpty, removeItem, removeItemNoUpdate, setChanged, setItem, stillValid
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
Methods inherited from interface net.neoforged.neoforge.client.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpen, writeClientSideData
Methods inherited from interface net.minecraft.world.Nameable
hasCustomName
Methods 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:
getContainerSize
in interfaceContainer
-
triggerEvent
public boolean triggerEvent(int pId, int pType) - Overrides:
triggerEvent
in classBlockEntity
-
doNeighborUpdates
-
startOpen
-
stopOpen
-
getDefaultName
- Specified by:
getDefaultName
in classBaseContainerBlockEntity
-
loadAdditional
- Overrides:
loadAdditional
in classBaseContainerBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBaseContainerBlockEntity
-
loadFromTag
-
getItems
- Specified by:
getItems
in classBaseContainerBlockEntity
-
setItems
- Specified by:
setItems
in classBaseContainerBlockEntity
-
getSlotsForFace
- Specified by:
getSlotsForFace
in interfaceWorldlyContainer
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int pIndex, ItemStack pItemStack, @Nullable Direction pDirection) Returnstrue
if automation can insert the given item in the given slot from the given side.- Specified by:
canPlaceItemThroughFace
in interfaceWorldlyContainer
-
canTakeItemThroughFace
Returnstrue
if automation can extract the given item in the given slot from the given side.- Specified by:
canTakeItemThroughFace
in interfaceWorldlyContainer
-
getProgress
public float getProgress(float pPartialTicks) -
getColor
-
createMenu
- Specified by:
createMenu
in classBaseContainerBlockEntity
-
isClosed
public boolean isClosed()
-