Package net.minecraft.dialog.body
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/ItemDialogBodyintermediary net/minecraft/class_11434official assnamed itemintermediary comp_4324official dnamed descriptionintermediary comp_4325official enamed showDecorationsintermediary comp_4326official fnamed showTooltipintermediary comp_4327official gnamed widthintermediary comp_4328official hnamed heightintermediary comp_4329official i
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ItemDialogBody> private final Optional<PlainMessageDialogBody> The field for thedescriptionrecord component.private final intThe field for theheightrecord component.private final ItemStackThe field for theitemrecord component.private final booleanThe field for theshowDecorationsrecord component.private final booleanThe field for theshowTooltiprecord component.private final intThe field for thewidthrecord component.Fields inherited from interface net.minecraft.dialog.body.DialogBody
LIST_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionItemDialogBody(ItemStack itemStack, Optional<PlainMessageDialogBody> optional, boolean bool, boolean bool2, int int2, int int3) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.com.mojang.serialization.MapCodec<ItemDialogBody> final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.item()Returns the value of theitemrecord component.booleanReturns the value of theshowDecorationsrecord component.booleanReturns the value of theshowTooltiprecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Field Details
-
item
The field for theitemrecord component. -
description
The field for thedescriptionrecord component. -
showDecorations
private final boolean showDecorationsThe field for theshowDecorationsrecord component. -
showTooltip
private final boolean showTooltipThe field for theshowTooltiprecord component. -
width
private final int widthThe field for thewidthrecord component. -
height
private final int heightThe field for theheightrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/dialog/body/ItemDialogBody;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_60639Lnet/minecraft/class_11434;field_60639:Lcom/mojang/serialization/MapCodec;official cLass;c:Lcom/mojang/serialization/MapCodec;
-
-
Constructor Details
-
ItemDialogBody
public ItemDialogBody(ItemStack itemStack, Optional<PlainMessageDialogBody> optional, boolean bool, boolean bool2, int int2, int int3)
-
-
Method Details
-
getTypeCodec
- Specified by:
getTypeCodecin interfaceDialogBody- Mappings:
Namespace Name Mixin selector named getTypeCodecLnet/minecraft/dialog/body/DialogBody;getTypeCodec()Lcom/mojang/serialization/MapCodec;intermediary method_71711Lnet/minecraft/class_11432;method_71711()Lcom/mojang/serialization/MapCodec;official aLasq;a()Lcom/mojang/serialization/MapCodec;
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
item
Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
showDecorations
public boolean showDecorations()Returns the value of theshowDecorationsrecord component.- Returns:
- the value of the
showDecorationsrecord component
-
showTooltip
public boolean showTooltip()Returns the value of theshowTooltiprecord component.- Returns:
- the value of the
showTooltiprecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-