Class ExposedSimpleInventoryBlockEntity

java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
All Implemented Interfaces:
net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.WorldlyContainer
Direct Known Subclasses:
HoveringHourglassBlockEntity, IncensePlateBlockEntity, ManaPrismBlockEntity, ManaSpreaderBlockEntity, OpenCrateBlockEntity, SparkTinkererBlockEntity, TinyPotatoBlockEntity

public abstract class ExposedSimpleInventoryBlockEntity extends SimpleInventoryBlockEntity implements net.minecraft.world.WorldlyContainer
Version of SimpleInventoryBlockEntity where the backing inventory is exposed to automation
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity

    net.minecraft.world.level.block.entity.BlockEntity.DataComponentInput
  • Field Summary

    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
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ExposedSimpleInventoryBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canPlaceItem(int index, net.minecraft.world.item.ItemStack stack)
     
    boolean
    canPlaceItemThroughFace(int index, @NotNull net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.core.Direction direction)
     
    boolean
    canTakeItemThroughFace(int index, @NotNull net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.core.Direction direction)
     
    int
    countItem(net.minecraft.world.item.Item item)
     
    int
     
    net.minecraft.world.item.ItemStack
    getItem(int index)
     
    int
     
    int[]
    getSlotsForFace(net.minecraft.core.Direction side)
     
    boolean
    hasAnyOf(Set<net.minecraft.world.item.Item> set)
     
    boolean
     
    net.minecraft.world.item.ItemStack
    removeItem(int index, int count)
     
    net.minecraft.world.item.ItemStack
    removeItemNoUpdate(int index)
     
    void
    setItem(int index, net.minecraft.world.item.ItemStack stack)
     
    void
    startOpen(net.minecraft.world.entity.player.Player player)
     
    boolean
    stillValid(net.minecraft.world.entity.player.Player player)
     
    void
    stopOpen(net.minecraft.world.entity.player.Player player)
     

    Methods inherited from class vazkii.botania.common.block.block_entity.SimpleInventoryBlockEntity

    clearContent, createItemHandler, getItemHandler, inventorySize, readPacketNBT, writePacketNBT

    Methods inherited from class vazkii.botania.common.block.block_entity.BotaniaBlockEntity

    getUpdatePacket, getUpdateTag, loadAdditional, saveAdditional

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

    addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setLevel, setRemoved, triggerEvent

    Methods inherited from class java.lang.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

    canTakeItem, getMaxStackSize, hasAnyMatching, setChanged
  • Constructor Details

    • ExposedSimpleInventoryBlockEntity

      protected ExposedSimpleInventoryBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface net.minecraft.world.Container
    • getContainerSize

      public int getContainerSize()
      Specified by:
      getContainerSize in interface net.minecraft.world.Container
    • getItem

      public net.minecraft.world.item.ItemStack getItem(int index)
      Specified by:
      getItem in interface net.minecraft.world.Container
    • removeItem

      public net.minecraft.world.item.ItemStack removeItem(int index, int count)
      Specified by:
      removeItem in interface net.minecraft.world.Container
    • removeItemNoUpdate

      public net.minecraft.world.item.ItemStack removeItemNoUpdate(int index)
      Specified by:
      removeItemNoUpdate in interface net.minecraft.world.Container
    • setItem

      public void setItem(int index, net.minecraft.world.item.ItemStack stack)
      Specified by:
      setItem in interface net.minecraft.world.Container
    • stillValid

      public boolean stillValid(net.minecraft.world.entity.player.Player player)
      Specified by:
      stillValid in interface net.minecraft.world.Container
    • getMaxStackSize

      public int getMaxStackSize()
      Specified by:
      getMaxStackSize in interface net.minecraft.world.Container
    • startOpen

      public void startOpen(net.minecraft.world.entity.player.Player player)
      Specified by:
      startOpen in interface net.minecraft.world.Container
    • stopOpen

      public void stopOpen(net.minecraft.world.entity.player.Player player)
      Specified by:
      stopOpen in interface net.minecraft.world.Container
    • canPlaceItem

      public boolean canPlaceItem(int index, net.minecraft.world.item.ItemStack stack)
      Specified by:
      canPlaceItem in interface net.minecraft.world.Container
    • countItem

      public int countItem(net.minecraft.world.item.Item item)
      Specified by:
      countItem in interface net.minecraft.world.Container
    • hasAnyOf

      public boolean hasAnyOf(Set<net.minecraft.world.item.Item> set)
      Specified by:
      hasAnyOf in interface net.minecraft.world.Container
    • getSlotsForFace

      public int[] getSlotsForFace(net.minecraft.core.Direction side)
      Specified by:
      getSlotsForFace in interface net.minecraft.world.WorldlyContainer
    • canPlaceItemThroughFace

      public boolean canPlaceItemThroughFace(int index, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, @Nullable @Nullable net.minecraft.core.Direction direction)
      Specified by:
      canPlaceItemThroughFace in interface net.minecraft.world.WorldlyContainer
    • canTakeItemThroughFace

      public boolean canTakeItemThroughFace(int index, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, @Nullable @Nullable net.minecraft.core.Direction direction)
      Specified by:
      canTakeItemThroughFace in interface net.minecraft.world.WorldlyContainer