Interface Container

All Superinterfaces:
Clearable
All Known Subinterfaces:
ContainerEntity, ContainerSingleItem, CraftingContainer, Hopper, WorldlyContainer
All Known Implementing Classes:
AbstractFurnaceBlockEntity, AbstractMinecartContainer, BarrelBlockEntity, BaseContainerBlockEntity, BlastFurnaceBlockEntity, BrewingStandBlockEntity, ChestBlockEntity, ChestBoat, ChiseledBookShelfBlockEntity, ComposterBlock.EmptyContainer, ComposterBlock.InputContainer, ComposterBlock.OutputContainer, CompoundContainer, DispenserBlockEntity, DropperBlockEntity, FurnaceBlockEntity, HopperBlockEntity, Inventory, JukeboxBlockEntity, MerchantContainer, MinecartChest, MinecartHopper, PlayerEnderChestContainer, RandomizableContainerBlockEntity, RecipeWrapper, ResultContainer, ShulkerBoxBlockEntity, SimpleContainer, SimpleCraftingContainer, SmokerBlockEntity, TransientCraftingContainer, TrappedChestBlockEntity

public interface Container extends Clearable
  • Field Details

  • Method Details

    • getContainerSize

      int getContainerSize()
    • isEmpty

      boolean isEmpty()
    • getItem

      ItemStack getItem(int p_18941_)
    • removeItem

      ItemStack removeItem(int p_18942_, int p_18943_)
    • removeItemNoUpdate

      ItemStack removeItemNoUpdate(int p_18951_)
    • setItem

      void setItem(int p_18944_, ItemStack p_18945_)
    • getMaxStackSize

      default int getMaxStackSize()
    • setChanged

      void setChanged()
    • stillValid

      boolean stillValid(Player p_18946_)
    • startOpen

      default void startOpen(Player p_18955_)
    • stopOpen

      default void stopOpen(Player p_18954_)
    • canPlaceItem

      default boolean canPlaceItem(int p_18952_, ItemStack p_18953_)
    • canTakeItem

      default boolean canTakeItem(Container p_273520_, int p_272681_, ItemStack p_273702_)
    • countItem

      default int countItem(Item p_18948_)
    • hasAnyOf

      default boolean hasAnyOf(Set<Item> p_18950_)
    • hasAnyMatching

      default boolean hasAnyMatching(Predicate<ItemStack> p_216875_)
    • stillValidBlockEntity

      static boolean stillValidBlockEntity(BlockEntity p_273154_, Player p_273222_)
    • stillValidBlockEntity

      static boolean stillValidBlockEntity(BlockEntity p_272877_, Player p_272670_, int p_273411_)