类 ResourceImpl

  • 所有已实现的接口:
    Closeable, AutoCloseable, Resource

    public class ResourceImpl
    extends Object
    implements Resource
    Mappings:
    Namespace Name
    official ads
    intermediary net/minecraft/class_3306
    named net/minecraft/resource/ResourceImpl
    • 字段详细资料

      • packName

        private final String packName
        Mappings:
        Namespace Name Mixin selector
        official a Lads;a:Ljava/lang/String;
        intermediary field_14296 Lnet/minecraft/class_3306;field_14296:Ljava/lang/String;
        named packName Lnet/minecraft/resource/ResourceImpl;packName:Ljava/lang/String;
      • id

        private final Identifier id
        Mappings:
        Namespace Name Mixin selector
        official b Lads;b:Lwp;
        intermediary field_14299 Lnet/minecraft/class_3306;field_14299:Lnet/minecraft/class_2960;
        named id Lnet/minecraft/resource/ResourceImpl;id:Lnet/minecraft/util/Identifier;
      • inputStream

        private final InputStream inputStream
        Mappings:
        Namespace Name Mixin selector
        official c Lads;c:Ljava/io/InputStream;
        intermediary field_14298 Lnet/minecraft/class_3306;field_14298:Ljava/io/InputStream;
        named inputStream Lnet/minecraft/resource/ResourceImpl;inputStream:Ljava/io/InputStream;
      • metaInputStream

        private final InputStream metaInputStream
        Mappings:
        Namespace Name Mixin selector
        official d Lads;d:Ljava/io/InputStream;
        intermediary field_14300 Lnet/minecraft/class_3306;field_14300:Ljava/io/InputStream;
        named metaInputStream Lnet/minecraft/resource/ResourceImpl;metaInputStream:Ljava/io/InputStream;
      • readMetadata

        private boolean readMetadata
        Mappings:
        Namespace Name Mixin selector
        official e Lads;e:Z
        intermediary field_14297 Lnet/minecraft/class_3306;field_14297:Z
        named readMetadata Lnet/minecraft/resource/ResourceImpl;readMetadata:Z
      • metadata

        private JsonObject metadata
        Mappings:
        Namespace Name Mixin selector
        official f Lads;f:Lcom/google/gson/JsonObject;
        intermediary field_14302 Lnet/minecraft/class_3306;field_14302:Lcom/google/gson/JsonObject;
        named metadata Lnet/minecraft/resource/ResourceImpl;metadata:Lcom/google/gson/JsonObject;
    • 构造器详细资料

      • ResourceImpl

        public ResourceImpl​(String packName,
                            Identifier id,
                            InputStream inputStream,
                            @Nullable
                            @Nullable InputStream metaInputStream)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lads;<init>(Ljava/lang/String;Lwp;Ljava/io/InputStream;Ljava/io/InputStream;)V
        intermediary <init> Lnet/minecraft/class_3306;<init>(Ljava/lang/String;Lnet/minecraft/class_2960;Ljava/io/InputStream;Ljava/io/InputStream;)V
        named <init> Lnet/minecraft/resource/ResourceImpl;<init>(Ljava/lang/String;Lnet/minecraft/util/Identifier;Ljava/io/InputStream;Ljava/io/InputStream;)V
    • 方法详细资料

      • getId

        public Identifier getId()
        Returns the location of this resource.

        Within each resource pack, this location is a unique identifer for a resource; however, in a resource manager, there may be multiple resources with the same location available.

        指定者:
        getId 在接口中 Resource
        Mappings:
        Namespace Name Mixin selector
        official a Ladk;a()Lwp;
        intermediary method_14483 Lnet/minecraft/class_3298;method_14483()Lnet/minecraft/class_2960;
        named getId Lnet/minecraft/resource/Resource;getId()Lnet/minecraft/util/Identifier;
      • getInputStream

        public InputStream getInputStream()
        Returns the input stream of this resource.

        This input stream is closed when this resource is closed.

        指定者:
        getInputStream 在接口中 Resource
        Mappings:
        Namespace Name Mixin selector
        official b Ladk;b()Ljava/io/InputStream;
        intermediary method_14482 Lnet/minecraft/class_3298;method_14482()Ljava/io/InputStream;
        named getInputStream Lnet/minecraft/resource/Resource;getInputStream()Ljava/io/InputStream;
      • hasMetadata

        public boolean hasMetadata()
        Returns if this resource has any metadata.
        指定者:
        hasMetadata 在接口中 Resource
        Mappings:
        Namespace Name Mixin selector
        official c Ladk;c()Z
        intermediary method_14484 Lnet/minecraft/class_3298;method_14484()Z
        named hasMetadata Lnet/minecraft/resource/Resource;hasMetadata()Z
      • getMetadata

        @Nullable
        public <T> T getMetadata​(ResourceMetadataReader<T> metaReader)
        Returns a metadata of this resource by the metaReader, or null if no such metadata exists.
        指定者:
        getMetadata 在接口中 Resource
        参数:
        metaReader - the metadata reader
        Mappings:
        Namespace Name Mixin selector
        official a Ladk;a(Lacr;)Ljava/lang/Object;
        intermediary method_14481 Lnet/minecraft/class_3298;method_14481(Lnet/minecraft/class_3270;)Ljava/lang/Object;
        named getMetadata Lnet/minecraft/resource/Resource;getMetadata(Lnet/minecraft/resource/metadata/ResourceMetadataReader;)Ljava/lang/Object;
      • getResourcePackName

        public String getResourcePackName()
        Returns the user-friendly name of the pack this resource is from.
        指定者:
        getResourcePackName 在接口中 Resource
        Mappings:
        Namespace Name Mixin selector
        official d Ladk;d()Ljava/lang/String;
        intermediary method_14480 Lnet/minecraft/class_3298;method_14480()Ljava/lang/String;
        named getResourcePackName Lnet/minecraft/resource/Resource;getResourcePackName()Ljava/lang/String;
      • equals

        public boolean equals​(Object o)
        覆盖:
        equals 在类中 Object
        Mappings:
        Namespace Name Mixin selector
        official equals Lads;equals(Ljava/lang/Object;)Z
        intermediary equals Lnet/minecraft/class_3306;equals(Ljava/lang/Object;)Z
        named equals Lnet/minecraft/resource/ResourceImpl;equals(Ljava/lang/Object;)Z
      • hashCode

        public int hashCode()
        覆盖:
        hashCode 在类中 Object
        Mappings:
        Namespace Name Mixin selector
        official hashCode Lads;hashCode()I
        intermediary hashCode Lnet/minecraft/class_3306;hashCode()I
        named hashCode Lnet/minecraft/resource/ResourceImpl;hashCode()I
      • close

        public void close()
                   throws IOException
        指定者:
        close 在接口中 AutoCloseable
        指定者:
        close 在接口中 Closeable
        抛出:
        IOException
        Mappings:
        Namespace Name Mixin selector
        official close Lads;close()V
        intermediary close Lnet/minecraft/class_3306;close()V
        named close Lnet/minecraft/resource/ResourceImpl;close()V