Class AvatarEntity

All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity
Direct Known Subclasses:
MannequinEntity, PlayerEntity, SkullPlayerEntity

public class AvatarEntity extends LivingEntity
  • Field Details

    • SNEAKING_POSE_HEIGHT

      public static final float SNEAKING_POSE_HEIGHT
      See Also:
    • BASE_ABILITY_LAYER

      protected static final List<org.cloudburstmc.protocol.bedrock.data.AbilityLayer> BASE_ABILITY_LAYER
    • username

      protected String username
    • texturesProperty

      protected @Nullable String texturesProperty
      The textures property from the GameProfile.
  • Constructor Details

    • AvatarEntity

      public AvatarEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, EntityDefinition<?> definition, org.cloudburstmc.math.vector.Vector3f position, org.cloudburstmc.math.vector.Vector3f motion, float yaw, float pitch, float headYaw, String username)
  • Method Details

    • initializeMetadata

      protected void initializeMetadata()
      Description copied from class: Entity
      Called on entity spawn. Used to populate the entity metadata and flags with default values.
      Overrides:
      initializeMetadata in class LivingEntity
    • spawnEntity

      public void spawnEntity()
      Overrides:
      spawnEntity in class Entity
    • moveAbsolute

      public void moveAbsolute(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)
      Overrides:
      moveAbsolute in class Entity
    • moveRelative

      public void moveRelative(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)
      Overrides:
      moveRelative in class Entity
    • setPosition

      public void setPosition(org.cloudburstmc.math.vector.Vector3f position)
      Overrides:
      setPosition in class Entity
    • setBedPosition

      public @Nullable org.cloudburstmc.math.vector.Vector3i setBedPosition(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<Optional<org.cloudburstmc.math.vector.Vector3i>,?> entityMetadata)
      Overrides:
      setBedPosition in class LivingEntity
    • setSkin

      public void setSkin(org.geysermc.mcprotocollib.protocol.data.game.entity.player.ResolvableProfile profile, boolean cape, Runnable after)
    • setSkin

      public void setSkin(org.geysermc.mcprotocollib.auth.GameProfile profile, boolean cape, Runnable after)
    • setSkin

      public void setSkin(String texturesProperty, boolean cape, Runnable after)
    • setSkinVisibility

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

      public String getDisplayName()
      Overrides:
      getDisplayName in class Entity
    • setDisplayName

      public void setDisplayName(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<Optional<net.kyori.adventure.text.Component>,?> entityMetadata)
      Overrides:
      setDisplayName in class Entity
    • setDisplayNameVisible

      public void setDisplayNameVisible(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)
      Overrides:
      setDisplayNameVisible in class Entity
    • setBelowNameText

      public void setBelowNameText(String text)
    • scoreVisibility

      protected void scoreVisibility(boolean show)
      Overrides:
      scoreVisibility in class Entity
    • setPose

      public void setPose(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose pose)
      Description copied from class: Entity
      Usually used for bounding box and not animation.
      Overrides:
      setPose in class Entity
    • setPitch

      public void setPitch(float pitch)
      Overrides:
      setPitch in class Entity
    • setDimensionsFromPose

      public void setDimensionsFromPose(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose pose)
      Description copied from class: Entity
      Set the height and width of the entity's bounding box
      Overrides:
      setDimensionsFromPose in class LivingEntity
    • getUsername

      public String getUsername()
    • getTexturesProperty

      public @Nullable String getTexturesProperty()
      The textures property from the GameProfile.
    • setTexturesProperty

      public void setTexturesProperty(@Nullable String texturesProperty)
      The textures property from the GameProfile.
    • getBedPosition

      public @Nullable org.cloudburstmc.math.vector.Vector3i getBedPosition()