Class EntityType
- Namespace
- Vintagestory.ServerMods.NoObf
- Assembly
- VSEssentials.dll
An entity type. Any json files inside of assets/entities will be loaded in as this type. Open in GitHub
[DocumentAsJson]
[JsonObject(MemberSerialization.OptIn)]
public class EntityType : RegistryObjectType
- Inheritance
-
EntityType
- Inherited Members
Fields
Client (Required)
The client-side properties of the entity. Usually related to rendering, precise physics calculations, and behaviors.
[JsonProperty]
public ClientEntityConfig Client
Field Value
Server (Required)
The server-side properties of the entity. Usually related to spawning, general physics, AI tasks, and other behaviors..
[JsonProperty]
public ServerEntityConfig Server
Field Value
Sounds (Recommended) (Default: None)
The sounds that this entity can make. Keys to use are:
- "hurt"
- "death"
- "idle"
- "swim" (player only)
- "eat" (player only)
[JsonProperty]
public Dictionary<string, AssetLocation> Sounds
Field Value
Attributes (Optional) (Default: None)
Specific attributes for the entity. Contents can vary per entity.
[JsonProperty]
[JsonConverter(typeof(JsonAttributesConverter))]
public JsonObject Attributes
Field Value
BehaviorConfigs (Optional) (Default: None)
A list of properties common to each client/server entity behavior. Key is a behavior code, and value is a set of attributes. Attributes will get merged with any matching client/server entity behaviors.
[JsonProperty(ItemConverterType = typeof(JsonAttributesConverter))]
public Dictionary<string, JsonObject> BehaviorConfigs
Field Value
CanClimb (Optional) (Default: false)
If true the entity can climb on walls.
[JsonProperty]
public bool CanClimb
Field Value
CanClimbAnywhere (Optional) (Default: false)
If true the entity can climb anywhere.
[JsonProperty]
public bool CanClimbAnywhere
Field Value
ClimbTouchDistance (Optional) (Default: 0.5)
The minimum distance from a block that a creature has to be to climb it.
[JsonProperty]
public float ClimbTouchDistance
Field Value
CollisionBoxSize (Optional) (Default: 0.5, 0.5)
The size of the entity's hitbox, in meters.
[JsonProperty]
public Vec2f CollisionBoxSize
Field Value
DeadCollisionBoxSize (Optional) (Default: 0.5, 0.25)
The size of the hitbox, in meters, while the entity is dead.
[JsonProperty]
public Vec2f DeadCollisionBoxSize
Field Value
DeadHitBoxSize (Optional)
Sets both DeadCollisionBoxSize and DeadSelectionBoxSize.
[JsonProperty]
public Vec2f DeadHitBoxSize { get; set; }
Field Value
DeadSelectionBoxSize (Optional) (Default: DeadCollisionBoxSize)
The size of the hitbox while the entity is dead. Defaults to DeadCollisionBoxSize.
[JsonProperty]
public Vec2f DeadSelectionBoxSize
Field Value
Drops (Optional) (Default: None)
The drops for the entity when they are killed.
[JsonProperty]
public BlockDropItemStack[] Drops
Field Value
EyeHeight (Optional) (Default: 0.1)
How high the camera should be placed if this entity were to be controlled by the player.
[JsonProperty]
public double EyeHeight
Field Value
FallDamageMultiplier (Optional) (Default: 1)
If less than one, mitigates fall damage (e.g. could be used for mountainous creatures); if more than one, increases fall damage.
[JsonProperty]
public float FallDamageMultiplier
Field Value
Habitat (Optional) (Default: Land)
Natural habitat of the entity. Decides whether to apply gravity or not.
[JsonProperty]
public EnumHabitat Habitat
Field Value
HitBoxSize (Optional)
Sets both CollisionBoxSize and SelectionBoxSize.
[JsonProperty]
public Vec2f HitBoxSize { get; set; }
Field Value
IdleSoundChance (Optional) (Default: 0.3)
The chance that an idle sound will play for the entity.
[JsonProperty]
public float IdleSoundChance
Field Value
IdleSoundRange (Optional) (Default: 24)
The sound range for the idle sound in blocks.
[JsonProperty]
public float IdleSoundRange
Field Value
KnockbackResistance (Optional) (Default: 0)
The resistance to being pushed back by an impact. Value will vary based on mob weight.
[JsonProperty]
public float KnockbackResistance
Field Value
RotateModelOnClimb (Optional) (Default: false)
Should the entity rotate to 'stand' on the direction it's climbing?
[JsonProperty]
public bool RotateModelOnClimb
Field Value
SelectionBoxSize (Optional) (Default: CollisionBoxSize)
The size of the entity's hitbox. Defaults to CollisionBoxSize.
[JsonProperty]
public Vec2f SelectionBoxSize
Field Value
SwimmingEyeHeight (Optional) (Default: EyeHeight)
The eye height of the entity when swimming. Defaults to be same as EyeHeight.
[JsonProperty]
public double? SwimmingEyeHeight
Field Value
Weight (Optional) (Default: 25)
The mass of this type of entity in kilograms, on average.
[JsonProperty]
public float Weight