Record Class PaintingVariant

java.lang.Object
java.lang.Record
net.minecraft.entity.decoration.painting.PaintingVariant
Record Components:
width -
height -
assetId -
title -
author -

public record PaintingVariant(int width, int height, Identifier assetId, Optional<Text> title, Optional<Text> author) extends Record
Mappings:
Namespace Name
named net/minecraft/entity/decoration/painting/PaintingVariant
intermediary net/minecraft/class_1535
official clw
named width
intermediary comp_2670
official e
named height
intermediary comp_2671
official f
named assetId
intermediary comp_2672
official g
named title
intermediary comp_2918
official h
named author
intermediary comp_2919
official i
  • Field Details

    • width

      private final int width
      The field for the width record component.
    • height

      private final int height
      The field for the height record component.
    • assetId

      private final Identifier assetId
      The field for the assetId record component.
    • title

      private final Optional<Text> title
      The field for the title record component.
    • author

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

      public static final com.mojang.serialization.Codec<PaintingVariant> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/entity/decoration/painting/PaintingVariant;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_51596 Lnet/minecraft/class_1535;field_51596:Lcom/mojang/serialization/Codec;
      official a Lclw;a:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,PaintingVariant> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/entity/decoration/painting/PaintingVariant;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_51945 Lnet/minecraft/class_1535;field_51945:Lnet/minecraft/class_9139;
      official b Lclw;b:Lzt;
    • ENTRY_CODEC

      public static final com.mojang.serialization.Codec<RegistryEntry<PaintingVariant>> ENTRY_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ENTRY_CODEC Lnet/minecraft/entity/decoration/painting/PaintingVariant;ENTRY_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_51597 Lnet/minecraft/class_1535;field_51597:Lcom/mojang/serialization/Codec;
      official c Lclw;c:Lcom/mojang/serialization/Codec;
    • ENTRY_PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,RegistryEntry<PaintingVariant>> ENTRY_PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ENTRY_PACKET_CODEC Lnet/minecraft/entity/decoration/painting/PaintingVariant;ENTRY_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_51946 Lnet/minecraft/class_1535;field_51946:Lnet/minecraft/class_9139;
      official d Lclw;d:Lzt;
  • Constructor Details

    • PaintingVariant

      public PaintingVariant(int width, int height, Identifier identifier, Optional<Text> optional, Optional<Text> optional2)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/decoration/painting/PaintingVariant;<init>(IILnet/minecraft/util/Identifier;Ljava/util/Optional;Ljava/util/Optional;)V
      intermediary <init> Lnet/minecraft/class_1535;<init>(IILnet/minecraft/class_2960;Ljava/util/Optional;Ljava/util/Optional;)V
      official <init> Lclw;<init>(IILalz;Ljava/util/Optional;Ljava/util/Optional;)V
  • Method Details

    • getArea

      public int getArea()
      Mappings:
      Namespace Name Mixin selector
      named getArea Lnet/minecraft/entity/decoration/painting/PaintingVariant;getArea()I
      intermediary method_59947 Lnet/minecraft/class_1535;method_59947()I
      official a Lclw;a()I
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • width

      public int width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • height

      public int height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • assetId

      public Identifier assetId()
      Returns the value of the assetId record component.
      Returns:
      the value of the assetId record component
    • title

      public Optional<Text> title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • author

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