Record Class ServerBoundTeleportPacket
java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.common.network.packets.world.ServerBoundTeleportPacket
- All Implemented Interfaces:
AbstractPacket<ServerBoundTeleportPacket>, net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record ServerBoundTeleportPacket(org.joml.Vector3fc position)
extends Record
implements AbstractPacket<ServerBoundTeleportPacket>
-
Nested Class Summary
Nested classes/interfaces inherited from interface AbstractPacket
AbstractPacket.Definition<T>Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B,T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AbstractPacket.Definition<ServerBoundTeleportPacket> -
Constructor Summary
ConstructorsConstructorDescriptionServerBoundTeleportPacket(org.joml.Vector3fc position) Creates an instance of aServerBoundTeleportPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ServerBoundTeleportPacket> getCodec()net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ServerBoundTeleportPacket> getType()voidhandleServer(net.neoforged.neoforge.network.handling.IPayloadContext ctx) final inthashCode()Returns a hash code value for this object.org.joml.Vector3fcposition()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface AbstractPacket
handleClient, typeMethods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
DEFINITION
-
-
Constructor Details
-
ServerBoundTeleportPacket
public ServerBoundTeleportPacket(org.joml.Vector3fc position) Creates an instance of aServerBoundTeleportPacketrecord class.- Parameters:
position- the value for thepositionrecord component
-
-
Method Details
-
getType
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ServerBoundTeleportPacket> getType()- Specified by:
getTypein interfaceAbstractPacket<ServerBoundTeleportPacket>
-
getBoundTo
- Specified by:
getBoundToin interfaceAbstractPacket<ServerBoundTeleportPacket>
-
getCodec
public net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ServerBoundTeleportPacket> getCodec()- Specified by:
getCodecin interfaceAbstractPacket<ServerBoundTeleportPacket>
-
handleServer
public void handleServer(net.neoforged.neoforge.network.handling.IPayloadContext ctx) - Specified by:
handleServerin interfaceAbstractPacket<ServerBoundTeleportPacket>
-
toString
-
hashCode
-
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 withObjects::equals(Object,Object). -
position
public org.joml.Vector3fc position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-