Record Class WindDisturbancePacket
java.lang.Object
java.lang.Record
net.frozenblock.lib.wind.impl.networking.WindDisturbancePacket
- All Implemented Interfaces:
net.fabricmc.fabric.api.networking.v1.FabricPacket
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.fabricmc.fabric.api.networking.v1.FabricPacket
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.fabricmc.fabric.api.networking.v1.PacketType<WindDisturbancePacket> -
Constructor Summary
ConstructorsConstructorDescriptionWindDisturbancePacket(@NotNull net.minecraft.network.FriendlyByteBuf 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.@NotNull net.fabricmc.fabric.api.networking.v1.PacketType<?> getType()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.voidwrite(@NotNull net.minecraft.network.FriendlyByteBuf buf)
-
Field Details
-
PACKET_TYPE
public static final net.fabricmc.fabric.api.networking.v1.PacketType<WindDisturbancePacket> PACKET_TYPE
-
-
Constructor Details
-
WindDisturbancePacket
public WindDisturbancePacket(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf 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.FriendlyByteBuf buf) - Specified by:
writein interfacenet.fabricmc.fabric.api.networking.v1.FabricPacket
-
getType
@NotNull public @NotNull net.fabricmc.fabric.api.networking.v1.PacketType<?> getType()- Specified by:
getTypein interfacenet.fabricmc.fabric.api.networking.v1.FabricPacket
-
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
-