Class ItemBackedInventory

java.lang.Object
net.minecraft.world.SimpleContainer
vazkii.botania.common.item.ItemBackedInventory
All Implemented Interfaces:
net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.inventory.StackedContentsCompatible

public class ItemBackedInventory extends net.minecraft.world.SimpleContainer
An inventory that writes into the provided stack's DataComponents.CONTAINER on save
  • Field Summary

    Fields inherited from interface net.minecraft.world.Container

    DEFAULT_DISTANCE_BUFFER
  • Constructor Summary

    Constructors
    Constructor
    Description
    ItemBackedInventory(net.minecraft.world.item.ItemStack stack, int expectedSize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    boolean
    stillValid(net.minecraft.world.entity.player.Player player)
     

    Methods inherited from class net.minecraft.world.SimpleContainer

    addItem, addListener, canAddItem, clearContent, createTag, fillStackedContents, fromTag, getContainerSize, getItem, getItems, isEmpty, removeAllItems, removeItem, removeItemNoUpdate, removeItemType, removeListener, setItem, toString

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.minecraft.world.Container

    canPlaceItem, canTakeItem, countItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, startOpen, stopOpen
  • Constructor Details

    • ItemBackedInventory

      public ItemBackedInventory(net.minecraft.world.item.ItemStack stack, int expectedSize)
  • Method Details

    • stillValid

      public boolean stillValid(net.minecraft.world.entity.player.Player player)
      Specified by:
      stillValid in interface net.minecraft.world.Container
      Overrides:
      stillValid in class net.minecraft.world.SimpleContainer
    • setChanged

      public void setChanged()
      Specified by:
      setChanged in interface net.minecraft.world.Container
      Overrides:
      setChanged in class net.minecraft.world.SimpleContainer