Record Class ClientboundUpdateAdvancementsPacket.PositionedAdvancement
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundUpdateAdvancementsPacket.PositionedAdvancement
- Enclosing class:
ClientboundUpdateAdvancementsPacket
public static record ClientboundUpdateAdvancementsPacket.PositionedAdvancement(AdvancementHolder advancement, float x, float y)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AdvancementHolderThe field for theadvancementrecord component.static final StreamCodec<RegistryFriendlyByteBuf, ClientboundUpdateAdvancementsPacket.PositionedAdvancement> private final floatThe field for thexrecord component.private final floatThe field for theyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPositionedAdvancement(AdvancementHolder advancement, float x, float y) Creates an instance of aPositionedAdvancementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadvancementrecord component.final booleanIndicates whether some other object is "equal to" this one.fromNode(AdvancementNode node) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.floatx()Returns the value of thexrecord component.floaty()Returns the value of theyrecord component.
-
Field Details
-
advancement
The field for theadvancementrecord component. -
x
private final float xThe field for thexrecord component. -
y
private final float yThe field for theyrecord component. -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, ClientboundUpdateAdvancementsPacket.PositionedAdvancement> STREAM_CODEC
-
-
Constructor Details
-
PositionedAdvancement
Creates an instance of aPositionedAdvancementrecord class.- Parameters:
advancement- the value for theadvancementrecord componentx- the value for thexrecord componenty- the value for theyrecord component
-
-
Method Details
-
fromNode
public static ClientboundUpdateAdvancementsPacket.PositionedAdvancement fromNode(AdvancementNode node) -
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. -
advancement
Returns the value of theadvancementrecord component.- Returns:
- the value of the
advancementrecord component
-
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
-