Record Class SingleAtlasSource

java.lang.Object
java.lang.Record
net.minecraft.client.texture.atlas.SingleAtlasSource
Record Components:
resource -
sprite -
All Implemented Interfaces:
AtlasSource

@Environment(CLIENT) public record SingleAtlasSource(Identifier resource, Optional<Identifier> sprite) extends Record implements AtlasSource
Mappings:
Namespace Name
named net/minecraft/client/texture/atlas/SingleAtlasSource
intermediary net/minecraft/class_7955
official hil
named resource
intermediary comp_3619
official c
named sprite
intermediary comp_3620
official d
  • Field Details

    • resource

      private final Identifier resource
      The field for the resource record component.
    • sprite

      private final Optional<Identifier> sprite
      The field for the sprite record component.
    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/client/texture/atlas/SingleAtlasSource;LOGGER:Lorg/slf4j/Logger;
      intermediary field_41403 Lnet/minecraft/class_7955;field_41403:Lorg/slf4j/Logger;
      official e Lhil;e:Lorg/slf4j/Logger;
    • CODEC

      public static final com.mojang.serialization.MapCodec<SingleAtlasSource> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/client/texture/atlas/SingleAtlasSource;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_41402 Lnet/minecraft/class_7955;field_41402:Lcom/mojang/serialization/MapCodec;
      official b Lhil;b:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

    • SingleAtlasSource

      public SingleAtlasSource(Identifier identifier)
    • SingleAtlasSource

      public SingleAtlasSource(Identifier resource, Optional<Identifier> sprite)
      Creates an instance of a SingleAtlasSource record class.
      Parameters:
      resource - the value for the resource record component
      sprite - the value for the sprite record component
  • Method Details

    • load

      public void load(ResourceManager resourceManager, AtlasSource.SpriteRegions regions)
      Specified by:
      load in interface AtlasSource
      Mappings:
      Namespace Name Mixin selector
      named load Lnet/minecraft/client/texture/atlas/AtlasSource;load(Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/client/texture/atlas/AtlasSource$SpriteRegions;)V
      intermediary method_47673 Lnet/minecraft/class_7948;method_47673(Lnet/minecraft/class_3300;Lnet/minecraft/class_7948$class_7949;)V
      official a Lhie;a(Lavb;Lhie$a;)V
    • method_67288

      public com.mojang.serialization.MapCodec<SingleAtlasSource> method_67288()
      Specified by:
      method_67288 in interface AtlasSource
      Mappings:
      Namespace Name Mixin selector
      named method_67288 Lnet/minecraft/client/texture/atlas/AtlasSource;method_67288()Lcom/mojang/serialization/MapCodec;
      intermediary method_67288 Lnet/minecraft/class_7948;method_67288()Lcom/mojang/serialization/MapCodec;
      official a Lhie;a()Lcom/mojang/serialization/MapCodec;
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • resource

      public Identifier resource()
      Returns the value of the resource record component.
      Returns:
      the value of the resource record component
    • sprite

      public Optional<Identifier> sprite()
      Returns the value of the sprite record component.
      Returns:
      the value of the sprite record component