Package net.minecraft.resource
Class Resource
java.lang.Object
net.minecraft.resource.Resource
A resource of binary data.
The resource must be closed before disposal to avoid resource leaks.
- See Also:
- Mappings:
Namespace Name official aqg
intermediary net/minecraft/class_3298
named net/minecraft/resource/Resource
-
Field Summary
Modifier and TypeFieldDescriptionprivate final InputSupplier<InputStream>
private @Nullable ResourceMetadata
private final InputSupplier<ResourceMetadata>
private final ResourcePack
-
Constructor Summary
ConstructorDescriptionResource
(ResourcePack pack, InputSupplier<InputStream> inputSupplier) Resource
(ResourcePack pack, InputSupplier<InputStream> inputSupplier, InputSupplier<ResourceMetadata> metadataSupplier) -
Method Summary
Modifier and TypeMethodDescriptionReturns the input stream of this resource.Returns the metadata for the resource.getPack()
Returns the user-friendly name of the pack this resource is from.boolean
-
Field Details
-
pack
- Mappings:
Namespace Name Mixin selector official a
Laqg;a:Laow;
intermediary field_40054
Lnet/minecraft/class_3298;field_40054:Lnet/minecraft/class_3262;
named pack
Lnet/minecraft/resource/Resource;pack:Lnet/minecraft/resource/ResourcePack;
-
inputSupplier
- Mappings:
Namespace Name Mixin selector official b
Laqg;b:Laqa;
intermediary field_38685
Lnet/minecraft/class_3298;field_38685:Lnet/minecraft/class_7367;
named inputSupplier
Lnet/minecraft/resource/Resource;inputSupplier:Lnet/minecraft/resource/InputSupplier;
-
metadataSupplier
- Mappings:
Namespace Name Mixin selector official c
Laqg;c:Laqa;
intermediary field_38686
Lnet/minecraft/class_3298;field_38686:Lnet/minecraft/class_7367;
named metadataSupplier
Lnet/minecraft/resource/Resource;metadataSupplier:Lnet/minecraft/resource/InputSupplier;
-
metadata
- Mappings:
Namespace Name Mixin selector official d
Laqg;d:Laqk;
intermediary field_38687
Lnet/minecraft/class_3298;field_38687:Lnet/minecraft/class_7368;
named metadata
Lnet/minecraft/resource/Resource;metadata:Lnet/minecraft/resource/metadata/ResourceMetadata;
-
-
Constructor Details
-
Resource
public Resource(ResourcePack pack, InputSupplier<InputStream> inputSupplier, InputSupplier<ResourceMetadata> metadataSupplier) - Mappings:
Namespace Name Mixin selector official <init>
Laqg;<init>(Laow;Laqa;Laqa;)V
intermediary <init>
Lnet/minecraft/class_3298;<init>(Lnet/minecraft/class_3262;Lnet/minecraft/class_7367;Lnet/minecraft/class_7367;)V
named <init>
Lnet/minecraft/resource/Resource;<init>(Lnet/minecraft/resource/ResourcePack;Lnet/minecraft/resource/InputSupplier;Lnet/minecraft/resource/InputSupplier;)V
-
Resource
- Mappings:
Namespace Name Mixin selector official <init>
Laqg;<init>(Laow;Laqa;)V
intermediary <init>
Lnet/minecraft/class_3298;<init>(Lnet/minecraft/class_3262;Lnet/minecraft/class_7367;)V
named <init>
Lnet/minecraft/resource/Resource;<init>(Lnet/minecraft/resource/ResourcePack;Lnet/minecraft/resource/InputSupplier;)V
-
-
Method Details
-
getPack
- Mappings:
Namespace Name Mixin selector official a
Laqg;a()Laow;
intermediary method_45304
Lnet/minecraft/class_3298;method_45304()Lnet/minecraft/class_3262;
named getPack
Lnet/minecraft/resource/Resource;getPack()Lnet/minecraft/resource/ResourcePack;
-
getResourcePackName
Returns the user-friendly name of the pack this resource is from.- Mappings:
Namespace Name Mixin selector official b
Laqg;b()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;
-
isAlwaysStable
public boolean isAlwaysStable()- Mappings:
Namespace Name Mixin selector official c
Laqg;c()Z
intermediary method_45305
Lnet/minecraft/class_3298;method_45305()Z
named isAlwaysStable
Lnet/minecraft/resource/Resource;isAlwaysStable()Z
-
getInputStream
Returns the input stream of this resource.This input stream is closed when this resource is closed.
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector official d
Laqg;d()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;
-
getReader
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector official e
Laqg;e()Ljava/io/BufferedReader;
intermediary method_43039
Lnet/minecraft/class_3298;method_43039()Ljava/io/BufferedReader;
named getReader
Lnet/minecraft/resource/Resource;getReader()Ljava/io/BufferedReader;
-
getMetadata
Returns the metadata for the resource.The metadata must then be decoded using
ResourceMetadata.decode(ResourceMetadataReader)
before using.- Returns:
- the metadata for the resource
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector official f
Laqg;f()Laqk;
intermediary method_14481
Lnet/minecraft/class_3298;method_14481()Lnet/minecraft/class_7368;
named getMetadata
Lnet/minecraft/resource/Resource;getMetadata()Lnet/minecraft/resource/metadata/ResourceMetadata;
-