Interface ResourcePack

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
AbstractFileResourcePack, DefaultClientResourcePack, DefaultResourcePack, DirectoryResourcePack, Format3ResourcePack, Format4ResourcePack, ZipResourcePack

public interface ResourcePack extends AutoCloseable
A resource pack, providing resources to resource managers.

They are single-use in each reload cycle of a reloadable resource manager. ResourcePackProfile is a persistent version of the resource packs.

Mappings:
Namespace Name
official acv
intermediary net/minecraft/class_3262
named net/minecraft/resource/ResourcePack
  • Field Details

    • METADATA_PATH_SUFFIX

      static final String METADATA_PATH_SUFFIX
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official c Lacv;c:Ljava/lang/String;
      intermediary field_29780 Lnet/minecraft/class_3262;field_29780:Ljava/lang/String;
      named METADATA_PATH_SUFFIX Lnet/minecraft/resource/ResourcePack;METADATA_PATH_SUFFIX:Ljava/lang/String;
    • PACK_METADATA_NAME

      static final String PACK_METADATA_NAME
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official d Lacv;d:Ljava/lang/String;
      intermediary field_29781 Lnet/minecraft/class_3262;field_29781:Ljava/lang/String;
      named PACK_METADATA_NAME Lnet/minecraft/resource/ResourcePack;PACK_METADATA_NAME:Ljava/lang/String;
  • Method Details

    • openRoot

      @Nullable @Nullable InputStream openRoot(String fileName) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official b Lacv;b(Ljava/lang/String;)Ljava/io/InputStream;
      intermediary method_14410 Lnet/minecraft/class_3262;method_14410(Ljava/lang/String;)Ljava/io/InputStream;
      named openRoot Lnet/minecraft/resource/ResourcePack;openRoot(Ljava/lang/String;)Ljava/io/InputStream;
    • open

      InputStream open(ResourceType type, Identifier id) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lacv;a(Lacw;Lww;)Ljava/io/InputStream;
      intermediary method_14405 Lnet/minecraft/class_3262;method_14405(Lnet/minecraft/class_3264;Lnet/minecraft/class_2960;)Ljava/io/InputStream;
      named open Lnet/minecraft/resource/ResourcePack;open(Lnet/minecraft/resource/ResourceType;Lnet/minecraft/util/Identifier;)Ljava/io/InputStream;
    • findResources

      Collection<Identifier> findResources(ResourceType type, String namespace, String prefix, int maxDepth, Predicate<String> pathFilter)
      Mappings:
      Namespace Name Mixin selector
      official a Lacv;a(Lacw;Ljava/lang/String;Ljava/lang/String;ILjava/util/function/Predicate;)Ljava/util/Collection;
      intermediary method_14408 Lnet/minecraft/class_3262;method_14408(Lnet/minecraft/class_3264;Ljava/lang/String;Ljava/lang/String;ILjava/util/function/Predicate;)Ljava/util/Collection;
      named findResources Lnet/minecraft/resource/ResourcePack;findResources(Lnet/minecraft/resource/ResourceType;Ljava/lang/String;Ljava/lang/String;ILjava/util/function/Predicate;)Ljava/util/Collection;
    • contains

      boolean contains(ResourceType type, Identifier id)
      Mappings:
      Namespace Name Mixin selector
      official b Lacv;b(Lacw;Lww;)Z
      intermediary method_14411 Lnet/minecraft/class_3262;method_14411(Lnet/minecraft/class_3264;Lnet/minecraft/class_2960;)Z
      named contains Lnet/minecraft/resource/ResourcePack;contains(Lnet/minecraft/resource/ResourceType;Lnet/minecraft/util/Identifier;)Z
    • getNamespaces

      Set<String> getNamespaces(ResourceType type)
      Mappings:
      Namespace Name Mixin selector
      official a Lacv;a(Lacw;)Ljava/util/Set;
      intermediary method_14406 Lnet/minecraft/class_3262;method_14406(Lnet/minecraft/class_3264;)Ljava/util/Set;
      named getNamespaces Lnet/minecraft/resource/ResourcePack;getNamespaces(Lnet/minecraft/resource/ResourceType;)Ljava/util/Set;
    • parseMetadata

      @Nullable <T> T parseMetadata(ResourceMetadataReader<T> metaReader) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lacv;a(Lacz;)Ljava/lang/Object;
      intermediary method_14407 Lnet/minecraft/class_3262;method_14407(Lnet/minecraft/class_3270;)Ljava/lang/Object;
      named parseMetadata Lnet/minecraft/resource/ResourcePack;parseMetadata(Lnet/minecraft/resource/metadata/ResourceMetadataReader;)Ljava/lang/Object;
    • getName

      String getName()
      Mappings:
      Namespace Name Mixin selector
      official a Lacv;a()Ljava/lang/String;
      intermediary method_14409 Lnet/minecraft/class_3262;method_14409()Ljava/lang/String;
      named getName Lnet/minecraft/resource/ResourcePack;getName()Ljava/lang/String;
    • close

      void close()
      Specified by:
      close in interface AutoCloseable