Record Class MapIcon

java.lang.Object
java.lang.Record
net.minecraft.item.map.MapIcon
Record Components:
type -
x -
z -
rotation -
text -

public record MapIcon(MapIcon.Type type, byte x, byte z, byte rotation, @Nullable Text text) extends Record
Mappings:
Namespace Name
official efy
intermediary net/minecraft/class_20
named net/minecraft/item/map/MapIcon
official a
intermediary comp_1842
named type
official b
intermediary comp_1843
named x
official c
intermediary comp_1844
named z
official d
intermediary comp_1845
named rotation
official e
intermediary comp_1846
named text
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final byte
    The field for the rotation record component.
    private final @Nullable Text
    The field for the text record component.
    private final MapIcon.Type
    The field for the type record component.
    private final byte
    The field for the x record component.
    private final byte
    The field for the z record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MapIcon(MapIcon.Type type, byte x, byte z, byte rotation, @Nullable Text text)
    Creates an instance of a MapIcon record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    byte
     
    final int
    Returns a hash code value for this object.
    boolean
     
    byte
    Returns the value of the rotation record component.
    Returns the value of the text record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the type record component.
    byte
    x()
    Returns the value of the x record component.
    byte
    z()
    Returns the value of the z record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • type

      private final MapIcon.Type type
      The field for the type record component.
    • x

      private final byte x
      The field for the x record component.
    • z

      private final byte z
      The field for the z record component.
    • rotation

      private final byte rotation
      The field for the rotation record component.
    • text

      @Nullable private final @Nullable Text text
      The field for the text record component.
  • Constructor Details

    • MapIcon

      public MapIcon(MapIcon.Type type, byte x, byte z, byte rotation, @Nullable @Nullable Text text)
      Creates an instance of a MapIcon record class.
      Parameters:
      type - the value for the type record component
      x - the value for the x record component
      z - the value for the z record component
      rotation - the value for the rotation record component
      text - the value for the text record component
  • Method Details

    • getTypeId

      public byte getTypeId()
      Mappings:
      Namespace Name Mixin selector
      official a Lefy;a()B
      intermediary method_92 Lnet/minecraft/class_20;method_92()B
      named getTypeId Lnet/minecraft/item/map/MapIcon;getTypeId()B
    • isAlwaysRendered

      public boolean isAlwaysRendered()
      Mappings:
      Namespace Name Mixin selector
      official b Lefy;b()Z
      intermediary method_94 Lnet/minecraft/class_20;method_94()Z
      named isAlwaysRendered Lnet/minecraft/item/map/MapIcon;isAlwaysRendered()Z
    • 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 o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • type

      public MapIcon.Type type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • x

      public byte x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • z

      public byte z()
      Returns the value of the z record component.
      Returns:
      the value of the z record component
    • rotation

      public byte rotation()
      Returns the value of the rotation record component.
      Returns:
      the value of the rotation record component
    • text

      @Nullable public @Nullable Text text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component