类 DefaultResourcePack

    • 字段详细资料

      • resourcePath

        public static Path resourcePath
        Mappings:
        Namespace Name Mixin selector
        official a Lacq;a:Ljava/nio/file/Path;
        intermediary field_14196 Lnet/minecraft/class_3268;field_14196:Ljava/nio/file/Path;
        named resourcePath Lnet/minecraft/resource/DefaultResourcePack;resourcePath:Ljava/nio/file/Path;
      • LOGGER

        private static final Logger LOGGER
        Mappings:
        Namespace Name Mixin selector
        official g Lacq;g:Lorg/apache/logging/log4j/Logger;
        intermediary field_14195 Lnet/minecraft/class_3268;field_14195:Lorg/apache/logging/log4j/Logger;
        named LOGGER Lnet/minecraft/resource/DefaultResourcePack;LOGGER:Lorg/apache/logging/log4j/Logger;
      • resourceClass

        public static Class<?> resourceClass
        Mappings:
        Namespace Name Mixin selector
        official b Lacq;b:Ljava/lang/Class;
        intermediary field_14194 Lnet/minecraft/class_3268;field_14194:Ljava/lang/Class;
        named resourceClass Lnet/minecraft/resource/DefaultResourcePack;resourceClass:Ljava/lang/Class;
      • typeToFileSystem

        private static final Map<ResourceType,​FileSystem> typeToFileSystem
        Mappings:
        Namespace Name Mixin selector
        official h Lacq;h:Ljava/util/Map;
        intermediary field_17917 Lnet/minecraft/class_3268;field_17917:Ljava/util/Map;
        named typeToFileSystem Lnet/minecraft/resource/DefaultResourcePack;typeToFileSystem:Ljava/util/Map;
      • metadata

        public final PackResourceMetadata metadata
        Mappings:
        Namespace Name Mixin selector
        official e Lacq;e:Lacs;
        intermediary field_26938 Lnet/minecraft/class_3268;field_26938:Lnet/minecraft/class_3272;
        named metadata Lnet/minecraft/resource/DefaultResourcePack;metadata:Lnet/minecraft/resource/metadata/PackResourceMetadata;
      • namespaces

        public final Set<String> namespaces
        Mappings:
        Namespace Name Mixin selector
        official f Lacq;f:Ljava/util/Set;
        intermediary field_14193 Lnet/minecraft/class_3268;field_14193:Ljava/util/Set;
        named namespaces Lnet/minecraft/resource/DefaultResourcePack;namespaces:Ljava/util/Set;
    • 构造器详细资料

      • DefaultResourcePack

        public DefaultResourcePack​(PackResourceMetadata metadata,
                                   String[] namespaces)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lacq;<init>(Lacs;[Ljava/lang/String;)V
        intermediary <init> Lnet/minecraft/class_3268;<init>(Lnet/minecraft/class_3272;[Ljava/lang/String;)V
        named <init> Lnet/minecraft/resource/DefaultResourcePack;<init>(Lnet/minecraft/resource/metadata/PackResourceMetadata;[Ljava/lang/String;)V
    • 方法详细资料

      • openRoot

        public InputStream openRoot​(String fileName)
                             throws IOException
        指定者:
        openRoot 在接口中 ResourcePack
        抛出:
        IOException
        Mappings:
        Namespace Name Mixin selector
        official b Lacn;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

        public InputStream open​(ResourceType type,
                                Identifier id)
                         throws IOException
        指定者:
        open 在接口中 ResourcePack
        抛出:
        IOException
        Mappings:
        Namespace Name Mixin selector
        official a Lacn;a(Laco;Lwp;)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

        public Collection<Identifier> findResources​(ResourceType type,
                                                    String namespace,
                                                    String prefix,
                                                    int maxDepth,
                                                    Predicate<String> pathFilter)
        指定者:
        findResources 在接口中 ResourcePack
        Mappings:
        Namespace Name Mixin selector
        official a Lacn;a(Laco;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;
      • getIdentifiers

        private static void getIdentifiers​(Collection<Identifier> results,
                                           int maxDepth,
                                           String namespace,
                                           Path root,
                                           String prefix,
                                           Predicate<String> pathFilter)
                                    throws IOException
        抛出:
        IOException
        Mappings:
        Namespace Name Mixin selector
        official a Lacq;a(Ljava/util/Collection;ILjava/lang/String;Ljava/nio/file/Path;Ljava/lang/String;Ljava/util/function/Predicate;)V
        intermediary method_14418 Lnet/minecraft/class_3268;method_14418(Ljava/util/Collection;ILjava/lang/String;Ljava/nio/file/Path;Ljava/lang/String;Ljava/util/function/Predicate;)V
        named getIdentifiers Lnet/minecraft/resource/DefaultResourcePack;getIdentifiers(Ljava/util/Collection;ILjava/lang/String;Ljava/nio/file/Path;Ljava/lang/String;Ljava/util/function/Predicate;)V
      • findInputStream

        @Nullable
        protected @Nullable InputStream findInputStream​(ResourceType type,
                                                        Identifier id)
        Mappings:
        Namespace Name Mixin selector
        official c Lacq;c(Laco;Lwp;)Ljava/io/InputStream;
        intermediary method_14416 Lnet/minecraft/class_3268;method_14416(Lnet/minecraft/class_3264;Lnet/minecraft/class_2960;)Ljava/io/InputStream;
        named findInputStream Lnet/minecraft/resource/DefaultResourcePack;findInputStream(Lnet/minecraft/resource/ResourceType;Lnet/minecraft/util/Identifier;)Ljava/io/InputStream;
      • getPath

        private static String getPath​(ResourceType type,
                                      Identifier id)
        Mappings:
        Namespace Name Mixin selector
        official d Lacq;d(Laco;Lwp;)Ljava/lang/String;
        intermediary method_20729 Lnet/minecraft/class_3268;method_20729(Lnet/minecraft/class_3264;Lnet/minecraft/class_2960;)Ljava/lang/String;
        named getPath Lnet/minecraft/resource/DefaultResourcePack;getPath(Lnet/minecraft/resource/ResourceType;Lnet/minecraft/util/Identifier;)Ljava/lang/String;
      • isValidUrl

        private static boolean isValidUrl​(String fileName,
                                          @Nullable
                                          @Nullable URL url)
                                   throws IOException
        抛出:
        IOException
        Mappings:
        Namespace Name Mixin selector
        official a Lacq;a(Ljava/lang/String;Ljava/net/URL;)Z
        intermediary method_20728 Lnet/minecraft/class_3268;method_20728(Ljava/lang/String;Ljava/net/URL;)Z
        named isValidUrl Lnet/minecraft/resource/DefaultResourcePack;isValidUrl(Ljava/lang/String;Ljava/net/URL;)Z
      • getInputStream

        @Nullable
        protected @Nullable InputStream getInputStream​(String path)
        Mappings:
        Namespace Name Mixin selector
        official a Lacq;a(Ljava/lang/String;)Ljava/io/InputStream;
        intermediary method_14417 Lnet/minecraft/class_3268;method_14417(Ljava/lang/String;)Ljava/io/InputStream;
        named getInputStream Lnet/minecraft/resource/DefaultResourcePack;getInputStream(Ljava/lang/String;)Ljava/io/InputStream;
      • contains

        public boolean contains​(ResourceType type,
                                Identifier id)
        指定者:
        contains 在接口中 ResourcePack
        Mappings:
        Namespace Name Mixin selector
        official b Lacn;b(Laco;Lwp;)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

        public Set<String> getNamespaces​(ResourceType type)
        指定者:
        getNamespaces 在接口中 ResourcePack
        Mappings:
        Namespace Name Mixin selector
        official a Lacn;a(Laco;)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
        public <T> T parseMetadata​(ResourceMetadataReader<T> metaReader)
                            throws IOException
        指定者:
        parseMetadata 在接口中 ResourcePack
        抛出:
        IOException
        Mappings:
        Namespace Name Mixin selector
        official a Lacn;a(Lacr;)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

        public String getName()
        指定者:
        getName 在接口中 ResourcePack
        Mappings:
        Namespace Name Mixin selector
        official a Lacn;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

        public void close()
        指定者:
        close 在接口中 AutoCloseable
        指定者:
        close 在接口中 ResourcePack
        Mappings:
        Namespace Name Mixin selector
        official close Lacn;close()V
        intermediary close Lnet/minecraft/class_3262;close()V
        named close Lnet/minecraft/resource/ResourcePack;close()V
      • getResource

        public Resource getResource​(Identifier id)
                             throws IOException
        Finds and returns the corresponding resource for a resource's identifier.

        Starts by scanning each resource pack from highest priority to lowest. If no resource packs were found to contain the requested entry, will throw a FileNotFoundException.

        The returned resource must be closed to avoid resource leaks.

        指定者:
        getResource 在接口中 ResourceFactory
        参数:
        id - the resource identifier to search for
        抛出:
        FileNotFoundException - if the identified resource could not be found, or could not be loaded.
        IOException - if the identified resource was found but a stream to it could not be opened.
        Mappings:
        Namespace Name Mixin selector
        official a Ladn;a(Lwp;)Ladk;
        intermediary method_14486 Lnet/minecraft/class_5912;method_14486(Lnet/minecraft/class_2960;)Lnet/minecraft/class_3298;
        named getResource Lnet/minecraft/resource/ResourceFactory;getResource(Lnet/minecraft/util/Identifier;)Lnet/minecraft/resource/Resource;