Record Class InitializeWorldBorderPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.InitializeWorldBorderPacket
- All Implemented Interfaces:
NetworkBuffer.Writer
,SendablePacket
,ServerPacket
,ServerPacket.Play
public record InitializeWorldBorderPacket(double x, double z, double oldDiameter, double newDiameter, long speed, int portalTeleportBoundary, int warningTime, int warningBlocks)
extends Record
implements ServerPacket.Play
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.network.packet.server.ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status
-
Constructor Summary
ConstructorDescriptionInitializeWorldBorderPacket
(double x, double z, double oldDiameter, double newDiameter, long speed, int portalTeleportBoundary, int warningTime, int warningBlocks) Creates an instance of aInitializeWorldBorderPacket
record class.InitializeWorldBorderPacket
(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.double
Returns the value of thenewDiameter
record component.double
Returns the value of theoldDiameter
record component.int
playId()
int
Returns the value of theportalTeleportBoundary
record component.long
speed()
Returns the value of thespeed
record component.final String
toString()
Returns a string representation of this record class.int
Returns the value of thewarningBlocks
record component.int
Returns the value of thewarningTime
record component.void
write
(@NotNull NetworkBuffer writer) double
x()
Returns the value of thex
record component.double
z()
Returns the value of thez
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minestom.server.network.packet.server.ServerPacket
getId
-
Constructor Details
-
InitializeWorldBorderPacket
-
InitializeWorldBorderPacket
public InitializeWorldBorderPacket(double x, double z, double oldDiameter, double newDiameter, long speed, int portalTeleportBoundary, int warningTime, int warningBlocks) Creates an instance of aInitializeWorldBorderPacket
record class.- Parameters:
x
- the value for thex
record componentz
- the value for thez
record componentoldDiameter
- the value for theoldDiameter
record componentnewDiameter
- the value for thenewDiameter
record componentspeed
- the value for thespeed
record componentportalTeleportBoundary
- the value for theportalTeleportBoundary
record componentwarningTime
- the value for thewarningTime
record componentwarningBlocks
- the value for thewarningBlocks
record component
-
-
Method Details
-
write
- Specified by:
write
in interfaceNetworkBuffer.Writer
-
playId
public int playId()- Specified by:
playId
in interfaceServerPacket.Play
-
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. All components in this record class are compared with '=='. -
x
public double x()Returns the value of thex
record component.- Returns:
- the value of the
x
record component
-
z
public double z()Returns the value of thez
record component.- Returns:
- the value of the
z
record component
-
oldDiameter
public double oldDiameter()Returns the value of theoldDiameter
record component.- Returns:
- the value of the
oldDiameter
record component
-
newDiameter
public double newDiameter()Returns the value of thenewDiameter
record component.- Returns:
- the value of the
newDiameter
record component
-
speed
public long speed()Returns the value of thespeed
record component.- Returns:
- the value of the
speed
record component
-
portalTeleportBoundary
public int portalTeleportBoundary()Returns the value of theportalTeleportBoundary
record component.- Returns:
- the value of the
portalTeleportBoundary
record component
-
warningTime
public int warningTime()Returns the value of thewarningTime
record component.- Returns:
- the value of the
warningTime
record component
-
warningBlocks
public int warningBlocks()Returns the value of thewarningBlocks
record component.- Returns:
- the value of the
warningBlocks
record component
-