Record Class WindDisturbancePacket
java.lang.Object
java.lang.Record
net.frozenblock.lib.wind.impl.networking.WindDisturbancePacket
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record WindDisturbancePacket(net.minecraft.world.phys.AABB affectedArea, net.minecraft.world.phys.Vec3 origin, WindDisturbanceLogic.SourceType disturbanceSourceType, net.minecraft.resources.ResourceLocation id, long posOrID)
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.RegistryFriendlyByteBuf, WindDisturbancePacket> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<WindDisturbancePacket> -
Constructor Summary
ConstructorsConstructorDescriptionWindDisturbancePacket(@NotNull net.minecraft.network.RegistryFriendlyByteBuf buf) WindDisturbancePacket(net.minecraft.world.phys.AABB affectedArea, net.minecraft.world.phys.Vec3 origin, WindDisturbanceLogic.SourceType disturbanceSourceType, net.minecraft.resources.ResourceLocation id, long posOrID) Creates an instance of aWindDisturbancePacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.AABBReturns the value of theaffectedArearecord component.Returns the value of thedisturbanceSourceTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.net.minecraft.world.phys.Vec3origin()Returns the value of theoriginrecord component.longposOrID()Returns the value of theposOrIDrecord component.final StringtoString()Returns a string representation of this record class.@NotNull net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<?> type()voidwrite(@NotNull net.minecraft.network.RegistryFriendlyByteBuf buf)
-
Field Details
-
PACKET_TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<WindDisturbancePacket> PACKET_TYPE -
CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,WindDisturbancePacket> CODEC
-
-
Constructor Details
-
WindDisturbancePacket
public WindDisturbancePacket(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buf) -
WindDisturbancePacket
public WindDisturbancePacket(net.minecraft.world.phys.AABB affectedArea, net.minecraft.world.phys.Vec3 origin, WindDisturbanceLogic.SourceType disturbanceSourceType, net.minecraft.resources.ResourceLocation id, long posOrID) Creates an instance of aWindDisturbancePacketrecord class.- Parameters:
affectedArea- the value for theaffectedArearecord componentorigin- the value for theoriginrecord componentdisturbanceSourceType- the value for thedisturbanceSourceTyperecord componentid- the value for theidrecord componentposOrID- the value for theposOrIDrecord component
-
-
Method Details
-
write
public void write(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buf) -
type
@NotNull public @NotNull net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<?> 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 '=='. -
affectedArea
public net.minecraft.world.phys.AABB affectedArea()Returns the value of theaffectedArearecord component.- Returns:
- the value of the
affectedArearecord component
-
origin
public net.minecraft.world.phys.Vec3 origin()Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
disturbanceSourceType
Returns the value of thedisturbanceSourceTyperecord component.- Returns:
- the value of the
disturbanceSourceTyperecord component
-
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
posOrID
public long posOrID()Returns the value of theposOrIDrecord component.- Returns:
- the value of the
posOrIDrecord component
-