java.lang.Object
org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.spawn.ClientboundAddEntityPacket
All Implemented Interfaces:
Packet, MinecraftPacket

public class ClientboundAddEntityPacket extends Object implements MinecraftPacket
  • Constructor Details

    • ClientboundAddEntityPacket

      public ClientboundAddEntityPacket(int entityId, @NonNull @NonNull UUID uuid, @NonNull @NonNull EntityType type, double x, double y, double z, float yaw, float pitch, float headYaw)
    • ClientboundAddEntityPacket

      public ClientboundAddEntityPacket(int entityId, @NonNull @NonNull UUID uuid, @NonNull @NonNull EntityType type, @NonNull @NonNull ObjectData data, double x, double y, double z, float yaw, float pitch, float headYaw)
    • ClientboundAddEntityPacket

      public ClientboundAddEntityPacket(int entityId, @NonNull @NonNull UUID uuid, @NonNull @NonNull EntityType type, double x, double y, double z, float yaw, float pitch, float headYaw, double motionX, double motionY, double motionZ)
    • ClientboundAddEntityPacket

      public ClientboundAddEntityPacket(io.netty.buffer.ByteBuf in, MinecraftCodecHelper helper)
    • ClientboundAddEntityPacket

      public ClientboundAddEntityPacket(int entityId, @NonNull @NonNull UUID uuid, @NonNull @NonNull EntityType type, @NonNull @NonNull ObjectData data, double x, double y, double z, float yaw, float headYaw, float pitch, double motionX, double motionY, double motionZ)
  • Method Details

    • serialize

      public void serialize(io.netty.buffer.ByteBuf out, MinecraftCodecHelper helper)
      Specified by:
      serialize in interface MinecraftPacket
    • getEntityId

      public int getEntityId()
    • getUuid

      @NonNull public @NonNull UUID getUuid()
    • getType

      @NonNull public @NonNull EntityType getType()
    • getData

      @NonNull public @NonNull ObjectData getData()
    • getX

      public double getX()
    • getY

      public double getY()
    • getZ

      public double getZ()
    • getYaw

      public float getYaw()
    • getHeadYaw

      public float getHeadYaw()
    • getPitch

      public float getPitch()
    • getMotionX

      public double getMotionX()
    • getMotionY

      public double getMotionY()
    • getMotionZ

      public double getMotionZ()
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(@Nullable Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public @NonNull String toString()
      Overrides:
      toString in class Object
    • withEntityId

      public @NonNull ClientboundAddEntityPacket withEntityId(int entityId)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withUuid

      public @NonNull ClientboundAddEntityPacket withUuid(@NonNull @NonNull UUID uuid)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withType

      public @NonNull ClientboundAddEntityPacket withType(@NonNull @NonNull EntityType type)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withData

      public @NonNull ClientboundAddEntityPacket withData(@NonNull @NonNull ObjectData data)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withX

      public @NonNull ClientboundAddEntityPacket withX(double x)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withY

      public @NonNull ClientboundAddEntityPacket withY(double y)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withZ

      public @NonNull ClientboundAddEntityPacket withZ(double z)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withYaw

      public @NonNull ClientboundAddEntityPacket withYaw(float yaw)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withHeadYaw

      public @NonNull ClientboundAddEntityPacket withHeadYaw(float headYaw)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withPitch

      public @NonNull ClientboundAddEntityPacket withPitch(float pitch)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withMotionX

      public @NonNull ClientboundAddEntityPacket withMotionX(double motionX)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withMotionY

      public @NonNull ClientboundAddEntityPacket withMotionY(double motionY)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withMotionZ

      public @NonNull ClientboundAddEntityPacket withMotionZ(double motionZ)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).