Record Class ClientboundLevelParticlesPacket

java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundLevelParticlesPacket
All Implemented Interfaces:
Packet<ClientGamePacketListener>

public record ClientboundLevelParticlesPacket(ParticleOptions particle, boolean overrideLimiter, boolean alwaysShow, double x, double y, double z, float xDist, float yDist, float zDist, float xMaxSpeed, float yMaxSpeed, float zMaxSpeed, int count, ClientboundLevelParticlesPacket.RandomizationType randomizationType) extends Record implements Packet<ClientGamePacketListener>
  • Field Details

    • particle

      private final ParticleOptions particle
      The field for the particle record component.
    • overrideLimiter

      private final boolean overrideLimiter
      The field for the overrideLimiter record component.
    • alwaysShow

      private final boolean alwaysShow
      The field for the alwaysShow record component.
    • x

      private final double x
      The field for the x record component.
    • y

      private final double y
      The field for the y record component.
    • z

      private final double z
      The field for the z record component.
    • xDist

      private final float xDist
      The field for the xDist record component.
    • yDist

      private final float yDist
      The field for the yDist record component.
    • zDist

      private final float zDist
      The field for the zDist record component.
    • xMaxSpeed

      private final float xMaxSpeed
      The field for the xMaxSpeed record component.
    • yMaxSpeed

      private final float yMaxSpeed
      The field for the yMaxSpeed record component.
    • zMaxSpeed

      private final float zMaxSpeed
      The field for the zMaxSpeed record component.
    • count

      private final int count
      The field for the count record component.
    • randomizationType

      private final ClientboundLevelParticlesPacket.RandomizationType randomizationType
      The field for the randomizationType record component.
    • STREAM_CODEC

  • Constructor Details

    • ClientboundLevelParticlesPacket

      public ClientboundLevelParticlesPacket(ParticleOptions particle, boolean overrideLimiter, boolean alwaysShow, double x, double y, double z, float xDist, float yDist, float zDist, float maxSpeed, int count)
    • ClientboundLevelParticlesPacket

      public ClientboundLevelParticlesPacket(ParticleOptions particle, boolean overrideLimiter, boolean alwaysShow, double x, double y, double z, float xDist, float yDist, float zDist, float xMaxSpeed, float yMaxSpeed, float zMaxSpeed, int count, ClientboundLevelParticlesPacket.RandomizationType randomizationType)
      Creates an instance of a ClientboundLevelParticlesPacket record class.
      Parameters:
      particle - the value for the particle record component
      overrideLimiter - the value for the overrideLimiter record component
      alwaysShow - the value for the alwaysShow record component
      x - the value for the x record component
      y - the value for the y record component
      z - the value for the z record component
      xDist - the value for the xDist record component
      yDist - the value for the yDist record component
      zDist - the value for the zDist record component
      xMaxSpeed - the value for the xMaxSpeed record component
      yMaxSpeed - the value for the yMaxSpeed record component
      zMaxSpeed - the value for the zMaxSpeed record component
      count - the value for the count record component
      randomizationType - the value for the randomizationType record component
  • Method Details

    • type

      Specified by:
      type in interface Packet<ClientGamePacketListener>
    • handle

      public void handle(ClientGamePacketListener listener)
      Specified by:
      handle in interface Packet<ClientGamePacketListener>
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • particle

      public ParticleOptions particle()
      Returns the value of the particle record component.
      Returns:
      the value of the particle record component
    • overrideLimiter

      public boolean overrideLimiter()
      Returns the value of the overrideLimiter record component.
      Returns:
      the value of the overrideLimiter record component
    • alwaysShow

      public boolean alwaysShow()
      Returns the value of the alwaysShow record component.
      Returns:
      the value of the alwaysShow record component
    • 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
    • xDist

      public float xDist()
      Returns the value of the xDist record component.
      Returns:
      the value of the xDist record component
    • yDist

      public float yDist()
      Returns the value of the yDist record component.
      Returns:
      the value of the yDist record component
    • zDist

      public float zDist()
      Returns the value of the zDist record component.
      Returns:
      the value of the zDist record component
    • xMaxSpeed

      public float xMaxSpeed()
      Returns the value of the xMaxSpeed record component.
      Returns:
      the value of the xMaxSpeed record component
    • yMaxSpeed

      public float yMaxSpeed()
      Returns the value of the yMaxSpeed record component.
      Returns:
      the value of the yMaxSpeed record component
    • zMaxSpeed

      public float zMaxSpeed()
      Returns the value of the zMaxSpeed record component.
      Returns:
      the value of the zMaxSpeed record component
    • count

      public int count()
      Returns the value of the count record component.
      Returns:
      the value of the count record component
    • randomizationType

      Returns the value of the randomizationType record component.
      Returns:
      the value of the randomizationType record component