接口 Container

所有超级接口:
Clearable
所有已知子接口:
ContainerEntity, ContainerSingleItem, CraftingContainer, Hopper, WorldlyContainer
所有已知实现类:
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, SmokerBlockEntity, TransientCraftingContainer, TrappedChestBlockEntity

public interface Container extends Clearable
  • 字段详细资料

    • LARGE_MAX_STACK_SIZE

      static final int LARGE_MAX_STACK_SIZE
      另请参阅:
    • DEFAULT_DISTANCE_LIMIT

      static final int DEFAULT_DISTANCE_LIMIT
      另请参阅:
  • 方法详细资料

    • getContainerSize

      int getContainerSize()
    • isEmpty

      boolean isEmpty()
    • getItem

      ItemStack getItem(int pSlot)
    • removeItem

      ItemStack removeItem(int pSlot, int pAmount)
    • removeItemNoUpdate

      ItemStack removeItemNoUpdate(int pSlot)
    • setItem

      void setItem(int pSlot, ItemStack pStack)
    • getMaxStackSize

      default int getMaxStackSize()
    • setChanged

      void setChanged()
    • stillValid

      boolean stillValid(Player pPlayer)
    • startOpen

      default void startOpen(Player pPlayer)
    • stopOpen

      default void stopOpen(Player pPlayer)
    • canPlaceItem

      default boolean canPlaceItem(int pIndex, ItemStack pStack)
    • canTakeItem

      default boolean canTakeItem(Container pTarget, int pIndex, ItemStack pStack)
    • countItem

      default int countItem(Item pItem)
    • hasAnyOf

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

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

      static boolean stillValidBlockEntity(BlockEntity pBlockEntity, Player pPlayer)
    • stillValidBlockEntity

      static boolean stillValidBlockEntity(BlockEntity pBlockEntity, Player pPlayer, int pMaxDistance)