Class Entity

java.lang.Object
org.geysermc.geyser.entity.type.Entity
All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity
Direct Known Subclasses:
AbstractArrowEntity, AreaEffectCloudEntity, BoatEntity, DisplayBaseEntity, EnderCrystalEntity, EnderDragonPartEntity, EnderEyeEntity, EvokerFangsEntity, ExpOrbEntity, FallingBlockEntity, FireworkEntity, HangingEntity, InteractionEntity, LeashKnotEntity, LightningEntity, LivingEntity, MinecartEntity, ThrowableEntity, TNTEntity

public class Entity extends Object implements org.geysermc.geyser.api.entity.type.GeyserEntity
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    protected final GeyserDirtyMetadata
    A container to store temporary metadata before it's sent to Bedrock.
    protected String
     
    protected int
     
    protected final EnumMap<org.cloudburstmc.protocol.bedrock.data.entity.EntityFlag,Boolean>
    The entity flags for the Bedrock entity.
    protected final long
     
    protected float
     
    protected float
     
     
    protected final Map<org.cloudburstmc.protocol.bedrock.data.entity.EntityDataType<?>,Object>
    A container storing all current metadata for an entity.
    protected org.cloudburstmc.math.vector.Vector3f
     
    protected String
    Do not call this setter directly! This will bypass the scoreboard and setting the metadata
    protected float
     
    protected boolean
    Saves if the entity should be on the ground.
    protected List<Entity>
     
    protected float
     
    protected final @Nullable GeyserEntityPropertyManager
     
    protected final GeyserSession
     
    protected boolean
     
    protected UUID
     
    protected boolean
    Indicates if the entity has been initialized and spawned
    protected Entity
     
    protected float
     
    protected float
    x = Yaw, y = Pitch, z = HeadYaw Java: Y = Yaw, X = Pitch
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAdditionalSpawnData(org.cloudburstmc.protocol.bedrock.packet.AddEntityPacket addEntityPacket)
    To be overridden in other entity classes, if additional things need to be done to the spawn entity packet.
     
     
    org.cloudburstmc.math.vector.Vector3f
     
    @NonNull org.geysermc.geyser.api.entity.definition.GeyserEntityDefinition
     
    void
    Despawns the entity
    boolean
    If true, the entity can be dismounted by pressing jump.
    org.cloudburstmc.math.vector.Vector3f
    x = Pitch, y = Yaw, z = HeadYaw
    float
     
    float
     
    A container to store temporary metadata before it's sent to Bedrock.
     
    int
     
    final boolean
    getFlag(org.cloudburstmc.protocol.bedrock.data.entity.EntityFlag flag)
     
    float
     
     
    protected short
     
    Map<org.cloudburstmc.protocol.bedrock.data.entity.EntityDataType<?>,Object>
    A container storing all current metadata for an entity.
    org.cloudburstmc.math.vector.Vector3f
     
    Do not call this setter directly! This will bypass the scoreboard and setting the metadata
    float
     
     
    float
     
    org.cloudburstmc.math.vector.Vector3f
    The entity position as it is known to the Java server
     
     
     
    float
    x = Yaw, y = Pitch, z = HeadYaw Java: Y = Yaw, X = Pitch
    long
     
    boolean
     
    float
     
    height(float height)
     
    protected void
    Called on entity spawn.
    interact(org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand)
    Simulates interacting with an entity.
    interactAt(org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand)
    Simulates interacting with this entity at a specific click point.
    boolean
     
    boolean
    Saves if the entity should be on the ground.
    protected boolean
    If true, the entity should be shaking on the client's end.
    boolean
     
    boolean
    Indicates if the entity has been initialized and spawned
    int
     
    void
    moveAbsolute(org.cloudburstmc.math.vector.Vector3f javaPosition, float yaw, float pitch, boolean isOnGround, boolean teleported)
     
    void
    moveAbsolute(org.cloudburstmc.math.vector.Vector3f javaPosition, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)
     
    void
    moveAbsoluteRaw(org.cloudburstmc.math.vector.Vector3f javaPosition, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)
     
    void
    moveRelative(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)
     
    void
    moveRelativeRaw(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)
     
    void
    offset(float offset, boolean teleport)
     
    final void
    playEntityEvent(org.cloudburstmc.protocol.bedrock.data.entity.EntityEventType type)
    Send an entity event of the specified type to the Bedrock player from this entity.
    final void
    playEntityEvent(org.cloudburstmc.protocol.bedrock.data.entity.EntityEventType type, int data)
    Send an entity event of the specified type with the specified data to the Bedrock player from this entity.
    @NonNull org.cloudburstmc.math.vector.Vector3f
     
    protected void
    scoreVisibility(boolean show)
     
    final void
    setAir(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata)
    Set an int from 0 - this entity's maximum air - (air / maxAir) represents the percentage of bubbles left
    protected void
    setAirSupply(int amount)
     
    boolean
    setBoundingBoxHeight(float height)
     
    void
    setBoundingBoxWidth(float width)
     
    protected void
     
    protected void
    setDimensionsFromPose(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose pose)
    Set the height and width of the entity's bounding box
    void
    setDisplayName(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<Optional<net.kyori.adventure.text.Component>,?> entityMetadata)
     
    void
    setDisplayNameVisible(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)
     
    void
    setEntityId(int entityId)
     
    final void
    setFlag(org.cloudburstmc.protocol.bedrock.data.entity.EntityFlag flag, boolean value)
    Updates a flag value and determines if the flags would need synced with the Bedrock client.
    void
    setFlags(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.ByteEntityMetadata entityMetadata)
     
    protected void
    setFlagsDirty(boolean flagsDirty)
    Indicates if flags have been updated and need to be sent to the client.
    float
    setFreezing(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata)
    Set a float from 0-1 - how strong the "frozen" overlay should be on screen.
    protected void
    setGliding(boolean value)
    Set a boolean - whether the entity is gliding
    void
    setGravity(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)
     
    void
    setHeadYaw(float headYaw)
     
    protected void
    setInvisible(boolean value)
    Set a boolean - whether the entity is invisible or visible
    void
     
    void
    setMotion(org.cloudburstmc.math.vector.Vector3f motion)
     
    protected void
    setNametag(@Nullable String nametag, boolean fromDisplayName)
     
    void
    setOffset(float offset)
     
    void
    setOnGround(boolean onGround)
    Saves if the entity should be on the ground.
    void
    setPassengers(List<Entity> passengers)
     
    void
    setPitch(float pitch)
     
    void
    setPose(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose pose)
    Usually used for bounding box and not animation.
    void
    setPosition(org.cloudburstmc.math.vector.Vector3f position)
    The entity position as it is known to the Java server
    void
    setRiderSeatPosition(org.cloudburstmc.math.vector.Vector3f position)
     
    final void
    setSilent(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)
     
    protected void
    setSneaking(boolean value)
     
    protected void
    setSprinting(boolean value)
     
    void
    setValid(boolean valid)
    Indicates if the entity has been initialized and spawned
    void
    setVehicle(Entity vehicle)
     
    void
    setYaw(float yaw)
    x = Yaw, y = Pitch, z = HeadYaw Java: Y = Yaw, X = Pitch
    void
     
    protected String
     
     
    void
    teleport(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, boolean isOnGround)
    Teleports an entity to a new location.
    protected InteractiveTag
    testInteraction(org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand)
    Test interacting with the given hand to see if we should send a tag to the Bedrock client.
    <T> void
    update(@NonNull org.geysermc.geyser.api.entity.data.GeyserEntityDataType<T> dataType, @Nullable T value)
     
    void
    Sends the Bedrock entity properties to the client
    void
    Sends the Bedrock metadata to the client
    void
    updateHeadLookRotation(float headYaw)
    Updates an entity's head position.
    final void
    Update the suggestion that the client currently has on their screen for this entity (for example, "Feed" or "Ride")
    protected void
    Update this entity's mount offset
    void
    updateNametag(@Nullable Team team)
     
    protected void
    updateNametag(@Nullable Team team, boolean visible)
     
    protected void
    Update the mount offsets of each passenger on this vehicle
    void
    updatePositionAndRotation(double moveX, double moveY, double moveZ, float yaw, float pitch, boolean isOnGround)
    Updates an entity's position and rotation.
    void
    updatePropertiesBatched(Consumer<org.geysermc.geyser.api.entity.property.BatchPropertyUpdater> consumer, boolean immediate)
     
    void
    updateRotation(float yaw, float pitch, boolean isOnGround)
    Updates an entity's rotation.
     
    uuid(UUID uuid)
     
    <T> T
    value(@NonNull org.geysermc.geyser.api.entity.data.GeyserEntityDataType<T> dataType)
     
    float
     
    width(float width)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.geysermc.geyser.api.entity.type.GeyserEntity

    updatePropertiesBatched, updateProperty
  • Field Details

    • session

      protected final GeyserSession session
    • bedrockDefinition

      protected BedrockEntityDefinition bedrockDefinition
    • javaTypeDefinition

      protected EntityTypeDefinition<?> javaTypeDefinition
    • entityId

      protected int entityId
    • geyserId

      protected final long geyserId
    • uuid

      protected UUID uuid
    • nametag

      protected String nametag
      Do not call this setter directly! This will bypass the scoreboard and setting the metadata
    • motion

      protected org.cloudburstmc.math.vector.Vector3f motion
    • yaw

      protected float yaw
      x = Yaw, y = Pitch, z = HeadYaw Java: Y = Yaw, X = Pitch
    • pitch

      protected float pitch
    • headYaw

      protected float headYaw
    • onGround

      protected boolean onGround
      Saves if the entity should be on the ground. Otherwise entities like parrots are flapping when rotating
    • valid

      protected boolean valid
      Indicates if the entity has been initialized and spawned
    • displayName

      protected String displayName
    • silent

      protected boolean silent
    • passengers

      protected List<Entity> passengers
    • vehicle

      protected Entity vehicle
    • dirtyMetadata

      protected final GeyserDirtyMetadata dirtyMetadata
      A container to store temporary metadata before it's sent to Bedrock.
    • metadata

      protected final Map<org.cloudburstmc.protocol.bedrock.data.entity.EntityDataType<?>,Object> metadata
      A container storing all current metadata for an entity.
    • flags

      protected final EnumMap<org.cloudburstmc.protocol.bedrock.data.entity.EntityFlag,Boolean> flags
      The entity flags for the Bedrock entity. These must always be saved - if flags are updated and the other values aren't present, the Bedrock client will think they are set to false.
    • width

      protected float width
    • height

      protected float height
    • offset

      protected float offset
    • propertyManager

      protected final @Nullable GeyserEntityPropertyManager propertyManager
  • Constructor Details

  • Method Details

    • initializeMetadata

      protected void initializeMetadata()
      Called on entity spawn. Used to populate the entity metadata and flags with default values.
    • setClientSideSilent

      protected void setClientSideSilent()
    • spawnEntity

      public void spawnEntity()
    • addAdditionalSpawnData

      public void addAdditionalSpawnData(org.cloudburstmc.protocol.bedrock.packet.AddEntityPacket addEntityPacket)
      To be overridden in other entity classes, if additional things need to be done to the spawn entity packet.
    • despawnEntity

      public void despawnEntity()
      Despawns the entity
    • moveRelative

      public void moveRelative(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)
    • moveRelativeRaw

      public void moveRelativeRaw(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)
    • moveAbsolute

      public void moveAbsolute(org.cloudburstmc.math.vector.Vector3f javaPosition, float yaw, float pitch, boolean isOnGround, boolean teleported)
    • moveAbsolute

      public void moveAbsolute(org.cloudburstmc.math.vector.Vector3f javaPosition, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)
    • moveAbsoluteRaw

      public void moveAbsoluteRaw(org.cloudburstmc.math.vector.Vector3f javaPosition, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)
    • teleport

      public void teleport(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, boolean isOnGround)
      Teleports an entity to a new location. Used in JavaTeleportEntityTranslator.
      Parameters:
      position - The new position of the entity.
      yaw - The new yaw of the entity.
      pitch - The new pitch of the entity.
      isOnGround - Whether the entity is currently on the ground.
    • updateHeadLookRotation

      public void updateHeadLookRotation(float headYaw)
      Updates an entity's head position. Used in JavaRotateHeadTranslator.
      Parameters:
      headYaw - The new head rotation of the entity.
    • updatePositionAndRotation

      public void updatePositionAndRotation(double moveX, double moveY, double moveZ, float yaw, float pitch, boolean isOnGround)
      Updates an entity's position and rotation. Used in JavaMoveEntityPosRotTranslator.
      Parameters:
      moveX - The new X offset of the current position.
      moveY - The new Y offset of the current position.
      moveZ - The new Z offset of the current position.
      yaw - The new yaw of the entity.
      pitch - The new pitch of the entity.
      isOnGround - Whether the entity is currently on the ground.
    • updateRotation

      public void updateRotation(float yaw, float pitch, boolean isOnGround)
      Updates an entity's rotation. Used in JavaMoveEntityRotTranslator.
      Parameters:
      yaw - The new yaw of the entity.
      pitch - The new pitch of the entity.
      isOnGround - Whether the entity is currently on the ground.
    • getFlag

      public final boolean getFlag(org.cloudburstmc.protocol.bedrock.data.entity.EntityFlag flag)
    • setFlag

      public final void setFlag(org.cloudburstmc.protocol.bedrock.data.entity.EntityFlag flag, boolean value)
      Updates a flag value and determines if the flags would need synced with the Bedrock client.
    • updateBedrockMetadata

      public void updateBedrockMetadata()
      Sends the Bedrock metadata to the client
    • updateBedrockEntityProperties

      public void updateBedrockEntityProperties()
      Sends the Bedrock entity properties to the client
    • setFlags

      public void setFlags(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.ByteEntityMetadata entityMetadata)
    • setInvisible

      protected void setInvisible(boolean value)
      Set a boolean - whether the entity is invisible or visible
      Parameters:
      value - true if the entity is invisible
    • setGliding

      protected void setGliding(boolean value)
      Set a boolean - whether the entity is gliding
    • setSprinting

      protected void setSprinting(boolean value)
    • setSneaking

      protected void setSneaking(boolean value)
    • setAir

      public final void setAir(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata)
      Set an int from 0 - this entity's maximum air - (air / maxAir) represents the percentage of bubbles left
    • setAirSupply

      protected void setAirSupply(int amount)
    • getMaxAir

      protected short getMaxAir()
    • teamIdentifier

      public String teamIdentifier()
    • setDisplayName

      public void setDisplayName(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<Optional<net.kyori.adventure.text.Component>,?> entityMetadata)
    • standardDisplayName

      protected String standardDisplayName()
    • setNametag

      protected void setNametag(@Nullable String nametag, boolean fromDisplayName)
    • updateNametag

      public void updateNametag(@Nullable Team team)
    • updateNametag

      protected void updateNametag(@Nullable Team team, boolean visible)
    • scoreVisibility

      protected void scoreVisibility(boolean show)
    • setDisplayNameVisible

      public void setDisplayNameVisible(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)
    • setSilent

      public final void setSilent(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)
    • setGravity

      public void setGravity(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)
    • setPose

      public void setPose(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose pose)
      Usually used for bounding box and not animation.
    • setDimensionsFromPose

      protected void setDimensionsFromPose(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose pose)
      Set the height and width of the entity's bounding box
    • setBoundingBoxHeight

      public boolean setBoundingBoxHeight(float height)
    • setBoundingBoxWidth

      public void setBoundingBoxWidth(float width)
    • setFreezing

      public float setFreezing(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata)
      Set a float from 0-1 - how strong the "frozen" overlay should be on screen.
    • setRiderSeatPosition

      public void setRiderSeatPosition(org.cloudburstmc.math.vector.Vector3f position)
    • isShaking

      protected boolean isShaking()
      If true, the entity should be shaking on the client's end.
      Returns:
      whether EntityFlag.SHAKING should be set to true.
    • doesJumpDismount

      public boolean doesJumpDismount()
      If true, the entity can be dismounted by pressing jump.
      Returns:
      whether the entity can be dismounted when pressing jump.
    • getBedrockRotation

      public org.cloudburstmc.math.vector.Vector3f getBedrockRotation()
      x = Pitch, y = Yaw, z = HeadYaw
      Returns:
      the bedrock rotation
    • updatePassengerOffsets

      protected void updatePassengerOffsets()
      Update the mount offsets of each passenger on this vehicle
    • updateMountOffset

      protected void updateMountOffset()
      Update this entity's mount offset
    • javaId

      public int javaId()
      Specified by:
      javaId in interface org.geysermc.geyser.api.entity.type.GeyserEntity
    • isAlive

      public boolean isAlive()
    • bedrockPosition

      public org.cloudburstmc.math.vector.Vector3f bedrockPosition()
    • updateInteractiveTag

      public final void updateInteractiveTag()
      Update the suggestion that the client currently has on their screen for this entity (for example, "Feed" or "Ride")
    • testInteraction

      protected InteractiveTag testInteraction(org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand)
      Test interacting with the given hand to see if we should send a tag to the Bedrock client. Should usually mirror interact(Hand) without any side effects.
    • interact

      public InteractionResult interact(org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand)
      Simulates interacting with an entity. The code here should mirror Java Edition code to the best of its ability, to ensure packet parity as well as functionality parity (such as sound effect responses).
    • hasLeashesToDrop

      public boolean hasLeashesToDrop()
    • interactAt

      public InteractionResult interactAt(org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand)
      Simulates interacting with this entity at a specific click point. As of Java Edition 1.18.1, this is only used for armor stands.
    • playEntityEvent

      public final void playEntityEvent(org.cloudburstmc.protocol.bedrock.data.entity.EntityEventType type)
      Send an entity event of the specified type to the Bedrock player from this entity.
    • playEntityEvent

      public final void playEntityEvent(org.cloudburstmc.protocol.bedrock.data.entity.EntityEventType type, int data)
      Send an entity event of the specified type with the specified data to the Bedrock player from this entity.
    • updatePropertiesBatched

      public void updatePropertiesBatched(Consumer<org.geysermc.geyser.api.entity.property.BatchPropertyUpdater> consumer, boolean immediate)
      Specified by:
      updatePropertiesBatched in interface org.geysermc.geyser.api.entity.type.GeyserEntity
    • offset

      public void offset(float offset, boolean teleport)
    • definition

      public @NonNull org.geysermc.geyser.api.entity.definition.GeyserEntityDefinition definition()
      Specified by:
      definition in interface org.geysermc.geyser.api.entity.type.GeyserEntity
    • position

      public @NonNull org.cloudburstmc.math.vector.Vector3f position()
      Specified by:
      position in interface org.geysermc.geyser.api.entity.type.GeyserEntity
    • update

      public <T> void update(@NonNull org.geysermc.geyser.api.entity.data.GeyserEntityDataType<T> dataType, @Nullable T value)
      Specified by:
      update in interface org.geysermc.geyser.api.entity.type.GeyserEntity
    • value

      public <T> T value(@NonNull org.geysermc.geyser.api.entity.data.GeyserEntityDataType<T> dataType)
      Specified by:
      value in interface org.geysermc.geyser.api.entity.type.GeyserEntity
    • getSession

      public GeyserSession getSession()
    • bedrockDefinition

      public BedrockEntityDefinition bedrockDefinition()
    • getJavaTypeDefinition

      public EntityTypeDefinition<?> getJavaTypeDefinition()
    • getEntityId

      public int getEntityId()
    • geyserId

      public long geyserId()
      Specified by:
      geyserId in interface org.geysermc.geyser.api.entity.type.GeyserEntity
    • uuid

      public UUID uuid()
      Specified by:
      uuid in interface org.geysermc.geyser.api.entity.type.GeyserEntity
    • getNametag

      public String getNametag()
      Do not call this setter directly! This will bypass the scoreboard and setting the metadata
    • getPosition

      public org.cloudburstmc.math.vector.Vector3f getPosition()
      The entity position as it is known to the Java server
    • getMotion

      public org.cloudburstmc.math.vector.Vector3f getMotion()
    • getYaw

      public float getYaw()
      x = Yaw, y = Pitch, z = HeadYaw Java: Y = Yaw, X = Pitch
    • getPitch

      public float getPitch()
    • getHeadYaw

      public float getHeadYaw()
    • isOnGround

      public boolean isOnGround()
      Saves if the entity should be on the ground. Otherwise entities like parrots are flapping when rotating
    • isValid

      public boolean isValid()
      Indicates if the entity has been initialized and spawned
    • getBoundingBoxHeight

      public float getBoundingBoxHeight()
    • getBoundingBoxWidth

      public float getBoundingBoxWidth()
    • getDisplayName

      public String getDisplayName()
    • isSilent

      public boolean isSilent()
    • getPassengers

      public List<Entity> getPassengers()
    • getVehicle

      public Entity getVehicle()
    • getDirtyMetadata

      public GeyserDirtyMetadata getDirtyMetadata()
      A container to store temporary metadata before it's sent to Bedrock.
    • getMetadata

      public Map<org.cloudburstmc.protocol.bedrock.data.entity.EntityDataType<?>,Object> getMetadata()
      A container storing all current metadata for an entity.
    • width

      public float width()
    • height

      public float height()
    • getOffset

      public float getOffset()
    • getPropertyManager

      public @Nullable GeyserEntityPropertyManager getPropertyManager()
    • bedrockDefinition

      public Entity bedrockDefinition(BedrockEntityDefinition bedrockDefinition)
      Returns:
      this.
    • setJavaTypeDefinition

      public void setJavaTypeDefinition(EntityTypeDefinition<?> javaTypeDefinition)
    • setEntityId

      public void setEntityId(int entityId)
    • uuid

      public Entity uuid(UUID uuid)
      Returns:
      this.
    • setMotion

      public void setMotion(org.cloudburstmc.math.vector.Vector3f motion)
    • setYaw

      public void setYaw(float yaw)
      x = Yaw, y = Pitch, z = HeadYaw Java: Y = Yaw, X = Pitch
    • setPitch

      public void setPitch(float pitch)
    • setHeadYaw

      public void setHeadYaw(float headYaw)
    • setOnGround

      public void setOnGround(boolean onGround)
      Saves if the entity should be on the ground. Otherwise entities like parrots are flapping when rotating
    • setValid

      public void setValid(boolean valid)
      Indicates if the entity has been initialized and spawned
    • setPassengers

      public void setPassengers(List<Entity> passengers)
    • setVehicle

      public void setVehicle(Entity vehicle)
    • width

      public Entity width(float width)
      Returns:
      this.
    • height

      public Entity height(float height)
      Returns:
      this.
    • setOffset

      public void setOffset(float offset)
    • setPosition

      public void setPosition(org.cloudburstmc.math.vector.Vector3f position)
      The entity position as it is known to the Java server
    • setFlagsDirty

      protected void setFlagsDirty(boolean flagsDirty)
      Indicates if flags have been updated and need to be sent to the client.