public class SessionPlayerEntity extends PlayerEntity
GeyserSession's player.| Modifier and Type | Field and Description |
|---|---|
protected Map<GeyserAttributeType,com.nukkitx.protocol.bedrock.data.AttributeData> |
attributes
Used to fix some inconsistencies, especially in respawning.
|
boots, chestplate, hand, health, helmet, leggings, maxHealth, offHand| Constructor and Description |
|---|
SessionPlayerEntity(GeyserSession session) |
| Modifier and Type | Method and Description |
|---|---|
protected com.nukkitx.protocol.bedrock.data.AttributeData |
calculateAttribute(com.github.steveice10.mc.protocol.data.game.entity.attribute.Attribute javaAttribute,
GeyserAttributeType type)
Calculates the complete attribute value to send to Bedrock.
|
com.nukkitx.protocol.bedrock.data.AttributeData |
createHealthAttribute() |
float |
getMaxHealth() |
void |
moveAbsolute(GeyserSession session,
com.nukkitx.math.vector.Vector3f position,
com.nukkitx.math.vector.Vector3f rotation,
boolean isOnGround,
boolean teleported) |
void |
setHealth(float health) |
void |
setPosition(com.nukkitx.math.vector.Vector3f position) |
void |
spawnEntity(GeyserSession session) |
protected void |
updateAttribute(com.github.steveice10.mc.protocol.data.game.entity.attribute.Attribute javaAttribute,
List<com.nukkitx.protocol.bedrock.data.AttributeData> newAttributes)
Takes the Java attribute and adds it to newAttributes as a Bedrock-formatted attribute
|
void |
updateBedrockMetadata(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata entityMetadata,
GeyserSession session)
Applies the Java metadata to the local Bedrock metadata copy
|
void |
updateBedrockMetadata(GeyserSession session)
Sends the Bedrock metadata to the client
|
moveRelative, sendPlayer, setDimensions, setPosition, updateHeadLookRotation, updatePositionAndRotation, updateRotationisShaking, setFreezing, updateArmor, updateBedrockAttributes, updateMainHand, updateOffHandaddAdditionalSpawnData, as, despawnEntity, getBedrockRotation, is, moveAbsolute, moveRelative, teleportprotected final Map<GeyserAttributeType,com.nukkitx.protocol.bedrock.data.AttributeData> attributes
public SessionPlayerEntity(GeyserSession session)
public void spawnEntity(GeyserSession session)
spawnEntity in class PlayerEntitypublic void moveAbsolute(GeyserSession session, com.nukkitx.math.vector.Vector3f position, com.nukkitx.math.vector.Vector3f rotation, boolean isOnGround, boolean teleported)
moveAbsolute in class PlayerEntitypublic void setPosition(com.nukkitx.math.vector.Vector3f position)
setPosition in class PlayerEntitypublic void updateBedrockMetadata(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata entityMetadata,
GeyserSession session)
EntityupdateBedrockMetadata in class PlayerEntityentityMetadata - the Java entity metadatasession - GeyserSessionpublic float getMaxHealth()
public void setHealth(float health)
public com.nukkitx.protocol.bedrock.data.AttributeData createHealthAttribute()
createHealthAttribute in class LivingEntitypublic void updateBedrockMetadata(GeyserSession session)
EntityupdateBedrockMetadata in class Entitysession - GeyserSessionprotected void updateAttribute(com.github.steveice10.mc.protocol.data.game.entity.attribute.Attribute javaAttribute,
List<com.nukkitx.protocol.bedrock.data.AttributeData> newAttributes)
LivingEntityupdateAttribute in class LivingEntityprotected com.nukkitx.protocol.bedrock.data.AttributeData calculateAttribute(com.github.steveice10.mc.protocol.data.game.entity.attribute.Attribute javaAttribute,
GeyserAttributeType type)
LivingEntitycalculateAttribute in class LivingEntityCopyright © 2021 GeyserMC. All rights reserved.