Package net.minecraft.tileentity
Class ShulkerBoxTileEntity
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<TileEntity>
-
- net.minecraft.tileentity.TileEntity
-
- net.minecraft.tileentity.LockableTileEntity
-
- net.minecraft.tileentity.LockableLootTileEntity
-
- net.minecraft.tileentity.ShulkerBoxTileEntity
-
- All Implemented Interfaces:
IContainerProvider
,INamedContainerProvider
,IClearable
,IInventory
,ISidedInventory
,ITickableTileEntity
,INameable
,ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeTileEntity
,INBTSerializable<CompoundNBT>
public class ShulkerBoxTileEntity extends LockableLootTileEntity implements ISidedInventory, ITickableTileEntity
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ShulkerBoxTileEntity.AnimationStatus
-
Field Summary
Fields Modifier and Type Field Description private ShulkerBoxTileEntity.AnimationStatus
animationStatus
private DyeColor
color
private NonNullList<ItemStack>
itemStacks
private boolean
loadColorFromBlock
private int
openCount
private float
progress
private float
progressOld
private static int[]
SLOTS
-
Fields inherited from class net.minecraft.tileentity.LockableLootTileEntity
lootTable, lootTableSeed
-
Fields inherited from class net.minecraft.tileentity.TileEntity
level, remove, worldPosition
-
Fields inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
INFINITE_EXTENT_AABB
-
-
Constructor Summary
Constructors Constructor Description ShulkerBoxTileEntity()
ShulkerBoxTileEntity(DyeColor p_i47242_1_)
-
Method Summary
-
Methods inherited from class net.minecraft.tileentity.LockableLootTileEntity
canOpen, clearContent, createMenu, getItem, isEmpty, removeItem, removeItemNoUpdate, setItem, setLootTable, setLootTable, stillValid, tryLoadLootTable, trySaveLootTable, unpackLootTable
-
Methods inherited from class net.minecraft.tileentity.LockableTileEntity
canUnlock, getCapability, getCustomName, getDisplayName, getName, invalidateCaps, setCustomName
-
Methods inherited from class net.minecraft.tileentity.TileEntity
clearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdatePacket, getUpdateTag, getViewDistance, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, onlyOpCanSetNbt, rotate, setChanged, setLevelAndPosition, setPosition, setRemoved
-
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCaps
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
-
Methods inherited from interface net.minecraft.inventory.IClearable
clearContent
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
deserializeNBT, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
Methods inherited from interface net.minecraft.inventory.IInventory
canPlaceItem, countItem, getItem, getMaxStackSize, hasAnyOf, isEmpty, removeItem, removeItemNoUpdate, setChanged, setItem, stillValid
-
Methods inherited from interface net.minecraft.util.INameable
hasCustomName
-
-
-
-
Field Detail
-
SLOTS
private static final int[] SLOTS
-
itemStacks
private NonNullList<ItemStack> itemStacks
-
openCount
private int openCount
-
animationStatus
private ShulkerBoxTileEntity.AnimationStatus animationStatus
-
progress
private float progress
-
progressOld
private float progressOld
-
color
@Nullable private DyeColor color
-
loadColorFromBlock
private boolean loadColorFromBlock
-
-
Constructor Detail
-
ShulkerBoxTileEntity
public ShulkerBoxTileEntity(@Nullable DyeColor p_i47242_1_)
-
ShulkerBoxTileEntity
public ShulkerBoxTileEntity()
-
-
Method Detail
-
tick
public void tick()
- Specified by:
tick
in interfaceITickableTileEntity
-
updateAnimation
protected void updateAnimation()
-
getAnimationStatus
public ShulkerBoxTileEntity.AnimationStatus getAnimationStatus()
-
getBoundingBox
public AxisAlignedBB getBoundingBox(BlockState p_190584_1_)
-
getBoundingBox
public AxisAlignedBB getBoundingBox(Direction p_190587_1_)
-
getTopBoundingBox
private AxisAlignedBB getTopBoundingBox(Direction p_190588_1_)
-
moveCollidedEntities
private void moveCollidedEntities()
-
getContainerSize
public int getContainerSize()
- Specified by:
getContainerSize
in interfaceIInventory
-
triggerEvent
public boolean triggerEvent(int p_145842_1_, int p_145842_2_)
- Overrides:
triggerEvent
in classTileEntity
-
doNeighborUpdates
private void doNeighborUpdates()
-
startOpen
public void startOpen(PlayerEntity p_174889_1_)
- Specified by:
startOpen
in interfaceIInventory
-
stopOpen
public void stopOpen(PlayerEntity p_174886_1_)
- Specified by:
stopOpen
in interfaceIInventory
-
getDefaultName
protected ITextComponent getDefaultName()
- Specified by:
getDefaultName
in classLockableTileEntity
-
load
public void load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
- Overrides:
load
in classLockableTileEntity
-
save
public CompoundNBT save(CompoundNBT p_189515_1_)
- Overrides:
save
in classLockableTileEntity
-
loadFromTag
public void loadFromTag(CompoundNBT p_190586_1_)
-
saveToTag
public CompoundNBT saveToTag(CompoundNBT p_190580_1_)
-
getItems
protected NonNullList<ItemStack> getItems()
- Specified by:
getItems
in classLockableLootTileEntity
-
setItems
protected void setItems(NonNullList<ItemStack> p_199721_1_)
- Specified by:
setItems
in classLockableLootTileEntity
-
getSlotsForFace
public int[] getSlotsForFace(Direction p_180463_1_)
- Specified by:
getSlotsForFace
in interfaceISidedInventory
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int p_180462_1_, ItemStack p_180462_2_, @Nullable Direction p_180462_3_)
- Specified by:
canPlaceItemThroughFace
in interfaceISidedInventory
-
canTakeItemThroughFace
public boolean canTakeItemThroughFace(int p_180461_1_, ItemStack p_180461_2_, Direction p_180461_3_)
- Specified by:
canTakeItemThroughFace
in interfaceISidedInventory
-
getProgress
public float getProgress(float p_190585_1_)
-
getColor
@Nullable public DyeColor getColor()
-
createMenu
protected Container createMenu(int p_213906_1_, PlayerInventory p_213906_2_)
- Specified by:
createMenu
in classLockableTileEntity
-
isClosed
public boolean isClosed()
-
createUnSidedHandler
protected IItemHandler createUnSidedHandler()
- Overrides:
createUnSidedHandler
in classLockableTileEntity
-
-