Record Class ItemDialogBody

java.lang.Object
java.lang.Record
net.minecraft.dialog.body.ItemDialogBody
Record Components:
item -
description -
showDecorations -
showTooltip -
width -
height -
All Implemented Interfaces:
DialogBody

public record ItemDialogBody(ItemStack item, Optional<PlainMessageDialogBody> description, boolean showDecorations, boolean showTooltip, int width, int height) extends Record implements DialogBody
Mappings:
Namespace Name
named net/minecraft/dialog/body/ItemDialogBody
intermediary net/minecraft/class_11434
official asm
named item
intermediary comp_4324
official d
named description
intermediary comp_4325
official e
named showDecorations
intermediary comp_4326
official f
named showTooltip
intermediary comp_4327
official g
named width
intermediary comp_4328
official h
named height
intermediary comp_4329
official i
  • Field Details

    • item

      private final ItemStack item
      The field for the item record component.
    • description

      private final Optional<PlainMessageDialogBody> description
      The field for the description record component.
    • showDecorations

      private final boolean showDecorations
      The field for the showDecorations record component.
    • showTooltip

      private final boolean showTooltip
      The field for the showTooltip record component.
    • width

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

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

      public static final com.mojang.serialization.MapCodec<ItemDialogBody> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/dialog/body/ItemDialogBody;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_60639 Lnet/minecraft/class_11434;field_60639:Lcom/mojang/serialization/MapCodec;
      official c Lasm;c:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

  • Method Details

    • getTypeCodec

      public com.mojang.serialization.MapCodec<ItemDialogBody> getTypeCodec()
      Specified by:
      getTypeCodec in interface DialogBody
      Mappings:
      Namespace Name Mixin selector
      named getTypeCodec Lnet/minecraft/dialog/body/DialogBody;getTypeCodec()Lcom/mojang/serialization/MapCodec;
      intermediary method_71711 Lnet/minecraft/class_11432;method_71711()Lcom/mojang/serialization/MapCodec;
      official a Lask;a()Lcom/mojang/serialization/MapCodec;
    • 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.
    • item

      public ItemStack item()
      Returns the value of the item record component.
      Returns:
      the value of the item record component
    • description

      public Optional<PlainMessageDialogBody> description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • showDecorations

      public boolean showDecorations()
      Returns the value of the showDecorations record component.
      Returns:
      the value of the showDecorations record component
    • showTooltip

      public boolean showTooltip()
      Returns the value of the showTooltip record component.
      Returns:
      the value of the showTooltip record component
    • 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