entity properties||doc135367

September 20, 2022

Field names and default values for properties of Entity objects

Field Name type Default Description
maxHp int 100 Max health
maxVp int 100 Max hunger
hpRecovery float 0 HP recovery value, approximately equal to the amount recovered per second
vpRecovery float 0 Hunger recovery value, approximately equal to the amount recovered per second
moveSpeed float 0.2 Movement speed, the final movement speed is affected by the movement coefficient
moveFactor float 1 The movement coefficient, which determines the final speed of the movement. The calculation formula is movement speed * movement coefficient
swimSpeed float 0.2 Swim speed
gravity float 0.08 Gravity
hideHp int 1 Hide HP. If it is greater than 0, it is hidden, otherwise it is displayed
textHeight float 2.3 The height of the content above Entity
canTurnHeadProp int 1 Whether the head rotates with the Entity's rotation, 0 means not following
damage int 0 Damage
dmgFactor float 1 Damage coefficient used in the default damage formula. Damage value = (Damage coefficient – Damage Reduction Coefficient) x Damage
deDmgPct float 0 Damage reduction coefficient, used in the default damage formula. Offset by the damage coefficient
defense int 0 Defense value, used in the default damage formula. Damage value calculated by the above attributes minus the defense value to get the damage value
damagePct float 1 Damage percentage, used in the default damage formula. Multiplied by the damage value calculated by the above related attributes to get the final damage
breakBlock int 1 Whether the block can be broken, less than or equal to 0 is an unbreakable block
breakTime int 0 Based on the superposition of the break time of the original block, the unit is frame
breakTimeFactor float 1 Destruction block time factor, multiplied by the total break time
unassailable int 0 Cannot be attacked, greater than 0 means cannot be attacked
undamageable int 0 Can't be damaged, greater than 0 means can't be damaged