Class Entity

java.lang.Object
com.zenith.cache.data.entity.Entity
Direct Known Subclasses:
EntityExperienceOrb, EntityLiving

public abstract class Entity extends Object
  • Field Details

    • entityType

      protected EntityType entityType
    • x

      protected double x
    • y

      protected double y
    • z

      protected double z
    • yaw

      protected float yaw
    • pitch

      protected float pitch
    • headYaw

      protected float headYaw
    • entityId

      protected int entityId
    • uuid

      protected UUID uuid
    • velX

      protected double velX
    • velY

      protected double velY
    • velZ

      protected double velZ
    • leashedId

      protected int leashedId
    • isLeashed

      protected boolean isLeashed
    • attributes

      protected Map<AttributeType, Attribute> attributes
    • metadata

      protected it.unimi.dsi.fastutil.ints.Int2ObjectMap<EntityMetadata<?,?>> metadata
    • passengerIds

      protected it.unimi.dsi.fastutil.ints.IntArrayList passengerIds
    • isInVehicle

      protected boolean isInVehicle
    • vehicleId

      protected int vehicleId
    • objectData

      protected ObjectData objectData
    • removed

      protected boolean removed
    • tickCount

      protected int tickCount
  • Constructor Details

    • Entity

      public Entity()
  • Method Details

    • addPackets

      public void addPackets(@NonNull Consumer<Packet> consumer)
    • updateAttributes

      public void updateAttributes(@NonNull List<Attribute> attributes)
    • mountVehicle

      public void mountVehicle(int vehicleId)
    • dismountVehicle

      public void dismountVehicle()
    • getEntityData

      public EntityData getEntityData()
    • blockPos

      public BlockPos blockPos()
    • position

      public org.cloudburstmc.math.vector.Vector3d position()
    • distanceSqTo

      public double distanceSqTo(Entity entity)
    • getMetadataValue

      public <T> @Nullable T getMetadataValue(int index, MetadataType<T> metadataType, Class<T> valueClass)
    • getPose

      public Pose getPose()
    • dimensions

      public org.cloudburstmc.math.vector.Vector2d dimensions()
    • collisionBox

      public LocalizedCollisionBox collisionBox()
    • getEntityType

      public EntityType getEntityType()
    • getX

      public double getX()
    • getY

      public double getY()
    • getZ

      public double getZ()
    • getYaw

      public float getYaw()
    • getPitch

      public float getPitch()
    • getHeadYaw

      public float getHeadYaw()
    • getEntityId

      public int getEntityId()
    • getUuid

      public UUID getUuid()
    • getVelX

      public double getVelX()
    • getVelY

      public double getVelY()
    • getVelZ

      public double getVelZ()
    • getLeashedId

      public int getLeashedId()
    • isLeashed

      public boolean isLeashed()
    • getAttributes

      public Map<AttributeType, Attribute> getAttributes()
    • getMetadata

      public it.unimi.dsi.fastutil.ints.Int2ObjectMap<EntityMetadata<?,?>> getMetadata()
    • getPassengerIds

      public it.unimi.dsi.fastutil.ints.IntArrayList getPassengerIds()
    • isInVehicle

      public boolean isInVehicle()
    • getVehicleId

      public int getVehicleId()
    • getObjectData

      public ObjectData getObjectData()
    • isRemoved

      public boolean isRemoved()
    • getTickCount

      public int getTickCount()
    • setEntityType

      public Entity setEntityType(EntityType entityType)
      Returns:
      this.
    • setX

      public Entity setX(double x)
      Returns:
      this.
    • setY

      public Entity setY(double y)
      Returns:
      this.
    • setZ

      public Entity setZ(double z)
      Returns:
      this.
    • setYaw

      public Entity setYaw(float yaw)
      Returns:
      this.
    • setPitch

      public Entity setPitch(float pitch)
      Returns:
      this.
    • setHeadYaw

      public Entity setHeadYaw(float headYaw)
      Returns:
      this.
    • setEntityId

      public Entity setEntityId(int entityId)
      Returns:
      this.
    • setUuid

      public Entity setUuid(UUID uuid)
      Returns:
      this.
    • setVelX

      public Entity setVelX(double velX)
      Returns:
      this.
    • setVelY

      public Entity setVelY(double velY)
      Returns:
      this.
    • setVelZ

      public Entity setVelZ(double velZ)
      Returns:
      this.
    • setLeashedId

      public Entity setLeashedId(int leashedId)
      Returns:
      this.
    • setLeashed

      public Entity setLeashed(boolean isLeashed)
      Returns:
      this.
    • setAttributes

      public Entity setAttributes(Map<AttributeType, Attribute> attributes)
      Returns:
      this.
    • setMetadata

      public Entity setMetadata(it.unimi.dsi.fastutil.ints.Int2ObjectMap<EntityMetadata<?,?>> metadata)
      Returns:
      this.
    • setPassengerIds

      public Entity setPassengerIds(it.unimi.dsi.fastutil.ints.IntArrayList passengerIds)
      Returns:
      this.
    • setInVehicle

      public Entity setInVehicle(boolean isInVehicle)
      Returns:
      this.
    • setVehicleId

      public Entity setVehicleId(int vehicleId)
      Returns:
      this.
    • setObjectData

      public Entity setObjectData(ObjectData objectData)
      Returns:
      this.
    • setRemoved

      public Entity setRemoved(boolean removed)
      Returns:
      this.
    • setTickCount

      public Entity setTickCount(int tickCount)
      Returns:
      this.
    • equals

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

      protected boolean canEqual(Object other)
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object