Class Resource

java.lang.Object
net.minecraft.resource.Resource

public class Resource extends Object
A resource of binary data.

The resource must be closed before disposal to avoid resource leaks.

See Also:
Mappings:
Namespace Name
official agm
intermediary net/minecraft/class_3298
named net/minecraft/resource/Resource
  • Field Details

    • field_38684

      private final String field_38684
      Mappings:
      Namespace Name Mixin selector
      official a Lagm;a:Ljava/lang/String;
      intermediary field_38684 Lnet/minecraft/class_3298;field_38684:Ljava/lang/String;
      named field_38684 Lnet/minecraft/resource/Resource;field_38684:Ljava/lang/String;
    • field_38685

      private final Resource.class_7367<InputStream> field_38685
      Mappings:
      Namespace Name Mixin selector
      official b Lagm;b:Lagm$a;
      intermediary field_38685 Lnet/minecraft/class_3298;field_38685:Lnet/minecraft/class_3298$class_7367;
      named field_38685 Lnet/minecraft/resource/Resource;field_38685:Lnet/minecraft/resource/Resource$class_7367;
    • field_38686

      private final Resource.class_7367<class_7368> field_38686
      Mappings:
      Namespace Name Mixin selector
      official c Lagm;c:Lagm$a;
      intermediary field_38686 Lnet/minecraft/class_3298;field_38686:Lnet/minecraft/class_3298$class_7367;
      named field_38686 Lnet/minecraft/resource/Resource;field_38686:Lnet/minecraft/resource/Resource$class_7367;
    • field_38687

      @Nullable private @Nullable class_7368 field_38687
      Mappings:
      Namespace Name Mixin selector
      official d Lagm;d:Lagq;
      intermediary field_38687 Lnet/minecraft/class_3298;field_38687:Lnet/minecraft/class_7368;
      named field_38687 Lnet/minecraft/resource/Resource;field_38687:Lnet/minecraft/class_7368;
  • Constructor Details

  • Method Details

    • getResourcePackName

      public String getResourcePackName()
      Returns the user-friendly name of the pack this resource is from.
      Mappings:
      Namespace Name Mixin selector
      official a Lagm;a()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;
    • getInputStream

      public InputStream getInputStream() throws IOException
      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 b Lagm;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;
    • method_43039

      public BufferedReader method_43039() throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official c Lagm;c()Ljava/io/BufferedReader;
      intermediary method_43039 Lnet/minecraft/class_3298;method_43039()Ljava/io/BufferedReader;
      named method_43039 Lnet/minecraft/resource/Resource;method_43039()Ljava/io/BufferedReader;
    • getMetadata

      public class_7368 getMetadata() throws IOException
      Returns a metadata of this resource by the metaReader, or null if no such metadata exists.
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official d Lagm;d()Lagq;
      intermediary method_14481 Lnet/minecraft/class_3298;method_14481()Lnet/minecraft/class_7368;
      named getMetadata Lnet/minecraft/resource/Resource;getMetadata()Lnet/minecraft/class_7368;