Class ClientboundAddEntityPacket

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

public class ClientboundAddEntityPacket extends Object implements MinecraftPacket
  • Constructor Details

    • ClientboundAddEntityPacket

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

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

      public ClientboundAddEntityPacket(int entityId, UUID uuid, EntityType type, double x, double y, double z, float yaw, float headYaw, float pitch, org.cloudburstmc.math.vector.Vector3d movement)
    • ClientboundAddEntityPacket

      public ClientboundAddEntityPacket(io.netty.buffer.ByteBuf in)
    • ClientboundAddEntityPacket

      public ClientboundAddEntityPacket(int entityId, UUID uuid, EntityType type, ObjectData data, double x, double y, double z, org.cloudburstmc.math.vector.Vector3d movement, float yaw, float headYaw, float pitch)
  • Method Details

    • serialize

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

      public int getEntityId()
    • getUuid

      public UUID getUuid()
    • getType

      public EntityType getType()
    • getData

      public ObjectData getData()
    • getX

      public double getX()
    • getY

      public double getY()
    • getZ

      public double getZ()
    • getMovement

      public org.cloudburstmc.math.vector.Vector3d getMovement()
    • getYaw

      public float getYaw()
    • getHeadYaw

      public float getHeadYaw()
    • getPitch

      public float getPitch()
    • 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(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(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(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).
    • withMovement

      public @NonNull ClientboundAddEntityPacket withMovement(org.cloudburstmc.math.vector.Vector3d movement)
      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).