类 ResourceImpl
- java.lang.Object
-
- net.minecraft.resource.ResourceImpl
-
- 所有已实现的接口:
Closeable,AutoCloseable,Resource
public class ResourceImpl extends Object implements Resource
- Mappings:
Namespace Name official adsintermediary net/minecraft/class_3306named net/minecraft/resource/ResourceImpl
-
-
字段概要
字段 修饰符和类型 字段 说明 private Identifieridprivate InputStreaminputStreamprivate JsonObjectmetadataprivate InputStreammetaInputStreamprivate StringpackNameprivate booleanreadMetadata
-
构造器概要
构造器 构造器 说明 ResourceImpl(String packName, Identifier id, InputStream inputStream, @Nullable InputStream metaInputStream)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidclose()booleanequals(Object o)IdentifiergetId()Returns the location of this resource.InputStreamgetInputStream()Returns the input stream of this resource.<T> TgetMetadata(ResourceMetadataReader<T> metaReader)Returns a metadata of this resource by themetaReader, ornullif no such metadata exists.StringgetResourcePackName()Returns the user-friendly name of the pack this resource is from.inthashCode()booleanhasMetadata()Returns if this resource has any metadata.
-
-
-
字段详细资料
-
packName
private final String packName
- Mappings:
Namespace Name Mixin selector official aLads;a:Ljava/lang/String;intermediary field_14296Lnet/minecraft/class_3306;field_14296:Ljava/lang/String;named packNameLnet/minecraft/resource/ResourceImpl;packName:Ljava/lang/String;
-
id
private final Identifier id
- Mappings:
Namespace Name Mixin selector official bLads;b:Lwp;intermediary field_14299Lnet/minecraft/class_3306;field_14299:Lnet/minecraft/class_2960;named idLnet/minecraft/resource/ResourceImpl;id:Lnet/minecraft/util/Identifier;
-
inputStream
private final InputStream inputStream
- Mappings:
Namespace Name Mixin selector official cLads;c:Ljava/io/InputStream;intermediary field_14298Lnet/minecraft/class_3306;field_14298:Ljava/io/InputStream;named inputStreamLnet/minecraft/resource/ResourceImpl;inputStream:Ljava/io/InputStream;
-
metaInputStream
private final InputStream metaInputStream
- Mappings:
Namespace Name Mixin selector official dLads;d:Ljava/io/InputStream;intermediary field_14300Lnet/minecraft/class_3306;field_14300:Ljava/io/InputStream;named metaInputStreamLnet/minecraft/resource/ResourceImpl;metaInputStream:Ljava/io/InputStream;
-
readMetadata
private boolean readMetadata
- Mappings:
Namespace Name Mixin selector official eLads;e:Zintermediary field_14297Lnet/minecraft/class_3306;field_14297:Znamed readMetadataLnet/minecraft/resource/ResourceImpl;readMetadata:Z
-
metadata
private JsonObject metadata
- Mappings:
Namespace Name Mixin selector official fLads;f:Lcom/google/gson/JsonObject;intermediary field_14302Lnet/minecraft/class_3306;field_14302:Lcom/google/gson/JsonObject;named metadataLnet/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;)Vintermediary <init>Lnet/minecraft/class_3306;<init>(Ljava/lang/String;Lnet/minecraft/class_2960;Ljava/io/InputStream;Ljava/io/InputStream;)Vnamed <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.
-
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 bLadk;b()Ljava/io/InputStream;intermediary method_14482Lnet/minecraft/class_3298;method_14482()Ljava/io/InputStream;named getInputStreamLnet/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 cLadk;c()Zintermediary method_14484Lnet/minecraft/class_3298;method_14484()Znamed hasMetadataLnet/minecraft/resource/Resource;hasMetadata()Z
-
getMetadata
@Nullable public <T> T getMetadata(ResourceMetadataReader<T> metaReader)
Returns a metadata of this resource by themetaReader, ornullif no such metadata exists.- 指定者:
getMetadata在接口中Resource- 参数:
metaReader- the metadata reader- Mappings:
Namespace Name Mixin selector official aLadk;a(Lacr;)Ljava/lang/Object;intermediary method_14481Lnet/minecraft/class_3298;method_14481(Lnet/minecraft/class_3270;)Ljava/lang/Object;named getMetadataLnet/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 dLadk;d()Ljava/lang/String;intermediary method_14480Lnet/minecraft/class_3298;method_14480()Ljava/lang/String;named getResourcePackNameLnet/minecraft/resource/Resource;getResourcePackName()Ljava/lang/String;
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
close
public void close() throws IOException- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable- 抛出:
IOException- Mappings:
Namespace Name Mixin selector official closeLads;close()Vintermediary closeLnet/minecraft/class_3306;close()Vnamed closeLnet/minecraft/resource/ResourceImpl;close()V
-
-