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 named net/minecraft/resource/Resourceintermediary net/minecraft/class_3298official auc
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final InputSupplier<InputStream> private @Nullable ResourceMetadataprivate final InputSupplier<ResourceMetadata> private final ResourcePack -
Constructor Summary
ConstructorsConstructorDescriptionResource(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 ID of the pack this resource is from.
-
Field Details
-
pack
- Mappings:
Namespace Name Mixin selector named packLnet/minecraft/resource/Resource;pack:Lnet/minecraft/resource/ResourcePack;intermediary field_40054Lnet/minecraft/class_3298;field_40054:Lnet/minecraft/class_3262;official aLauc;a:Lasq;
-
inputSupplier
- Mappings:
Namespace Name Mixin selector named inputSupplierLnet/minecraft/resource/Resource;inputSupplier:Lnet/minecraft/resource/InputSupplier;intermediary field_38685Lnet/minecraft/class_3298;field_38685:Lnet/minecraft/class_7367;official bLauc;b:Latw;
-
metadataSupplier
- Mappings:
Namespace Name Mixin selector named metadataSupplierLnet/minecraft/resource/Resource;metadataSupplier:Lnet/minecraft/resource/InputSupplier;intermediary field_38686Lnet/minecraft/class_3298;field_38686:Lnet/minecraft/class_7367;official cLauc;c:Latw;
-
metadata
- Mappings:
Namespace Name Mixin selector named metadataLnet/minecraft/resource/Resource;metadata:Lnet/minecraft/resource/metadata/ResourceMetadata;intermediary field_38687Lnet/minecraft/class_3298;field_38687:Lnet/minecraft/class_7368;official dLauc;d:Laug;
-
-
Constructor Details
-
Resource
public Resource(ResourcePack pack, InputSupplier<InputStream> inputSupplier, InputSupplier<ResourceMetadata> metadataSupplier) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/resource/Resource;<init>(Lnet/minecraft/resource/ResourcePack;Lnet/minecraft/resource/InputSupplier;Lnet/minecraft/resource/InputSupplier;)Vintermediary <init>Lnet/minecraft/class_3298;<init>(Lnet/minecraft/class_3262;Lnet/minecraft/class_7367;Lnet/minecraft/class_7367;)Vofficial <init>Lauc;<init>(Lasq;Latw;Latw;)V
-
Resource
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/resource/Resource;<init>(Lnet/minecraft/resource/ResourcePack;Lnet/minecraft/resource/InputSupplier;)Vintermediary <init>Lnet/minecraft/class_3298;<init>(Lnet/minecraft/class_3262;Lnet/minecraft/class_7367;)Vofficial <init>Lauc;<init>(Lasq;Latw;)V
-
-
Method Details
-
getPack
- Mappings:
Namespace Name Mixin selector named getPackLnet/minecraft/resource/Resource;getPack()Lnet/minecraft/resource/ResourcePack;intermediary method_45304Lnet/minecraft/class_3298;method_45304()Lnet/minecraft/class_3262;official aLauc;a()Lasq;
-
getPackId
Returns the ID of the pack this resource is from.- Returns:
- the ID of the pack this resource is from
- Mappings:
Namespace Name Mixin selector named getPackIdLnet/minecraft/resource/Resource;getPackId()Ljava/lang/String;intermediary method_14480Lnet/minecraft/class_3298;method_14480()Ljava/lang/String;official bLauc;b()Ljava/lang/String;
-
getKnownPackInfo
- Mappings:
Namespace Name Mixin selector named getKnownPackInfoLnet/minecraft/resource/Resource;getKnownPackInfo()Ljava/util/Optional;intermediary method_56936Lnet/minecraft/class_3298;method_56936()Ljava/util/Optional;official cLauc;c()Ljava/util/Optional;
-
getInputStream
Returns the input stream of this resource.This input stream is closed when this resource is closed.
- Returns:
- the input stream of this resource
- Throws:
IOException- Mappings:
Namespace Name Mixin selector named getInputStreamLnet/minecraft/resource/Resource;getInputStream()Ljava/io/InputStream;intermediary method_14482Lnet/minecraft/class_3298;method_14482()Ljava/io/InputStream;official dLauc;d()Ljava/io/InputStream;
-
getReader
- Throws:
IOException- Mappings:
Namespace Name Mixin selector named getReaderLnet/minecraft/resource/Resource;getReader()Ljava/io/BufferedReader;intermediary method_43039Lnet/minecraft/class_3298;method_43039()Ljava/io/BufferedReader;official eLauc;e()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 named getMetadataLnet/minecraft/resource/Resource;getMetadata()Lnet/minecraft/resource/metadata/ResourceMetadata;intermediary method_14481Lnet/minecraft/class_3298;method_14481()Lnet/minecraft/class_7368;official fLauc;f()Laug;
-