Record Class MapIcon

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

public record MapIcon(MapIcon.Type type, byte x, byte z, byte rotation, Optional<Text> name) extends Record
Mappings:
Namespace Name
official emk
intermediary net/minecraft/class_20
named net/minecraft/item/map/MapIcon
official b
intermediary comp_1842
named type
official c
intermediary comp_1843
named x
official d
intermediary comp_1844
named z
official e
intermediary comp_1845
named rotation
official f
intermediary comp_1846
named name
  • 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.
    • name

      private final Optional<Text> name
      The field for the name record component.
    • CODEC

      public static final PacketCodec<RegistryByteBuf,MapIcon> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Lemk;a:Lyg;
      intermediary field_48920 Lnet/minecraft/class_20;field_48920:Lnet/minecraft/class_9139;
      named CODEC Lnet/minecraft/item/map/MapIcon;CODEC:Lnet/minecraft/network/codec/PacketCodec;
  • Constructor Details

    • MapIcon

      public MapIcon(MapIcon.Type type, byte x, byte z, byte rotation, Optional<Text> optional)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lemk;<init>(Lemk$a;BBBLjava/util/Optional;)V
      intermediary <init> Lnet/minecraft/class_20;<init>(Lnet/minecraft/class_20$class_21;BBBLjava/util/Optional;)V
      named <init> Lnet/minecraft/item/map/MapIcon;<init>(Lnet/minecraft/item/map/MapIcon$Type;BBBLjava/util/Optional;)V
  • Method Details

    • getTypeId

      public byte getTypeId()
      Mappings:
      Namespace Name Mixin selector
      official a Lemk;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 Lemk;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
    • name

      public Optional<Text> name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component