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

public class FabricWoodenHopperBlockEntity extends WoodenHopperBlockEntity
  • 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.ContainerIterator

    Nested 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 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 interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget

    NBT_ATTACHMENT_KEY

    Fields inherited from interface net.minecraft.world.Container

    DEFAULT_DISTANCE_BUFFER

    Fields inherited from interface net.minecraft.world.level.block.entity.Hopper

    SUCK_AABB

    Fields inherited from interface net.minecraft.world.RandomizableContainer

    LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG
  • Constructor Summary

    Constructors
    Constructor
    Description
    FabricWoodenHopperBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the number of slots in the inventory.
    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)
     
    protected @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>
     
    protected Object
     
    protected boolean
    isNotFull(Object itemHandler)
     
    protected void
    loadAdditional(@NotNull net.minecraft.world.level.storage.ValueInput valueInput)
     
    protected boolean
     
    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)
     
    @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.
    @NotNull net.minecraft.world.item.ItemStack
    removeItemNoUpdate(int index)
    Removes a stack from the given slot and returns it.
    void
    saveAdditional(@NotNull net.minecraft.world.level.storage.ValueOutput valueOutput)
     
    void
    setItem(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 void
    setItems(@NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> nonNullList)
     

    Methods inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity

    applyImplicitComponents, canOpen, collectImplicitComponents, createMenu, getItem, getLootTable, getLootTableSeed, isEmpty, removeComponentsFromTag, setLootTable, setLootTableSeed

    Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity

    clearContent, getCustomName, getDisplayName, getName, isLocked, sendChestLockedNotifications, stillValid

    Methods 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, typeHolder

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget

    getAttached, getAttachedOrCreate, getAttachedOrCreate, getAttachedOrElse, getAttachedOrGet, getAttachedOrSet, getAttachedOrThrow, hasAttached, modifyAttached, onAttachedSet, removeAttached, setAttached

    Methods inherited from interface net.minecraft.world.Clearable

    clearContent

    Methods inherited from interface net.minecraft.world.Container

    canPlaceItem, canTakeItem, countItem, getEntitiesWithContainerOpen, getItem, getMaxStackSize, getMaxStackSize, getSlot, hasAnyMatching, hasAnyOf, isEmpty, iterator, setChanged, startOpen, stillValid, stopOpen

    Methods inherited from interface net.fabricmc.fabric.api.menu.v1.FabricMenuProvider

    shouldCloseCurrentScreen

    Methods inherited from interface net.minecraft.world.level.block.entity.Hopper

    getSuckAabb

    Methods inherited from interface Iterable

    forEach, spliterator

    Methods inherited from interface net.minecraft.world.Nameable

    getPlainTextName, hasCustomName

    Methods inherited from interface net.minecraft.world.RandomizableContainer

    getBlockPos, getLevel, setLootTable, tryLoadLootTable, trySaveLootTable, unpackLootTable

    Methods inherited from interface net.fabricmc.fabric.api.blockgetter.v2.RenderDataBlockEntity

    getRenderData

    Methods inherited from interface net.minecraft.world.entity.SlotProvider

    getSlotsFromRange

    Methods 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:
      loadAdditional in class WoodenHopperBlockEntity
    • saveAdditional

      public void saveAdditional(@NotNull @NotNull net.minecraft.world.level.storage.ValueOutput valueOutput)
      Overrides:
      saveAdditional in class WoodenHopperBlockEntity
    • 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:
      getItems in class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
    • setItems

      protected void setItems(@NotNull @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> nonNullList)
      Specified by:
      setItems in class net.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:
      removeItem in interface net.minecraft.world.Container
      Overrides:
      removeItem in class net.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:
      removeItemNoUpdate in interface net.minecraft.world.Container
      Overrides:
      removeItemNoUpdate in class net.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:
      setItem in interface net.minecraft.world.Container
      Overrides:
      setItem in class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
    • pullItemsFromItemHandler

      protected boolean pullItemsFromItemHandler(Object itemHandler)
      Specified by:
      pullItemsFromItemHandler in class WoodenHopperBlockEntity
    • 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:
      getItemHandler in class WoodenHopperBlockEntity
    • isNotFull

      protected boolean isNotFull(Object itemHandler)
      Specified by:
      isNotFull in class WoodenHopperBlockEntity
    • getOwnItemHandler

      protected Object getOwnItemHandler()
      Specified by:
      getOwnItemHandler in class WoodenHopperBlockEntity
    • 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:
      putStackInInventoryAllSlots in class WoodenHopperBlockEntity