Record Class SyncFlightStaminaPacket
java.lang.Object
java.lang.Record
dev.cammiescorner.icarus.network.s2c.SyncFlightStaminaPacket
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocationstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, SyncFlightStaminaPacket> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<net.minecraft.network.protocol.common.custom.CustomPacketPayload> -
Constructor Summary
ConstructorsConstructorDescriptionSyncFlightStaminaPacket(float stamina) Creates an instance of aSyncFlightStaminaPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static voidhandle(commonnetwork.networking.data.PacketContext<SyncFlightStaminaPacket> ctx) final inthashCode()Returns a hash code value for this object.static voidsend(net.minecraft.server.level.ServerPlayer player, float stamina) floatstamina()Returns the value of thestaminarecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
ID
public static final net.minecraft.resources.ResourceLocation ID -
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<net.minecraft.network.protocol.common.custom.CustomPacketPayload> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf,SyncFlightStaminaPacket> STREAM_CODEC
-
-
Constructor Details
-
SyncFlightStaminaPacket
public SyncFlightStaminaPacket(float stamina) Creates an instance of aSyncFlightStaminaPacketrecord class.- Parameters:
stamina- the value for thestaminarecord component
-
-
Method Details
-
send
public static void send(net.minecraft.server.level.ServerPlayer player, float stamina) -
handle
-
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. All components in this record class are compared with '=='. -
stamina
public float stamina()Returns the value of thestaminarecord component.- Returns:
- the value of the
staminarecord component
-