Package emu.grasscutter.game.entity
Class EntityMonster
java.lang.Object
emu.grasscutter.game.entity.GameEntity
emu.grasscutter.game.entity.EntityMonster
-
Field Summary
Fields inherited from class emu.grasscutter.game.entity.GameEntity
id -
Constructor Summary
ConstructorsConstructorDescriptionEntityMonster(Scene scene, MonsterData monsterData, Position pos, int level) -
Method Summary
Modifier and TypeMethodDescriptionvoiddamage(float amount, int killerId) intgetAiId()it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMapintgetLevel()intintbooleanisAlive()voidonCreate()Called when this entity is added to the worldvoidonDeath(int killerId) Called when this entity diesvoidonInteract(Player player, GadgetInteractReqOuterClass.GadgetInteractReq interactReq) Called when a player interacts with this entityvoidvoidsetAiId(int aiId) voidsetPoseId(int poseId) toProto()Methods inherited from class emu.grasscutter.game.entity.GameEntity
addAllFightPropsToEntityInfo, addFightProperty, damage, getBlockId, getConfigId, getEntityType, getFightProperty, getGroupId, getId, getLastMoveReliableSeq, getLastMoveSceneTimeMs, getLifeState, getMetaModifiers, getMetaOverrideMap, getMotionInfo, getMotionState, getScene, getSpawnEntry, getWorld, hasFightProperty, heal, isLockHP, move, onRemoved, setBlockId, setConfigId, setFightProperty, setFightProperty, setGroupId, setLastMoveReliableSeq, setLastMoveSceneTimeMs, setLockHP, setMotionState, setSpawnEntry
-
Constructor Details
-
EntityMonster
-
-
Method Details
-
getMonsterWeaponId
public int getMonsterWeaponId() -
isAlive
public boolean isAlive()- Overrides:
isAlivein classGameEntity
-
onInteract
Description copied from class:GameEntityCalled when a player interacts with this entity- Overrides:
onInteractin classGameEntity- Parameters:
player- Player that is interacting with this entityinteractReq- Interact request protobuf data
-
onCreate
public void onCreate()Description copied from class:GameEntityCalled when this entity is added to the world- Overrides:
onCreatein classGameEntity
-
damage
public void damage(float amount, int killerId) - Overrides:
damagein classGameEntity
-
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
-
recalcStats
public void recalcStats() -
toProto
- Specified by:
toProtoin classGameEntity
-
getMonsterData
-
getFightProperties
public it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap getFightProperties()- Specified by:
getFightPropertiesin classGameEntity
-
getPosition
- Specified by:
getPositionin classGameEntity
-
getRotation
- Specified by:
getRotationin classGameEntity
-
getBornPos
-
getLevel
public int getLevel() -
getPoseId
public int getPoseId() -
setPoseId
public void setPoseId(int poseId) -
getAiId
public int getAiId() -
setAiId
public void setAiId(int aiId)
-