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 pos, BlockState blockState) ShulkerBoxBlockEntity
(DyeColor color, BlockPos pos, BlockState blockState) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canPlaceItemThroughFace
(int index, ItemStack itemStack, Direction direction) Returnstrue
if automation can insert the given item in the given slot from the given side.boolean
canTakeItemThroughFace
(int index, ItemStack stack, Direction direction) Returnstrue
if automation can extract the given item in the given slot from the given side.protected AbstractContainerMenu
createMenu
(int id, Inventory player) private static void
doNeighborUpdates
(Level level, BlockPos pos, BlockState state) getBoundingBox
(BlockState state) getColor()
int
protected Component
protected NonNullList
<ItemStack> getItems()
float
getProgress
(float partialTicks) int[]
getSlotsForFace
(Direction side) boolean
isClosed()
protected void
loadAdditional
(CompoundTag tag, HolderLookup.Provider registries) void
loadFromTag
(CompoundTag tag, HolderLookup.Provider levelRegistry) private void
moveCollidedEntities
(Level level, BlockPos pos, BlockState state) protected void
saveAdditional
(CompoundTag tag, HolderLookup.Provider registries) protected void
setItems
(NonNullList<ItemStack> items) void
void
static void
tick
(Level level, BlockPos pos, BlockState state, ShulkerBoxBlockEntity blockEntity) boolean
triggerEvent
(int id, int type) private void
updateAnimation
(Level level, BlockPos pos, BlockState state) 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 level, BlockPos pos, BlockState state, ShulkerBoxBlockEntity blockEntity) -
updateAnimation
-
getAnimationStatus
-
getBoundingBox
-
moveCollidedEntities
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSize
in interfaceContainer
-
triggerEvent
public boolean triggerEvent(int id, int type) - 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 index, ItemStack itemStack, @Nullable Direction direction) 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 partialTicks) -
getColor
-
createMenu
- Specified by:
createMenu
in classBaseContainerBlockEntity
-
isClosed
public boolean isClosed()
-