Record Class MapBannerMarker

java.lang.Object
java.lang.Record
net.minecraft.item.map.MapBannerMarker
Record Components:
pos -
color -
name -

public record MapBannerMarker(BlockPos pos, DyeColor color, Optional<Text> name) extends Record
Represents a banner marker in world.

Used to track banners in a map state.

Mappings:
Namespace Name
named net/minecraft/item/map/MapBannerMarker
intermediary net/minecraft/class_17
official eqm
named pos
intermediary comp_2312
official c
named color
intermediary comp_2313
official d
named name
intermediary comp_2314
official e
  • Field Details

    • pos

      private final BlockPos pos
      The field for the pos record component.
    • color

      private final DyeColor color
      The field for the color record component.
    • name

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

      public static final com.mojang.serialization.Codec<MapBannerMarker> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/item/map/MapBannerMarker;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_48918 Lnet/minecraft/class_17;field_48918:Lcom/mojang/serialization/Codec;
      official a Leqm;a:Lcom/mojang/serialization/Codec;
    • LIST_CODEC

      public static final com.mojang.serialization.Codec<List<MapBannerMarker>> LIST_CODEC
      Mappings:
      Namespace Name Mixin selector
      named LIST_CODEC Lnet/minecraft/item/map/MapBannerMarker;LIST_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_48919 Lnet/minecraft/class_17;field_48919:Lcom/mojang/serialization/Codec;
      official b Leqm;b:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • MapBannerMarker

      public MapBannerMarker(BlockPos pos, DyeColor dyeColor, Optional<Text> optional)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/item/map/MapBannerMarker;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/DyeColor;Ljava/util/Optional;)V
      intermediary <init> Lnet/minecraft/class_17;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_1767;Ljava/util/Optional;)V
      official <init> Leqm;<init>(Ljd;Lcti;Ljava/util/Optional;)V
  • Method Details

    • fromWorldBlock

      @Nullable public static @Nullable MapBannerMarker fromWorldBlock(BlockView blockView, BlockPos blockPos)
      Mappings:
      Namespace Name Mixin selector
      named fromWorldBlock Lnet/minecraft/item/map/MapBannerMarker;fromWorldBlock(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/item/map/MapBannerMarker;
      intermediary method_73 Lnet/minecraft/class_17;method_73(Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Lnet/minecraft/class_17;
      official a Leqm;a(Ldcc;Ljd;)Leqm;
    • getDecorationType

      public RegistryEntry<MapDecorationType> getDecorationType()
      Mappings:
      Namespace Name Mixin selector
      named getDecorationType Lnet/minecraft/item/map/MapBannerMarker;getDecorationType()Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary method_72 Lnet/minecraft/class_17;method_72()Lnet/minecraft/class_6880;
      official a Leqm;a()Ljm;
    • getKey

      public String getKey()
      Mappings:
      Namespace Name Mixin selector
      named getKey Lnet/minecraft/item/map/MapBannerMarker;getKey()Ljava/lang/String;
      intermediary method_71 Lnet/minecraft/class_17;method_71()Ljava/lang/String;
      official b Leqm;b()Ljava/lang/String;
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • pos

      public BlockPos pos()
      Returns the value of the pos record component.
      Returns:
      the value of the pos record component
    • color

      public DyeColor color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component
    • name

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