Class ForgeWoodenHopperBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraftforge.common.capabilities.CapabilityProvider.BlockEntities
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
de.cech12.woodenhopper.blockentity.WoodenHopperBlockEntity
de.cech12.woodenhopper.blockentity.ForgeWoodenHopperBlockEntity
- All Implemented Interfaces:
Iterable<net.minecraft.world.item.ItemStack>, net.minecraft.core.TypedInstance<net.minecraft.world.level.block.entity.BlockEntityType<?>>, net.minecraft.util.debug.DebugValueSource, net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.entity.SlotProvider, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.level.block.entity.Hopper, net.minecraft.world.MenuProvider, net.minecraft.world.Nameable, net.minecraft.world.RandomizableContainer, net.minecraftforge.common.capabilities.ICapabilityProvider, net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>, net.minecraftforge.common.extensions.IForgeBlockEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B>, net.minecraftforge.common.capabilities.CapabilityProvider.BlockEntities, net.minecraftforge.common.capabilities.CapabilityProvider.Entities, net.minecraftforge.common.capabilities.CapabilityProvider.ItemStacks, net.minecraftforge.common.capabilities.CapabilityProvider.LevelsNested classes/interfaces inherited from interface net.minecraft.world.Container
net.minecraft.world.Container.ContainerIteratorNested classes/interfaces inherited from interface net.minecraft.util.debug.DebugValueSource
net.minecraft.util.debug.DebugValueSource.Registration, net.minecraft.util.debug.DebugValueSource.ValueGetter<T> -
Field Summary
Fields inherited from class WoodenHopperBlockEntity
tickedGameTime, transferCooldownFields 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 interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFERFields inherited from interface net.minecraft.world.level.block.entity.Hopper
SUCK_AABBFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABBFields inherited from interface net.minecraft.world.RandomizableContainer
LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG -
Constructor Summary
ConstructorsConstructorDescriptionForgeWoodenHopperBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull net.minecraftforge.items.IItemHandlerintReturns the number of slots in the inventory.getItemHandler(net.minecraft.world.level.Level level, double x, double y, double z, net.minecraft.core.Direction side) protected @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItems()protected Objectprotected booleanprotected voidloadAdditional(@NotNull net.minecraft.world.level.storage.ValueInput valueInput) protected booleanpullItemsFromItemHandler(Object itemHandlerObj) protected net.minecraft.world.item.ItemStackputStackInInventoryAllSlots(net.minecraft.world.level.block.entity.BlockEntity source, Object destination, Object destInventoryObj, net.minecraft.world.item.ItemStack stack) @NotNull net.minecraft.world.item.ItemStackremoveItem(int index, int count) Removes up to a specified number of items from an inventory slot and returns them in a new stack.@NotNull net.minecraft.world.item.ItemStackremoveItemNoUpdate(int index) Removes a stack from the given slot and returns it.voidsaveAdditional(@NotNull net.minecraft.world.level.storage.ValueOutput valueOutput) voidsetItem(int index, @NotNull net.minecraft.world.item.ItemStack stack) Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).protected voidsetItems(@NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> itemsIn) Methods inherited from class WoodenHopperBlockEntity
createMenu, getAllAliveEntitiesAt, getDefaultName, getLastUpdateTime, getLevelX, getLevelY, getLevelZ, isGridAligned, isNotOnTransferCooldown, mayNotTransfer, onItemEntityIsCaptured, pullItems, setTransferCooldown, tick, updateCooldown, updateHopperMethods inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
applyImplicitComponents, canOpen, collectImplicitComponents, createMenu, getItem, getLootTable, getLootTableSeed, isEmpty, removeComponentsFromTag, setLootTable, setLootTableSeedMethods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
clearContent, getCapability, getCustomName, getDisplayName, getName, invalidateCaps, isLocked, reviveCaps, sendChestLockedNotifications, stillValidMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getNameForReporting, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onChunkUnloaded, parseCustomNameSafe, preRemoveSideEffects, problemPath, registerDebugValues, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setLevel, setRemoved, triggerEvent, typeHolderMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider.BlockEntities
fireAttachCapabilitiesEvent, shouldFireAttachCapabilitiesEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCaps, serializeCapsMethods inherited from class 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, getEntitiesWithContainerOpen, getItem, getMaxStackSize, getMaxStackSize, getSlot, hasAnyMatching, hasAnyOf, isEmpty, iterator, setChanged, startOpen, stillValid, stopOpenMethods inherited from interface net.minecraft.world.level.block.entity.Hopper
getSuckAabbMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdateMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface net.minecraft.world.Nameable
getPlainTextName, hasCustomNameMethods inherited from interface net.minecraft.world.RandomizableContainer
getBlockPos, getLevel, setLootTable, tryLoadLootTable, trySaveLootTable, unpackLootTableMethods inherited from interface net.minecraft.world.entity.SlotProvider
getSlotsFromRangeMethods inherited from interface net.minecraft.core.TypedInstance
is, is, is, is, is, tags
-
Constructor Details
-
ForgeWoodenHopperBlockEntity
public ForgeWoodenHopperBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
loadAdditional
protected void loadAdditional(@NotNull @NotNull net.minecraft.world.level.storage.ValueInput valueInput) - Overrides:
loadAdditionalin classWoodenHopperBlockEntity
-
saveAdditional
public void saveAdditional(@NotNull @NotNull net.minecraft.world.level.storage.ValueOutput valueOutput) - Overrides:
saveAdditionalin classWoodenHopperBlockEntity
-
getContainerSize
public int getContainerSize()Returns the number of slots in the inventory. -
getItems
@NotNull protected @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItems()- Specified by:
getItemsin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
setItems
protected void setItems(@NotNull @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> itemsIn) - Specified by:
setItemsin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
removeItem
@NotNull public @NotNull net.minecraft.world.item.ItemStack removeItem(int index, int count) Removes up to a specified number of items from an inventory slot and returns them in a new stack.- Specified by:
removeItemin interfacenet.minecraft.world.Container- Overrides:
removeItemin classnet.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
-
removeItemNoUpdate
@NotNull public @NotNull net.minecraft.world.item.ItemStack removeItemNoUpdate(int index) Removes a stack from the given slot and returns it.- Specified by:
removeItemNoUpdatein interfacenet.minecraft.world.Container- Overrides:
removeItemNoUpdatein classnet.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
-
setItem
public void setItem(int index, @NotNull @NotNull net.minecraft.world.item.ItemStack stack) Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).- Specified by:
setItemin interfacenet.minecraft.world.Container- Overrides:
setItemin classnet.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
-
createUnSidedHandler
@NotNull protected @NotNull net.minecraftforge.items.IItemHandler createUnSidedHandler()- Overrides:
createUnSidedHandlerin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
putStackInInventoryAllSlots
protected net.minecraft.world.item.ItemStack putStackInInventoryAllSlots(net.minecraft.world.level.block.entity.BlockEntity source, Object destination, Object destInventoryObj, net.minecraft.world.item.ItemStack stack) - Specified by:
putStackInInventoryAllSlotsin classWoodenHopperBlockEntity
-
getItemHandler
protected Optional<org.apache.commons.lang3.tuple.Pair<Object,Object>> getItemHandler(net.minecraft.world.level.Level level, double x, double y, double z, net.minecraft.core.Direction side) - Specified by:
getItemHandlerin classWoodenHopperBlockEntity
-
isNotFull
- Specified by:
isNotFullin classWoodenHopperBlockEntity
-
pullItemsFromItemHandler
- Specified by:
pullItemsFromItemHandlerin classWoodenHopperBlockEntity
-
getOwnItemHandler
- Specified by:
getOwnItemHandlerin classWoodenHopperBlockEntity
-