public class LivingEntity extends Entity
| Modifier and Type | Field and Description |
|---|---|
protected com.nukkitx.protocol.bedrock.data.inventory.ItemData |
boots |
protected com.nukkitx.protocol.bedrock.data.inventory.ItemData |
chestplate |
protected com.nukkitx.protocol.bedrock.data.inventory.ItemData |
hand |
protected float |
health |
protected com.nukkitx.protocol.bedrock.data.inventory.ItemData |
helmet |
protected com.nukkitx.protocol.bedrock.data.inventory.ItemData |
leggings |
protected float |
maxHealth |
protected com.nukkitx.protocol.bedrock.data.inventory.ItemData |
offHand |
| Constructor and Description |
|---|
LivingEntity(long entityId,
long geyserId,
EntityType entityType,
com.nukkitx.math.vector.Vector3f position,
com.nukkitx.math.vector.Vector3f motion,
com.nukkitx.math.vector.Vector3f rotation) |
| 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.
|
protected com.nukkitx.protocol.bedrock.data.AttributeData |
createHealthAttribute() |
protected boolean |
isShaking(GeyserSession session)
If true, the entity should be shaking on the client's end.
|
protected void |
setDimensions(com.github.steveice10.mc.protocol.data.game.entity.metadata.Pose pose)
Set the height and width of the entity's bounding box
|
protected void |
setFreezing(GeyserSession session,
float amount)
Set a float from 0-1 - how strong the "frozen" overlay should be on screen.
|
void |
updateArmor(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 |
updateBedrockAttributes(GeyserSession session,
List<com.github.steveice10.mc.protocol.data.game.entity.attribute.Attribute> attributes)
Attributes are properties of an entity that are generally more runtime-based instead of permanent properties.
|
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 |
updateMainHand(GeyserSession session) |
void |
updateOffHand(GeyserSession session) |
addAdditionalSpawnData, as, despawnEntity, getBedrockRotation, is, moveAbsolute, moveAbsolute, moveRelative, moveRelative, spawnEntity, teleport, updateBedrockMetadata, updateHeadLookRotation, updatePositionAndRotation, updateRotationprotected com.nukkitx.protocol.bedrock.data.inventory.ItemData helmet
protected com.nukkitx.protocol.bedrock.data.inventory.ItemData chestplate
protected com.nukkitx.protocol.bedrock.data.inventory.ItemData leggings
protected com.nukkitx.protocol.bedrock.data.inventory.ItemData boots
protected com.nukkitx.protocol.bedrock.data.inventory.ItemData hand
protected com.nukkitx.protocol.bedrock.data.inventory.ItemData offHand
protected float health
protected float maxHealth
public LivingEntity(long entityId,
long geyserId,
EntityType entityType,
com.nukkitx.math.vector.Vector3f position,
com.nukkitx.math.vector.Vector3f motion,
com.nukkitx.math.vector.Vector3f rotation)
public void updateBedrockMetadata(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata entityMetadata,
GeyserSession session)
EntityupdateBedrockMetadata in class EntityentityMetadata - the Java entity metadatasession - GeyserSessionprotected boolean isShaking(GeyserSession session)
Entityprotected void setDimensions(com.github.steveice10.mc.protocol.data.game.entity.metadata.Pose pose)
EntitysetDimensions in class Entityprotected void setFreezing(GeyserSession session, float amount)
EntitysetFreezing in class Entityprotected com.nukkitx.protocol.bedrock.data.AttributeData createHealthAttribute()
public void updateArmor(GeyserSession session)
public void updateMainHand(GeyserSession session)
public void updateOffHand(GeyserSession session)
public void updateBedrockAttributes(GeyserSession session, List<com.github.steveice10.mc.protocol.data.game.entity.attribute.Attribute> attributes)
attributes - the Java list of attributes sent from the serverprotected void updateAttribute(com.github.steveice10.mc.protocol.data.game.entity.attribute.Attribute javaAttribute,
List<com.nukkitx.protocol.bedrock.data.AttributeData> newAttributes)
protected com.nukkitx.protocol.bedrock.data.AttributeData calculateAttribute(com.github.steveice10.mc.protocol.data.game.entity.attribute.Attribute javaAttribute,
GeyserAttributeType type)
Copyright © 2021 GeyserMC. All rights reserved.