Class AvatarEntity

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

public abstract 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

  • 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
    • shouldLerp

      public boolean shouldLerp()
      Overrides:
      shouldLerp in class LivingEntity
    • moveAbsoluteRaw

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

      public void moveRelativeRaw(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)
      Overrides:
      moveRelativeRaw 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)
    • setSkin

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

      public void setSkin(String texturesProperty, boolean cape, @Nullable 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)
    • isListed

      public abstract boolean isListed()
      Whether this entity is listed on the player list. Since player entities are used for e.g. custom skulls too, we need to hack around limitations introduced in 1.21.130 to ensure skins are correctly applied.
      Returns:
      whether this player entity is listed
      See Also:
    • 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()