Record Class SyncConfigValuesPacket
java.lang.Object
java.lang.Record
dev.cammiescorner.icarus.network.s2c.SyncConfigValuesPacket
public record SyncConfigValuesPacket(float wingsSpeed, float maxSlowedMultiplier, boolean armorSlows, boolean canLoopDeLoop, float requiredFoodAmount)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocationstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, SyncConfigValuesPacket> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<net.minecraft.network.protocol.common.custom.CustomPacketPayload> -
Constructor Summary
ConstructorsConstructorDescriptionSyncConfigValuesPacket(float wingsSpeed, float maxSlowedMultiplier, boolean armorSlows, boolean canLoopDeLoop, float requiredFoodAmount) Creates an instance of aSyncConfigValuesPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thearmorSlowsrecord component.booleanReturns the value of thecanLoopDeLooprecord component.final booleanIndicates whether some other object is "equal to" this one.static voidhandle(commonnetwork.networking.data.PacketContext<SyncConfigValuesPacket> ctx) final inthashCode()Returns a hash code value for this object.floatReturns the value of themaxSlowedMultiplierrecord component.floatReturns the value of therequiredFoodAmountrecord component.static voidsend(net.minecraft.server.level.ServerPlayer player) final StringtoString()Returns a string representation of this record class.floatReturns the value of thewingsSpeedrecord component.
-
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,SyncConfigValuesPacket> STREAM_CODEC
-
-
Constructor Details
-
SyncConfigValuesPacket
public SyncConfigValuesPacket(float wingsSpeed, float maxSlowedMultiplier, boolean armorSlows, boolean canLoopDeLoop, float requiredFoodAmount) Creates an instance of aSyncConfigValuesPacketrecord class.- Parameters:
wingsSpeed- the value for thewingsSpeedrecord componentmaxSlowedMultiplier- the value for themaxSlowedMultiplierrecord componentarmorSlows- the value for thearmorSlowsrecord componentcanLoopDeLoop- the value for thecanLoopDeLooprecord componentrequiredFoodAmount- the value for therequiredFoodAmountrecord component
-
-
Method Details
-
send
public static void send(net.minecraft.server.level.ServerPlayer player) -
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 '=='. -
wingsSpeed
public float wingsSpeed()Returns the value of thewingsSpeedrecord component.- Returns:
- the value of the
wingsSpeedrecord component
-
maxSlowedMultiplier
public float maxSlowedMultiplier()Returns the value of themaxSlowedMultiplierrecord component.- Returns:
- the value of the
maxSlowedMultiplierrecord component
-
armorSlows
public boolean armorSlows()Returns the value of thearmorSlowsrecord component.- Returns:
- the value of the
armorSlowsrecord component
-
canLoopDeLoop
public boolean canLoopDeLoop()Returns the value of thecanLoopDeLooprecord component.- Returns:
- the value of the
canLoopDeLooprecord component
-
requiredFoodAmount
public float requiredFoodAmount()Returns the value of therequiredFoodAmountrecord component.- Returns:
- the value of the
requiredFoodAmountrecord component
-