Class EntityProperties
- Namespace
- Vintagestory.API.Common.Entities
- Assembly
- VintagestoryAPI.dll
public class EntityProperties
- Inheritance
-
EntityProperties
- Inherited Members
- Extension Methods
Fields
Attributes
The attributes of the entity. These are the Attributes read from the entity type's JSON file.
If your code modifies these Attributes (not recommended!), the changes will apply to all entities of the same type.
public JsonObject Attributes
Field Value
CanClimb
If true the entity can climb on walls
public bool CanClimb
Field Value
CanClimbAnywhere
If true the entity can climb anywhere.
public bool CanClimbAnywhere
Field Value
Class
The classification of the entity.
public string Class
Field Value
Client
The client properties of the entity.
public EntityClientProperties Client
Field Value
ClimbTouchDistance
public float ClimbTouchDistance
Field Value
Code
The entity code in the code.
public AssetLocation Code
Field Value
CollisionBoxSize
The size of the entity's hitbox (default: 0.2f/0.2f)
public Vec2f CollisionBoxSize
Field Value
Color
public string Color
Field Value
DeadCollisionBoxSize
The size of the hitbox while the entity is dead.
public Vec2f DeadCollisionBoxSize
Field Value
DeadSelectionBoxSize
The size of the hitbox while the entity is dead. (default: null, i.e. same as dead collision box)
public Vec2f DeadSelectionBoxSize
Field Value
Drops
The drops for the entity when they are killed.
public BlockDropItemStack[] Drops
Field Value
DropsPacket
public byte[] DropsPacket
Field Value
- byte[]
EyeHeight
How high the camera should be placed if this entity were to be controlled by the player
public double EyeHeight
Field Value
FallDamage
Whether the entity should take fall damage
public bool FallDamage
Field Value
FallDamageMultiplier
If less than one, mitigates fall damage (e.g. could be used for mountainous creatures); if more than one, increases fall damage (e.g fragile creatures?)
public float FallDamageMultiplier
Field Value
Habitat
Natural habitat of the entity. Decides whether to apply gravity or not
public EnumHabitat Habitat
Field Value
Id
Assigned on registering the entity type
public int Id
Field Value
IdleSoundChance
The chance that an idle sound will play for the entity.
public float IdleSoundChance
Field Value
IdleSoundRange
The sound range for the idle sound in blocks.
public float IdleSoundRange
Field Value
KnockbackResistance
The resistance to being pushed back by an impact.
public float KnockbackResistance
Field Value
ResolvedSounds
The sounds this entity can make after being resolved.
public Dictionary<string, AssetLocation[]> ResolvedSounds
Field Value
RotateModelOnClimb
Should the model in question rotate if climbing?
public bool RotateModelOnClimb
Field Value
SelectionBoxSize
The size of the entity's hitbox (default: null, i.e. same as collision box)
public Vec2f SelectionBoxSize
Field Value
Server
The server properties of the entity.
public EntityServerProperties Server
Field Value
Sounds
The sounds that this entity can make.
public Dictionary<string, AssetLocation> Sounds
Field Value
SwimmingEyeHeight
public double SwimmingEyeHeight
Field Value
Variant
Variant values as resolved from blocktype/itemtype or entitytype
public OrderedDictionary<string, string> Variant
Field Value
Weight
The mass of this type of entity in kilograms, on average - defaults to 25kg (medium-low) if not set by the asset
public float Weight
Field Value
Properties
SpawnCollisionBox
The collision box they have.
public Cuboidf SpawnCollisionBox { get; }
Property Value
Methods
Clone()
Creates a copy of this object.
public EntityProperties Clone()
Returns
InitSounds(IAssetManager)
Initializes the sounds for this entity type.
public void InitSounds(IAssetManager assetManager)
Parameters
assetManager
IAssetManager
Initialize(Entity, ICoreAPI)
Initalizes the properties for the entity.
public void Initialize(Entity entity, ICoreAPI api)