Record Class ExplosionPacket

java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.ExplosionPacket
All Implemented Interfaces:
NetworkBuffer.Writer, SendablePacket, ServerPacket, ServerPacket.Play

public record ExplosionPacket(double x, double y, double z, float radius, byte @NotNull [] records, float playerMotionX, float playerMotionY, float playerMotionZ, @NotNull ExplosionPacket.BlockInteraction blockInteraction, int smallParticleId, byte @NotNull [] smallParticleData, int largeParticleId, byte @NotNull [] largeParticleData, @NotNull String soundName, boolean hasFixedSoundRange, float soundRange) extends Record implements ServerPacket.Play
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     

    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

    Constructors
    Constructor
    Description
    ExplosionPacket(double x, double y, double z, float radius, byte @NotNull [] records, float playerMotionX, float playerMotionY, float playerMotionZ)
     
    ExplosionPacket(double x, double y, double z, float radius, byte @NotNull [] records, float playerMotionX, float playerMotionY, float playerMotionZ, @NotNull ExplosionPacket.BlockInteraction blockInteraction, int smallParticleId, byte @NotNull [] smallParticleData, int largeParticleId, byte @NotNull [] largeParticleData, @NotNull String soundName, boolean hasFixedSoundRange, float soundRange)
    Creates an instance of a ExplosionPacket record class.
    ExplosionPacket(@NotNull NetworkBuffer reader)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the blockInteraction record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the hasFixedSoundRange record component.
    final int
    Returns a hash code value for this object.
    byte @NotNull []
    Returns the value of the largeParticleData record component.
    int
    Returns the value of the largeParticleId record component.
    float
    Returns the value of the playerMotionX record component.
    float
    Returns the value of the playerMotionY record component.
    float
    Returns the value of the playerMotionZ record component.
    int
     
    float
    Returns the value of the radius record component.
    byte @NotNull []
    Returns the value of the records record component.
    byte @NotNull []
    Returns the value of the smallParticleData record component.
    int
    Returns the value of the smallParticleId record component.
    @NotNull String
    Returns the value of the soundName record component.
    float
    Returns the value of the soundRange record component.
    final String
    Returns a string representation of this record class.
    void
    write(@NotNull NetworkBuffer writer)
     
    double
    x()
    Returns the value of the x record component.
    double
    y()
    Returns the value of the y record component.
    double
    z()
    Returns the value of the z 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

    • ExplosionPacket

      public ExplosionPacket(@NotNull @NotNull NetworkBuffer reader)
    • ExplosionPacket

      public ExplosionPacket(double x, double y, double z, float radius, byte @NotNull [] records, float playerMotionX, float playerMotionY, float playerMotionZ)
    • ExplosionPacket

      public ExplosionPacket(double x, double y, double z, float radius, byte @NotNull [] records, float playerMotionX, float playerMotionY, float playerMotionZ, @NotNull @NotNull ExplosionPacket.BlockInteraction blockInteraction, int smallParticleId, byte @NotNull [] smallParticleData, int largeParticleId, byte @NotNull [] largeParticleData, @NotNull @NotNull String soundName, boolean hasFixedSoundRange, float soundRange)
      Creates an instance of a ExplosionPacket record class.
      Parameters:
      x - the value for the x record component
      y - the value for the y record component
      z - the value for the z record component
      radius - the value for the radius record component
      records - the value for the records record component
      playerMotionX - the value for the playerMotionX record component
      playerMotionY - the value for the playerMotionY record component
      playerMotionZ - the value for the playerMotionZ record component
      blockInteraction - the value for the blockInteraction record component
      smallParticleId - the value for the smallParticleId record component
      smallParticleData - the value for the smallParticleData record component
      largeParticleId - the value for the largeParticleId record component
      largeParticleData - the value for the largeParticleData record component
      soundName - the value for the soundName record component
      hasFixedSoundRange - the value for the hasFixedSoundRange record component
      soundRange - the value for the soundRange record component
  • Method Details

    • write

      public void write(@NotNull @NotNull NetworkBuffer writer)
      Specified by:
      write in interface NetworkBuffer.Writer
    • playId

      public int playId()
      Specified by:
      playId in interface ServerPacket.Play
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • x

      public double x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public double y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component
    • z

      public double z()
      Returns the value of the z record component.
      Returns:
      the value of the z record component
    • radius

      public float radius()
      Returns the value of the radius record component.
      Returns:
      the value of the radius record component
    • records

      public byte @NotNull [] records()
      Returns the value of the records record component.
      Returns:
      the value of the records record component
    • playerMotionX

      public float playerMotionX()
      Returns the value of the playerMotionX record component.
      Returns:
      the value of the playerMotionX record component
    • playerMotionY

      public float playerMotionY()
      Returns the value of the playerMotionY record component.
      Returns:
      the value of the playerMotionY record component
    • playerMotionZ

      public float playerMotionZ()
      Returns the value of the playerMotionZ record component.
      Returns:
      the value of the playerMotionZ record component
    • blockInteraction

      @NotNull public @NotNull ExplosionPacket.BlockInteraction blockInteraction()
      Returns the value of the blockInteraction record component.
      Returns:
      the value of the blockInteraction record component
    • smallParticleId

      public int smallParticleId()
      Returns the value of the smallParticleId record component.
      Returns:
      the value of the smallParticleId record component
    • smallParticleData

      public byte @NotNull [] smallParticleData()
      Returns the value of the smallParticleData record component.
      Returns:
      the value of the smallParticleData record component
    • largeParticleId

      public int largeParticleId()
      Returns the value of the largeParticleId record component.
      Returns:
      the value of the largeParticleId record component
    • largeParticleData

      public byte @NotNull [] largeParticleData()
      Returns the value of the largeParticleData record component.
      Returns:
      the value of the largeParticleData record component
    • soundName

      @NotNull public @NotNull String soundName()
      Returns the value of the soundName record component.
      Returns:
      the value of the soundName record component
    • hasFixedSoundRange

      public boolean hasFixedSoundRange()
      Returns the value of the hasFixedSoundRange record component.
      Returns:
      the value of the hasFixedSoundRange record component
    • soundRange

      public float soundRange()
      Returns the value of the soundRange record component.
      Returns:
      the value of the soundRange record component