Class AvatarEntity
java.lang.Object
org.geysermc.geyser.entity.type.Entity
org.geysermc.geyser.entity.type.LivingEntity
org.geysermc.geyser.entity.type.player.AvatarEntity
- All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity,Tickable
- Direct Known Subclasses:
MannequinEntity,PlayerEntity,SkullPlayerEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final List<org.cloudburstmc.protocol.bedrock.data.AbilityLayer>static final floatprotected StringFields inherited from class org.geysermc.geyser.entity.type.LivingEntity
attributeScale, dirtyHeadYaw, dirtyPitch, dirtyYaw, equipment, health, maxHealthFields inherited from class org.geysermc.geyser.entity.type.Entity
bedrockDefinition, customName, customNameVisible, dirtyMetadata, entityId, flags, geyserId, headYaw, javaTypeDefinition, metadata, motion, nametag, offset, onGround, passengers, pitch, propertyManager, scale, session, silent, uuid, valid, vehicle, yaw -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable org.cloudburstmc.math.vector.Vector3igetDisplayName(boolean includeStandardName) @Nullable String@Nullable Map<org.geysermc.mcprotocollib.auth.GameProfile.TextureType,org.geysermc.mcprotocollib.auth.GameProfile.Texture> protected voidCalled on entity spawn.abstract booleanisListed()Whether this entity is listed on the player list.voidmoveAbsoluteRaw(org.cloudburstmc.math.vector.Vector3f javaPosition, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) voidmoveRelativeRaw(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround) protected voidscoreVisibility(boolean show) @Nullable org.cloudburstmc.math.vector.Vector3isetBedPosition(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<Optional<org.cloudburstmc.math.vector.Vector3i>, ?> entityMetadata) voidsetBelowNameText(String text) voidsetCustomName(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<Optional<net.kyori.adventure.text.Component>, ?> entityMetadata) voidsetCustomNameVisible(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata) voidsetDimensionsFromPose(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose pose) Set the height and width of the entity's bounding boxvoidsetPitch(float pitch) voidsetPose(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose pose) Usually used for bounding box and not animation.voidsetPosition(org.cloudburstmc.math.vector.Vector3f position) The entity position as it is known to the Java servervoidsetSkin(@Nullable Map<org.geysermc.mcprotocollib.auth.GameProfile.TextureType, org.geysermc.mcprotocollib.auth.GameProfile.Texture> textures, @Nullable Runnable after) voidvoidsetSkin(org.geysermc.mcprotocollib.protocol.data.game.entity.player.ResolvableProfile profile) voidsetSkinVisibility(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.ByteEntityMetadata entityMetadata) voidsetTextures(@Nullable Map<org.geysermc.mcprotocollib.auth.GameProfile.TextureType, org.geysermc.mcprotocollib.auth.GameProfile.Texture> textures) booleanvoidMethods inherited from class org.geysermc.geyser.entity.type.LivingEntity
applyScale, calculateAttribute, canUseSlot, checkInteractWithNameTag, createHealthAttribute, getEquipment, getItemInSlot, getLerpPosition, getLerpSteps, getMainHandItem, getOffHandItem, hasBodyArmor, hasShield, interact, isAlive, isDirtyHeadYaw, isDirtyPitch, isDirtyYaw, isEquippableInSlot, isHolding, isMaxFrozenState, isShaking, moveAbsolute, moveRelative, setAttributeScale, setBody, setBoots, setBoundingBoxHeight, setBoundingBoxWidth, setChestplate, setDirtyHeadYaw, setDirtyPitch, setDirtyYaw, setEquipment, setFreezing, setHand, setHealth, setHelmet, setLeggings, setLerpPosition, setLerpSteps, setLivingEntityFlags, setMaxFrozenState, setMaxHealth, setOffhand, setParticles, setSaddle, setSpinAttack, switchHands, tick, updateArmor, updateAttribute, updateBedrockAttributes, updateMainHand, updateNametag, updateOffHand, updateSaddled, useArmSwingAttackMethods inherited from class org.geysermc.geyser.entity.type.Entity
addAdditionalSpawnData, bedrockDefinition, bedrockDefinition, bedrockPosition, definition, despawnEntity, doesJumpDismount, getBedrockRotation, getBoundingBoxHeight, getBoundingBoxWidth, getCustomBoundingBoxHeight, getCustomBoundingBoxWidth, getDirtyMetadata, getEntityId, getFlag, getHeadYaw, getJavaTypeDefinition, getMaxAir, getMetadata, getMotion, getNametag, getOffset, getPassengers, getPitch, getPosition, getPropertyManager, getScale, getSession, getVehicle, getYaw, geyserId, hasLeashesToDrop, interactAt, isCustomNameVisible, isOnGround, isSilent, isValid, javaId, moveAbsolute, offset, playEntityEvent, playEntityEvent, position, setAir, setAirSupply, setClientSideSilent, setCustomBoundingBoxHeight, setCustomBoundingBoxWidth, setEntityId, setFlag, setFlags, setFlagsDirty, setGliding, setGravity, setHeadYaw, setInvisible, setJavaTypeDefinition, setMotion, setNameEntityData, setNametag, setNametagAlwaysShow, setOffset, setOnGround, setPassengers, setRiderSeatPosition, setScale, setSilent, setSneaking, setSprinting, setValid, setVehicle, setYaw, standardDisplayName, teamIdentifier, teleport, testInteraction, update, updateBedrockEntityProperties, updateBedrockMetadata, updateHeadLookRotation, updateInteractiveTag, updateMountOffset, updateNametag, updatePassengerOffsets, updatePositionAndRotation, updatePropertiesBatched, updateRotation, uuid, uuid, valueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.geysermc.geyser.api.entity.type.GeyserEntity
updatePropertiesBatched, updateProperty
-
Field Details
-
SNEAKING_POSE_HEIGHT
public static final float SNEAKING_POSE_HEIGHT- See Also:
-
BASE_ABILITY_LAYER
-
username
-
-
Constructor Details
-
AvatarEntity
-
-
Method Details
-
initializeMetadata
protected void initializeMetadata()Description copied from class:EntityCalled on entity spawn. Used to populate the entity metadata and flags with default values.- Overrides:
initializeMetadatain classLivingEntity
-
spawnEntity
public void spawnEntity()- Overrides:
spawnEntityin classEntity
-
shouldLerp
public boolean shouldLerp()- Overrides:
shouldLerpin classLivingEntity
-
moveAbsoluteRaw
public void moveAbsoluteRaw(org.cloudburstmc.math.vector.Vector3f javaPosition, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) - Overrides:
moveAbsoluteRawin classEntity
-
moveRelativeRaw
public void moveRelativeRaw(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround) - Overrides:
moveRelativeRawin classEntity
-
setPosition
public void setPosition(org.cloudburstmc.math.vector.Vector3f position) Description copied from class:EntityThe entity position as it is known to the Java server- Overrides:
setPositionin classEntity
-
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:
setBedPositionin classLivingEntity
-
setSkin
public void setSkin(org.geysermc.mcprotocollib.protocol.data.game.entity.player.ResolvableProfile profile) -
setSkin
-
setSkin
-
setSkinVisibility
public void setSkinVisibility(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.ByteEntityMetadata entityMetadata) -
getDisplayName
- Overrides:
getDisplayNamein classEntity
-
setCustomName
public void setCustomName(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<Optional<net.kyori.adventure.text.Component>, ?> entityMetadata) - Overrides:
setCustomNamein classEntity
-
setCustomNameVisible
public void setCustomNameVisible(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata) - Overrides:
setCustomNameVisiblein classEntity
-
setBelowNameText
-
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:
scoreVisibilityin classEntity
-
setPose
public void setPose(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose pose) Description copied from class:EntityUsually used for bounding box and not animation. -
setPitch
public void setPitch(float pitch) -
setDimensionsFromPose
public void setDimensionsFromPose(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose pose) Description copied from class:EntitySet the height and width of the entity's bounding box- Overrides:
setDimensionsFromPosein classLivingEntity
-
getSkinId
-
getUsername
-
getTextures
public @Nullable Map<org.geysermc.mcprotocollib.auth.GameProfile.TextureType,org.geysermc.mcprotocollib.auth.GameProfile.Texture> getTextures() -
setTextures
public void setTextures(@Nullable Map<org.geysermc.mcprotocollib.auth.GameProfile.TextureType, org.geysermc.mcprotocollib.auth.GameProfile.Texture> textures) -
getBedPosition
public @Nullable org.cloudburstmc.math.vector.Vector3i getBedPosition()
-