Class PlayerEntity
java.lang.Object
org.geysermc.geyser.entity.type.Entity
org.geysermc.geyser.entity.type.LivingEntity
org.geysermc.geyser.entity.type.player.PlayerEntity
- Direct Known Subclasses:
SessionPlayerEntity,SkullPlayerEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static List<com.nukkitx.protocol.bedrock.data.AbilityLayer>static floatFields inherited from class org.geysermc.geyser.entity.type.LivingEntity
boots, chestplate, hand, health, helmet, leggings, maxHealth, offHand -
Constructor Summary
ConstructorsConstructorDescriptionPlayerEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, com.nukkitx.math.vector.Vector3f position, com.nukkitx.math.vector.Vector3f motion, float yaw, float pitch, float headYaw, String username, String texturesProperty) -
Method Summary
Modifier and TypeMethodDescriptioncom.nukkitx.math.vector.Vector3iSaves the parrot currently on the player's left shoulder; otherwise nullSaves the parrot currently on the player's right shoulder; otherwise nullThe textures property from the GameProfile.protected voidCalled on entity spawn.voidmoveAbsolute(com.nukkitx.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)voidmoveRelative(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)voidvoidsetAbsorptionHearts(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.FloatEntityMetadata entityMetadata)com.nukkitx.math.vector.Vector3isetBedPosition(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<Optional<com.nukkitx.math.vector.Vector3i>,?> entityMetadata)voidsetBelowNameText(Objective objective)protected voidsetDimensions(com.github.steveice10.mc.protocol.data.game.entity.metadata.Pose pose)Set the height and width of the entity's bounding boxvoidsetDisplayName(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<Optional<net.kyori.adventure.text.Component>,?> entityMetadata)voidsetDisplayNameVisible(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)voidsetLeftParrot(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<com.github.steveice10.opennbt.tag.builtin.CompoundTag,?> entityMetadata)voidsetPosition(com.nukkitx.math.vector.Vector3f position)voidsetRightParrot(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<com.github.steveice10.opennbt.tag.builtin.CompoundTag,?> entityMetadata)voidsetSkinVisibility(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.ByteEntityMetadata entityMetadata)voidsetTexturesProperty(String texturesProperty)The textures property from the GameProfile.voidsetUsername(String username)voidvoidupdateDisplayName(Team team)voidupdateRotation(float yaw, float pitch, float headYaw, boolean isOnGround)Methods inherited from class org.geysermc.geyser.entity.type.LivingEntity
calculateAttribute, checkInteractWithNameTag, createHealthAttribute, getBoots, getChestplate, getHand, getHelmet, getLeggings, getOffHand, hasShield, interact, isAlive, isMaxFrozenState, isShaking, setBoots, setChestplate, setFreezing, setHand, setHealth, setHelmet, setLeggings, setLivingEntityFlags, setMaxFrozenState, setMaxHealth, setOffHand, updateArmor, updateAttribute, updateBedrockAttributes, updateMainHand, updateOffHandMethods inherited from class org.geysermc.geyser.entity.type.Entity
addAdditionalSpawnData, as, despawnEntity, getBedrockRotation, getBoundingBoxHeight, getBoundingBoxWidth, getDefinition, getDirtyMetadata, getEntityId, getFlag, getGeyserId, getHeadYaw, getMaxAir, getMotion, getNametag, getPassengers, getPitch, getPosition, getSession, getUuid, getVehicle, getYaw, interactAt, isOnGround, isSilent, isValid, moveAbsolute, moveRelative, playEntityEvent, playEntityEvent, setAir, setAirSupply, setBoundingBoxHeight, setBoundingBoxWidth, setClientSideSilent, setDefinition, setEntityId, setFlag, setFlags, setFlagsDirty, setGravity, setHeadYaw, setInvisible, setMotion, setOnGround, setPassengers, setPitch, setPose, setRiderSeatPosition, setSilent, setUuid, setValid, setVehicle, setYaw, teleport, testInteraction, updateBedrockMetadata, updateHeadLookRotation, updateInteractiveTag, updateMountOffset, updatePassengerOffsets, updatePositionAndRotation, updateRotation
-
Field Details
-
SNEAKING_POSE_HEIGHT
public static final float SNEAKING_POSE_HEIGHT- See Also:
- Constant Field Values
-
BASE_ABILITY_LAYER
-
-
Constructor Details
-
PlayerEntity
public PlayerEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, com.nukkitx.math.vector.Vector3f position, com.nukkitx.math.vector.Vector3f motion, float yaw, float pitch, float headYaw, String username, @Nullable String texturesProperty)
-
-
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
-
sendPlayer
public void sendPlayer() -
moveAbsolute
public void moveAbsolute(com.nukkitx.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)- Overrides:
moveAbsolutein classEntity
-
moveRelative
public void moveRelative(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)- Overrides:
moveRelativein classEntity
-
updateRotation
public void updateRotation(float yaw, float pitch, float headYaw, boolean isOnGround) -
setPosition
public void setPosition(com.nukkitx.math.vector.Vector3f position)- Overrides:
setPositionin classEntity
-
setBedPosition
public com.nukkitx.math.vector.Vector3i setBedPosition(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<Optional<com.nukkitx.math.vector.Vector3i>,?> entityMetadata)- Overrides:
setBedPositionin classLivingEntity
-
setAbsorptionHearts
public void setAbsorptionHearts(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.FloatEntityMetadata entityMetadata) -
setSkinVisibility
public void setSkinVisibility(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.ByteEntityMetadata entityMetadata) -
setLeftParrot
public void setLeftParrot(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<com.github.steveice10.opennbt.tag.builtin.CompoundTag,?> entityMetadata) -
setRightParrot
public void setRightParrot(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<com.github.steveice10.opennbt.tag.builtin.CompoundTag,?> entityMetadata) -
setDisplayName
public void setDisplayName(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<Optional<net.kyori.adventure.text.Component>,?> entityMetadata)- Overrides:
setDisplayNamein classEntity
-
updateDisplayName
-
setDisplayNameVisible
public void setDisplayNameVisible(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)- Overrides:
setDisplayNameVisiblein classEntity
-
setDimensions
protected void setDimensions(com.github.steveice10.mc.protocol.data.game.entity.metadata.Pose pose)Description copied from class:EntitySet the height and width of the entity's bounding box- Overrides:
setDimensionsin classLivingEntity
-
setBelowNameText
-
getTabListUuid
- Returns:
- the UUID that should be used when dealing with Bedrock's tab list.
-
getUsername
-
getTexturesProperty
The textures property from the GameProfile. -
getBedPosition
public com.nukkitx.math.vector.Vector3i getBedPosition() -
getLeftParrot
Saves the parrot currently on the player's left shoulder; otherwise null -
getRightParrot
Saves the parrot currently on the player's right shoulder; otherwise null -
setUsername
-
setTexturesProperty
The textures property from the GameProfile.
-