InitializeWorldBorderPacket
class
Declaration
[ProtocolSupport(755, 777)]
[Packet("play.toClient.initialize_world_border", PacketPhase.Play, PacketDirection.Clientbound)]
[PacketField("X", "double")]
[PacketField("Z", "double")]
[PacketField("OldDiameter", "double")]
[PacketField("NewDiameter", "double")]
[PacketField("Speed", "long")]
[PacketField("PortalTeleportBoundary", "int")]
[PacketField("WarningBlocks", "int")]
[PacketField("WarningTime", "int")]
public sealed record InitializeWorldBorderPacket : IPacket<InitializeWorldBorderPacket>, IProtocolType<InitializeWorldBorderPacket>, IPacket
| Namespace | McProtoNet.Protocol.Packets.Play.Clientbound |
| Assembly | McProtoNet.Protocol.dll |
| Source | src/McProtoNet.Protocol/Generated/Packets/Play/Clientbound/InitializeWorldBorderPacket.cs#L6 ↗ |
Implements: IPacket<InitializeWorldBorderPacket>, IProtocolType<InitializeWorldBorderPacket>, IPacket
Constructors
| Signature | Description |
|---|---|
InitializeWorldBorderPacket(double X, double Z, double OldDiameter, double NewDiameter, long Speed, int PortalTeleportBoundary, int WarningBlocks, int WarningTime) | - |
InitializeWorldBorderPacket(double, double, double, double, long, int, int, int)
public InitializeWorldBorderPacket(double X, double Z, double OldDiameter, double NewDiameter, long Speed, int PortalTeleportBoundary, int WarningBlocks, int WarningTime)
Parameters: X (double), Z (double), OldDiameter (double), NewDiameter (double), Speed (long), PortalTeleportBoundary (int), WarningBlocks (int), WarningTime (int)
Properties
| Signature | Description |
|---|---|
static PacketIdentity Identity | Gets the identity of the packet type. |
double NewDiameter | - |
double OldDiameter | - |
int PortalTeleportBoundary | - |
long Speed | - |
int WarningBlocks | - |
int WarningTime | - |
double X | - |
double Z | - |
Identity
public static PacketIdentity Identity { get; }
Gets the identity of the packet type.
Returns: PacketIdentity
NewDiameter
public double NewDiameter { get; init; }
Returns: double
OldDiameter
public double OldDiameter { get; init; }
Returns: double
PortalTeleportBoundary
public int PortalTeleportBoundary { get; init; }
Returns: int
Speed
public long Speed { get; init; }
Returns: long
WarningBlocks
public int WarningBlocks { get; init; }
Returns: int
WarningTime
public int WarningTime { get; init; }
Returns: int
X
public double X { get; init; }
Returns: double
Z
public double Z { get; init; }
Returns: double
Methods
| Signature | Description |
|---|---|
static int GetPacketId(int protocolVersion) | - |
static InitializeWorldBorderPacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion) | Reads a value of type InitializeWorldBorderPacket from the specified reader. |
static bool TryGetPacketId(int protocolVersion, out int id) | Attempts to get the wire id of the packet for the specified protocol version. |
void Write(MinecraftPrimitiveWriter writer, int protocolVersion) | Writes the current value to the specified writer. |
GetPacketId(int)
public static int GetPacketId(int protocolVersion)
Parameters: protocolVersion (int)
Returns: int
Read(ref MinecraftPrimitiveReader, int)
public static InitializeWorldBorderPacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion)
Reads a value of type InitializeWorldBorderPacket from the specified reader.
Parameters: reader (MinecraftPrimitiveReader), protocolVersion (int)
Returns: InitializeWorldBorderPacket - The value that was read.
TryGetPacketId(int, out int)
public static bool TryGetPacketId(int protocolVersion, out int id)
Attempts to get the wire id of the packet for the specified protocol version.
Parameters: protocolVersion (int), id (int)
Returns: bool - true if the packet exists on the specified protocol version; otherwise, false.
Write(MinecraftPrimitiveWriter, int)
public void Write(MinecraftPrimitiveWriter writer, int protocolVersion)
Writes the current value to the specified writer.
Parameters: writer (MinecraftPrimitiveWriter), protocolVersion (int)