Record Class ClientboundHurtAnimationPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundHurtAnimationPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundHurtAnimationPacket(int id, float yaw)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theidrecord component.static final StreamCodec<FriendlyByteBuf, ClientboundHurtAnimationPacket> private final floatThe field for theyawrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionClientboundHurtAnimationPacket(int id, float yaw) Creates an instance of aClientboundHurtAnimationPacketrecord class.private -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener listener) Passes this Packet on to the PacketListener for processing.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.type()private voidwrite(FriendlyByteBuf output) floatyaw()Returns the value of theyawrecord component.Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
id
private final int idThe field for theidrecord component. -
yaw
private final float yawThe field for theyawrecord component. -
STREAM_CODEC
-
-
Constructor Details
-
ClientboundHurtAnimationPacket
-
ClientboundHurtAnimationPacket
-
ClientboundHurtAnimationPacket
public ClientboundHurtAnimationPacket(int id, float yaw) Creates an instance of aClientboundHurtAnimationPacketrecord class.- Parameters:
id- the value for theidrecord componentyaw- the value for theyawrecord component
-
-
Method Details
-
write
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
Description copied from interface:PacketPasses this Packet on to the PacketListener for processing.- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
yaw
public float yaw()Returns the value of theyawrecord component.- Returns:
- the value of the
yawrecord component
-