Record Class AdvancementsPacket.DisplayData
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.AdvancementsPacket.DisplayData
- All Implemented Interfaces:
ComponentHolder<AdvancementsPacket.DisplayData>
- Enclosing class:
AdvancementsPacket
public static record AdvancementsPacket.DisplayData(Component title, Component description, ItemStack icon, FrameType frameType, int flags, @Nullable String backgroundTexture, float x, float y)
extends Record
implements ComponentHolder<AdvancementsPacket.DisplayData>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebackgroundTexturerecord component.Gets the components held by this object.copyWithOperator(UnaryOperator<Component> operator) Returns a copy of this object.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.intflags()Returns the value of theflagsrecord component.Returns the value of theframeTyperecord component.final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.floatx()Returns the value of thexrecord component.floaty()Returns the value of theyrecord component.Methods inherited from interface ComponentHolder
visitComponents
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
DisplayData
public DisplayData(Component title, Component description, ItemStack icon, FrameType frameType, int flags, @Nullable @Nullable String backgroundTexture, float x, float y) Creates an instance of aDisplayDatarecord class.- Parameters:
title- the value for thetitlerecord componentdescription- the value for thedescriptionrecord componenticon- the value for theiconrecord componentframeType- the value for theframeTyperecord componentflags- the value for theflagsrecord componentbackgroundTexture- the value for thebackgroundTexturerecord componentx- the value for thexrecord componenty- the value for theyrecord component
-
-
Method Details
-
components
Description copied from interface:ComponentHolderGets the components held by this object.- Specified by:
componentsin interfaceComponentHolder<AdvancementsPacket.DisplayData>- Returns:
- the components
-
copyWithOperator
Description copied from interface:ComponentHolderReturns a copy of this object. For each component this object holds, the operator is applied to the copy before returning.- Specified by:
copyWithOperatorin interfaceComponentHolder<AdvancementsPacket.DisplayData>- Parameters:
operator- the operator- Returns:
- the copy
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
frameType
Returns the value of theframeTyperecord component.- Returns:
- the value of the
frameTyperecord component
-
flags
public int flags()Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-
backgroundTexture
-
x
public float x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public float y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-