Class FabricWoodenHopperBlockEntity
java.lang.Object
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.FabricWoodenHopperBlockEntity
- All Implemented Interfaces:
Iterable<net.minecraft.world.item.ItemStack>, net.fabricmc.fabric.api.attachment.v1.AttachmentTarget, net.fabricmc.fabric.api.blockgetter.v2.RenderDataBlockEntity, net.fabricmc.fabric.api.menu.v1.FabricMenuProvider, 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
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
net.fabricmc.fabric.api.attachment.v1.AttachmentTarget.OnAttachedSet<A>Nested 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.fabricmc.fabric.api.attachment.v1.AttachmentTarget
NBT_ATTACHMENT_KEYFields 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.minecraft.world.RandomizableContainer
LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG -
Constructor Summary
ConstructorsConstructorDescriptionFabricWoodenHopperBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionintReturns 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 itemHandler) protected net.minecraft.world.item.ItemStackputStackInInventoryAllSlots(net.minecraft.world.level.block.entity.BlockEntity source, Object destination, Object destinationItemHandlerObj, 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 itemStack) 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> nonNullList) 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, getCustomName, getDisplayName, getName, isLocked, 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, parseCustomNameSafe, preRemoveSideEffects, problemPath, registerDebugValues, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setLevel, setRemoved, triggerEvent, typeHolderMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
getAttached, getAttachedOrCreate, getAttachedOrCreate, getAttachedOrElse, getAttachedOrGet, getAttachedOrSet, getAttachedOrThrow, hasAttached, modifyAttached, onAttachedSet, removeAttached, setAttachedMethods 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.fabricmc.fabric.api.menu.v1.FabricMenuProvider
shouldCloseCurrentScreenMethods inherited from interface net.minecraft.world.level.block.entity.Hopper
getSuckAabbMethods 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.fabricmc.fabric.api.blockgetter.v2.RenderDataBlockEntity
getRenderDataMethods inherited from interface net.minecraft.world.entity.SlotProvider
getSlotsFromRangeMethods inherited from interface net.minecraft.core.TypedInstance
is, is, is, is, is, tags
-
Constructor Details
-
FabricWoodenHopperBlockEntity
public FabricWoodenHopperBlockEntity(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> nonNullList) - 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 itemStack) 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
-
pullItemsFromItemHandler
- Specified by:
pullItemsFromItemHandlerin 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
-
getOwnItemHandler
- Specified by:
getOwnItemHandlerin classWoodenHopperBlockEntity
-
putStackInInventoryAllSlots
protected net.minecraft.world.item.ItemStack putStackInInventoryAllSlots(net.minecraft.world.level.block.entity.BlockEntity source, Object destination, Object destinationItemHandlerObj, net.minecraft.world.item.ItemStack stack) - Specified by:
putStackInInventoryAllSlotsin classWoodenHopperBlockEntity
-