Package emu.grasscutter.game.entity
Class EntityAvatar
java.lang.Object
emu.grasscutter.game.entity.GameEntity
emu.grasscutter.game.entity.EntityAvatar
-
Field Summary
Fields inherited from class emu.grasscutter.game.entity.GameEntity
id -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEnergy(float amount, PropChangeReasonOuterClass.PropChangeReason reason) voidaddEnergy(float amount, PropChangeReasonOuterClass.PropChangeReason reason, boolean isFlat) voidit.unimi.dsi.fastutil.ints.Int2FloatMapintintfloatheal(float amount) booleanisAlive()voidMove this entity to a new position.voidonDeath(int killerId) Called when this entity diesvoidonDeath(PlayerDieTypeOuterClass.PlayerDieType dieType, int killerId) toProto()Methods inherited from class emu.grasscutter.game.entity.GameEntity
addAllFightPropsToEntityInfo, addFightProperty, damage, damage, getBlockId, getConfigId, getEntityType, getFightProperty, getGroupId, getId, getLastMoveReliableSeq, getLastMoveSceneTimeMs, getLifeState, getMetaModifiers, getMetaOverrideMap, getMotionInfo, getMotionState, getScene, getSpawnEntry, getWorld, hasFightProperty, isLockHP, onCreate, onInteract, onRemoved, setBlockId, setConfigId, setFightProperty, setFightProperty, setGroupId, setLastMoveReliableSeq, setLastMoveSceneTimeMs, setLockHP, setMotionState, setSpawnEntry
-
Constructor Details
-
EntityAvatar
-
EntityAvatar
-
-
Method Details
-
getPlayer
-
getPosition
- Specified by:
getPositionin classGameEntity
-
getRotation
- Specified by:
getRotationin classGameEntity
-
isAlive
public boolean isAlive()- Overrides:
isAlivein classGameEntity
-
getFightProperties
public it.unimi.dsi.fastutil.ints.Int2FloatMap getFightProperties()- Specified by:
getFightPropertiesin classGameEntity
-
getWeaponEntityId
public int getWeaponEntityId() -
onDeath
public void onDeath(int killerId) Description copied from class:GameEntityCalled when this entity dies- Overrides:
onDeathin classGameEntity- Parameters:
killerId- Entity id of the entity that killed this entity
-
onDeath
-
heal
public float heal(float amount) - Overrides:
healin classGameEntity
-
clearEnergy
-
addEnergy
-
addEnergy
public void addEnergy(float amount, PropChangeReasonOuterClass.PropChangeReason reason, boolean isFlat) -
getSceneAvatarInfo
-
toProto
- Specified by:
toProtoin classGameEntity
-
getAbilityControlBlock
-
move
Move this entity to a new position. Additionally invoke player move event.- Overrides:
movein classGameEntity- Parameters:
newPosition- The new position.rotation- The new rotation.
-
getAvatar
-
getKilledType
-
getKilledBy
public int getKilledBy()
-