Record Class WindSyncPacket
java.lang.Object
java.lang.Record
net.frozenblock.lib.wind.impl.networking.WindSyncPacket
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record WindSyncPacket(long windTime, long seed, boolean override, net.minecraft.world.phys.Vec3 commandWind)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B extends net.minecraft.network.FriendlyByteBuf>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B extends net.minecraft.network.FriendlyByteBuf,T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, WindSyncPacket> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<WindSyncPacket> -
Constructor Summary
ConstructorsConstructorDescriptionWindSyncPacket(long windTime, long seed, boolean override, net.minecraft.world.phys.Vec3 commandWind) Creates an instance of aWindSyncPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.Vec3Returns the value of thecommandWindrecord component.static WindSyncPacketcreate(@NotNull net.minecraft.network.FriendlyByteBuf buf) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanoverride()Returns the value of theoverriderecord component.longseed()Returns the value of theseedrecord component.final StringtoString()Returns a string representation of this record class.@NotNull net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()longwindTime()Returns the value of thewindTimerecord component.voidwrite(@NotNull net.minecraft.network.FriendlyByteBuf buf)
-
Field Details
-
PACKET_TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<WindSyncPacket> PACKET_TYPE -
CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf,WindSyncPacket> CODEC
-
-
Constructor Details
-
WindSyncPacket
public WindSyncPacket(long windTime, long seed, boolean override, net.minecraft.world.phys.Vec3 commandWind) Creates an instance of aWindSyncPacketrecord class.- Parameters:
windTime- the value for thewindTimerecord componentseed- the value for theseedrecord componentoverride- the value for theoverriderecord componentcommandWind- the value for thecommandWindrecord component
-
-
Method Details
-
create
-
write
public void write(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) -
type
@NotNull public @NotNull net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()- Specified by:
typein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
windTime
public long windTime()Returns the value of thewindTimerecord component.- Returns:
- the value of the
windTimerecord component
-
seed
public long seed()Returns the value of theseedrecord component.- Returns:
- the value of the
seedrecord component
-
override
public boolean override()Returns the value of theoverriderecord component.- Returns:
- the value of the
overriderecord component
-
commandWind
public net.minecraft.world.phys.Vec3 commandWind()Returns the value of thecommandWindrecord component.- Returns:
- the value of the
commandWindrecord component
-