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 agmintermediary net/minecraft/class_3298named net/minecraft/resource/Resource
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final Resource.class_7367<InputStream>private final Resource.class_7367<class_7368>private @Nullable class_7368 -
Constructor Summary
ConstructorsConstructorDescriptionResource(String string, Resource.class_7367<InputStream> class_7367) Resource(String string, Resource.class_7367<InputStream> class_7367, Resource.class_7367<class_7368> class_73672) -
Method Summary
Modifier and TypeMethodDescriptionReturns the input stream of this resource.Returns a metadata of this resource by themetaReader, ornullif no such metadata exists.Returns the user-friendly name of the pack this resource is from.
-
Field Details
-
field_38684
- Mappings:
Namespace Name Mixin selector official aLagm;a:Ljava/lang/String;intermediary field_38684Lnet/minecraft/class_3298;field_38684:Ljava/lang/String;named field_38684Lnet/minecraft/resource/Resource;field_38684:Ljava/lang/String;
-
field_38685
- Mappings:
Namespace Name Mixin selector official bLagm;b:Lagm$a;intermediary field_38685Lnet/minecraft/class_3298;field_38685:Lnet/minecraft/class_3298$class_7367;named field_38685Lnet/minecraft/resource/Resource;field_38685:Lnet/minecraft/resource/Resource$class_7367;
-
field_38686
- Mappings:
Namespace Name Mixin selector official cLagm;c:Lagm$a;intermediary field_38686Lnet/minecraft/class_3298;field_38686:Lnet/minecraft/class_3298$class_7367;named field_38686Lnet/minecraft/resource/Resource;field_38686:Lnet/minecraft/resource/Resource$class_7367;
-
field_38687
- Mappings:
Namespace Name Mixin selector official dLagm;d:Lagq;intermediary field_38687Lnet/minecraft/class_3298;field_38687:Lnet/minecraft/class_7368;named field_38687Lnet/minecraft/resource/Resource;field_38687:Lnet/minecraft/class_7368;
-
-
Constructor Details
-
Resource
public Resource(String string, Resource.class_7367<InputStream> class_7367, Resource.class_7367<class_7368> class_73672) -
Resource
-
-
Method Details
-
getResourcePackName
Returns the user-friendly name of the pack this resource is from.- Mappings:
Namespace Name Mixin selector official aLagm;a()Ljava/lang/String;intermediary method_14480Lnet/minecraft/class_3298;method_14480()Ljava/lang/String;named getResourcePackNameLnet/minecraft/resource/Resource;getResourcePackName()Ljava/lang/String;
-
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 bLagm;b()Ljava/io/InputStream;intermediary method_14482Lnet/minecraft/class_3298;method_14482()Ljava/io/InputStream;named getInputStreamLnet/minecraft/resource/Resource;getInputStream()Ljava/io/InputStream;
-
method_43039
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official cLagm;c()Ljava/io/BufferedReader;intermediary method_43039Lnet/minecraft/class_3298;method_43039()Ljava/io/BufferedReader;named method_43039Lnet/minecraft/resource/Resource;method_43039()Ljava/io/BufferedReader;
-
getMetadata
Returns a metadata of this resource by themetaReader, ornullif no such metadata exists.- Throws:
IOException- Mappings:
Namespace Name Mixin selector official dLagm;d()Lagq;intermediary method_14481Lnet/minecraft/class_3298;method_14481()Lnet/minecraft/class_7368;named getMetadataLnet/minecraft/resource/Resource;getMetadata()Lnet/minecraft/class_7368;
-