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/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 Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<ItemDialogBody> private final Optional
<PlainMessageDialogBody> The field for thedescription
record component.private final int
The field for theheight
record component.private final ItemStack
The field for theitem
record component.private final boolean
The field for theshowDecorations
record component.private final boolean
The field for theshowTooltip
record component.private final int
The field for thewidth
record 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 thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.com.mojang.serialization.MapCodec
<ItemDialogBody> final int
hashCode()
Returns a hash code value for this object.int
height()
Returns the value of theheight
record component.item()
Returns the value of theitem
record component.boolean
Returns the value of theshowDecorations
record component.boolean
Returns the value of theshowTooltip
record component.final String
toString()
Returns a string representation of this record class.int
width()
Returns the value of thewidth
record component.
-
Field Details
-
item
The field for theitem
record component. -
description
The field for thedescription
record component. -
showDecorations
private final boolean showDecorationsThe field for theshowDecorations
record component. -
showTooltip
private final boolean showTooltipThe field for theshowTooltip
record component. -
width
private final int widthThe field for thewidth
record component. -
height
private final int heightThe field for theheight
record component. -
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
-
ItemDialogBody
public ItemDialogBody(ItemStack itemStack, Optional<PlainMessageDialogBody> optional, boolean bool, boolean bool2, int int2, int int3)
-
-
Method Details
-
getTypeCodec
- Specified by:
getTypeCodec
in interfaceDialogBody
- 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
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 theitem
record component.- Returns:
- the value of the
item
record component
-
description
Returns the value of thedescription
record component.- Returns:
- the value of the
description
record component
-
showDecorations
public boolean showDecorations()Returns the value of theshowDecorations
record component.- Returns:
- the value of the
showDecorations
record component
-
showTooltip
public boolean showTooltip()Returns the value of theshowTooltip
record component.- Returns:
- the value of the
showTooltip
record component
-
width
public int width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-
height
public int height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-