Class HopperBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
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.HopperBlockEntity
- All Implemented Interfaces:
- Clearable,- Container,- MenuConstructor,- Hopper,- MenuProvider,- Nameable,- ICapabilityProvider,- ICapabilityProviderImpl<BlockEntity>,- ICapabilitySerializable<CompoundTag>,- IForgeBlockEntity,- INBTSerializable<CompoundTag>
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProviderCapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate intstatic final intprivate NonNullList<ItemStack>static final intprivate longFields inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntityLOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG, lootTable, lootTableSeedFields inherited from class net.minecraft.world.level.block.entity.BlockEntitylevel, remove, worldPositionFields inherited from interface net.minecraft.world.ContainerDEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZEFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntityINFINITE_EXTENT_AABB
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ItemStackstatic booleanaddItem(Container p_59332_, ItemEntity p_59333_) private static booleancanMergeItems(ItemStack p_59345_, ItemStack p_59346_) private static booleancanPlaceItemInContainer(Container p_59335_, ItemStack p_59336_, int p_59337_, Direction p_59338_) private static booleancanTakeItemFromContainer(Container p_273433_, Container p_273542_, ItemStack p_273400_, int p_273519_, Direction p_273088_) protected AbstractContainerMenucreateMenu(int p_59312_, Inventory p_59313_) protected IItemHandlerprivate static booleanejectItems(Level p_155563_, BlockPos p_155564_, BlockState p_155565_, HopperBlockEntity p_155566_) static voidentityInside(Level p_155568_, BlockPos p_155569_, BlockState p_155570_, Entity p_155571_, HopperBlockEntity p_155572_) private static ContainergetAttachedContainer(Level p_155593_, BlockPos p_155594_, BlockState p_155595_) private static ContainergetContainerAt(Level p_59348_, double p_59349_, double p_59350_, double p_59351_) static ContainergetContainerAt(Level p_59391_, BlockPos p_59392_) intprotected Componentprotected NonNullList<ItemStack>getItems()static List<ItemEntity>getItemsAtAndAbove(Level p_155590_, Hopper p_155591_) longdoubledoubledoubleprivate static IntStreamprivate static ContainergetSourceContainer(Level p_155597_, Hopper p_155598_) private booleanprivate static booleanisEmptyContainer(Container p_59398_, Direction p_59399_) private static booleanisFullContainer(Container p_59386_, Direction p_59387_) private booleanbooleanvoidload(CompoundTag p_155588_) static voidpushItemsTick(Level p_155574_, BlockPos p_155575_, BlockState p_155576_, HopperBlockEntity p_155577_) removeItem(int p_59309_, int p_59310_) protected voidsaveAdditional(CompoundTag p_187502_) voidsetCooldown(int p_59396_) voidprotected voidsetItems(NonNullList<ItemStack> p_59371_) static booleansuckInItems(Level p_155553_, Hopper p_155554_) private static ItemStacktryMoveInItem(Container p_59321_, Container p_59322_, ItemStack p_59323_, int p_59324_, Direction p_59325_) private static booleantryMoveItems(Level p_155579_, BlockPos p_155580_, BlockState p_155581_, HopperBlockEntity p_155582_, BooleanSupplier p_155583_) private static booleantryTakeInItemFromSlot(Hopper p_59355_, Container p_59356_, int p_59357_, Direction p_59358_) Methods inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntitycanOpen, clearContent, createMenu, getItem, isEmpty, removeItemNoUpdate, setLootTable, setLootTable, stillValid, tryLoadLootTable, trySaveLootTable, unpackLootTableMethods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntitycanUnlock, getCapability, getCustomName, getDisplayName, getName, invalidateCaps, reviveCaps, setCustomNameMethods inherited from class net.minecraft.world.level.block.entity.BlockEntityaddEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProviderareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCapsMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.ClearableclearContentMethods inherited from interface net.minecraft.world.ContainercanPlaceItem, canTakeItem, countItem, getItem, getMaxStackSize, hasAnyMatching, hasAnyOf, isEmpty, removeItemNoUpdate, setChanged, startOpen, stillValid, stopOpenMethods inherited from interface net.minecraft.world.level.block.entity.HoppergetSuckShapeMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvidergetCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntitydeserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBTMethods inherited from interface net.minecraft.world.NameablehasCustomName
- 
Field Details- 
MOVE_ITEM_SPEEDpublic static final int MOVE_ITEM_SPEED- See Also:
 
- 
HOPPER_CONTAINER_SIZEpublic static final int HOPPER_CONTAINER_SIZE- See Also:
 
- 
items
- 
cooldownTimeprivate int cooldownTime
- 
tickedGameTimeprivate long tickedGameTime
 
- 
- 
Constructor Details- 
HopperBlockEntity
 
- 
- 
Method Details- 
load- Overrides:
- loadin class- BaseContainerBlockEntity
 
- 
saveAdditional- Overrides:
- saveAdditionalin class- BaseContainerBlockEntity
 
- 
getContainerSizepublic int getContainerSize()- Specified by:
- getContainerSizein interface- Container
 
- 
removeItem- Specified by:
- removeItemin interface- Container
- Overrides:
- removeItemin class- RandomizableContainerBlockEntity
 
- 
setItem- Specified by:
- setItemin interface- Container
- Overrides:
- setItemin class- RandomizableContainerBlockEntity
 
- 
getDefaultName- Specified by:
- getDefaultNamein class- BaseContainerBlockEntity
 
- 
pushItemsTickpublic static void pushItemsTick(Level p_155574_, BlockPos p_155575_, BlockState p_155576_, HopperBlockEntity p_155577_) 
- 
tryMoveItemsprivate static boolean tryMoveItems(Level p_155579_, BlockPos p_155580_, BlockState p_155581_, HopperBlockEntity p_155582_, BooleanSupplier p_155583_) 
- 
inventoryFullprivate boolean inventoryFull()
- 
ejectItemsprivate static boolean ejectItems(Level p_155563_, BlockPos p_155564_, BlockState p_155565_, HopperBlockEntity p_155566_) 
- 
getSlots
- 
isFullContainer
- 
isEmptyContainer
- 
suckInItems
- 
tryTakeInItemFromSlot
- 
addItem
- 
addItem
- 
canPlaceItemInContainer
- 
canTakeItemFromContainer
- 
tryMoveInItem
- 
getAttachedContainer@Nullable private static Container getAttachedContainer(Level p_155593_, BlockPos p_155594_, BlockState p_155595_) 
- 
getSourceContainer
- 
getItemsAtAndAbove
- 
getContainerAt
- 
getContainerAt
- 
canMergeItems
- 
getLevelXpublic double getLevelX()
- 
getLevelYpublic double getLevelY()
- 
getLevelZpublic double getLevelZ()
- 
setCooldownpublic void setCooldown(int p_59396_) 
- 
isOnCooldownprivate boolean isOnCooldown()
- 
isOnCustomCooldownpublic boolean isOnCustomCooldown()
- 
getItems- Specified by:
- getItemsin class- RandomizableContainerBlockEntity
 
- 
setItems- Specified by:
- setItemsin class- RandomizableContainerBlockEntity
 
- 
entityInsidepublic static void entityInside(Level p_155568_, BlockPos p_155569_, BlockState p_155570_, Entity p_155571_, HopperBlockEntity p_155572_) 
- 
createMenu- Specified by:
- createMenuin class- BaseContainerBlockEntity
 
- 
createUnSidedHandler- Overrides:
- createUnSidedHandlerin class- BaseContainerBlockEntity
 
- 
getLastUpdateTimepublic long getLastUpdateTime()
 
-