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

public class ForgeWoodenHopperBlockEntity extends WoodenHopperBlockEntity
  • 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.Levels

    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.minecraft.world.Container

    DEFAULT_DISTANCE_BUFFER

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

    SUCK_AABB

    Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity

    INFINITE_EXTENT_AABB

    Fields inherited from interface net.minecraft.world.RandomizableContainer

    LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    protected @NotNull net.minecraftforge.items.IItemHandler
     
    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 itemHandlerObj)
     
    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 destInventoryObj, 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 stack)
    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> itemsIn)
     

    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, getCapability, getCustomName, getDisplayName, getName, invalidateCaps, isLocked, reviveCaps, 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, onChunkUnloaded, parseCustomNameSafe, preRemoveSideEffects, problemPath, registerDebugValues, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setLevel, setRemoved, triggerEvent, typeHolder

    Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider.BlockEntities

    fireAttachCapabilitiesEvent, shouldFireAttachCapabilitiesEvent

    Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

    deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCaps, serializeCaps

    Methods inherited from class Object

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

    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.minecraft.world.level.block.entity.Hopper

    getSuckAabb

    Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider

    getCapability

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity

    getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate

    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.minecraft.world.entity.SlotProvider

    getSlotsFromRange

    Methods 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:
      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> itemsIn)
      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 stack)
      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
    • createUnSidedHandler

      @NotNull protected @NotNull net.minecraftforge.items.IItemHandler createUnSidedHandler()
      Overrides:
      createUnSidedHandler in class net.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:
      putStackInInventoryAllSlots 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 itemHandlerObj)
      Specified by:
      isNotFull in class WoodenHopperBlockEntity
    • pullItemsFromItemHandler

      protected boolean pullItemsFromItemHandler(Object itemHandlerObj)
      Specified by:
      pullItemsFromItemHandler in class WoodenHopperBlockEntity
    • getOwnItemHandler

      protected Object getOwnItemHandler()
      Specified by:
      getOwnItemHandler in class WoodenHopperBlockEntity