Record Class MapDecorationType

java.lang.Object
java.lang.Record
net.minecraft.world.level.saveddata.maps.MapDecorationType

public record MapDecorationType(ResourceLocation assetId, boolean showOnItemFrame, int mapColor, boolean explorationMapElement, boolean trackCount) extends Record
  • Field Details

    • assetId

      private final ResourceLocation assetId
      The field for the assetId record component.
    • showOnItemFrame

      private final boolean showOnItemFrame
      The field for the showOnItemFrame record component.
    • mapColor

      private final int mapColor
      The field for the mapColor record component.
    • explorationMapElement

      private final boolean explorationMapElement
      The field for the explorationMapElement record component.
    • trackCount

      private final boolean trackCount
      The field for the trackCount record component.
    • NO_MAP_COLOR

      public static final int NO_MAP_COLOR
      See Also:
    • CODEC

      public static final com.mojang.serialization.Codec<Holder<MapDecorationType>> CODEC
    • STREAM_CODEC

      public static final StreamCodec<RegistryFriendlyByteBuf,Holder<MapDecorationType>> STREAM_CODEC
  • Constructor Details

    • MapDecorationType

      public MapDecorationType(ResourceLocation assetId, boolean showOnItemFrame, int mapColor, boolean explorationMapElement, boolean trackCount)
      Creates an instance of a MapDecorationType record class.
      Parameters:
      assetId - the value for the assetId record component
      showOnItemFrame - the value for the showOnItemFrame record component
      mapColor - the value for the mapColor record component
      explorationMapElement - the value for the explorationMapElement record component
      trackCount - the value for the trackCount record component
  • Method Details

    • hasMapColor

      public boolean hasMapColor()
    • 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.
    • assetId

      public ResourceLocation assetId()
      Returns the value of the assetId record component.
      Returns:
      the value of the assetId record component
    • showOnItemFrame

      public boolean showOnItemFrame()
      Returns the value of the showOnItemFrame record component.
      Returns:
      the value of the showOnItemFrame record component
    • mapColor

      public int mapColor()
      Returns the value of the mapColor record component.
      Returns:
      the value of the mapColor record component
    • explorationMapElement

      public boolean explorationMapElement()
      Returns the value of the explorationMapElement record component.
      Returns:
      the value of the explorationMapElement record component
    • trackCount

      public boolean trackCount()
      Returns the value of the trackCount record component.
      Returns:
      the value of the trackCount record component