Modding:Entity Json Properties: Difference between revisions
(→Overview: matchexact) |
(→Overview: suppressdefaultanimation) |
||
Line 815: | Line 815: | ||
<td></td> | <td></td> | ||
<td>Allows you to specify a blend mode for each element individually. Any element not in this list defaults its blend mode to the value specified in '''blendmode'''.</td> | <td>Allows you to specify a blend mode for each element individually. Any element not in this list defaults its blend mode to the value specified in '''blendmode'''.</td> | ||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_animations_suppressdefaultanimation" data-tt-parent="p_animations">suppressdefaultanimation</div></td> | |||
<td>boolean</td> | |||
<td>false</td> | |||
<td>When this animation plays, stop the default animation, even if the entity class set alwaysRunIdle=true (as EntityPlayer does). When alwaysRunIdle=false, setting suppressdefaultanimation is unnecessary, because all non-default animations already stop the default animation.</td> | |||
</tr> | </tr> | ||
<tr> | <tr> |
Revision as of 17:25, 5 October 2024
This page was last verified for Vintage Story version 1.19.
Overview
In the code, these come from the fields listed with the "[JsonProperty]" attribute in EntityType.cs, plus the fields from the parent class RegistryObjectType.cs. The json parser is case insensitive, which is how the property names can have different capitalization in the code and in the table below.
Property | Type | Default | Usage | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
json |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Core (no byType available) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
code |
string | required | A unique identifier for the entity. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A domain prefix will be added dynamically depending on the location of the file. Every mod and VintageStory itself have a unique prefix. For example the code The code identifier has to be unique inside its domain. In theory there could be equal identifiers with different domain prefixes. Find out more about Domains. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enabled |
boolean | true | If the entity will be loaded or not. Can be used to temporarily remove the entity. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
variantgroups |
array of object | - | Allows you define multiple variants of the same entity. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(any) bytype |
key: string; value: object | - | Allows different property values to be specified based on the variant code. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
allowedVariants |
array of strings | - | Used to trim unnecessary items generated by combined variants. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
skipVariants |
array of strings | - | Similar to allowedVariants, but instead skips the creation of listed variants rather than assigning which are allowed. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Common | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
class |
string | "entity" | The entity class can add special functionalities for the entity. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Can be used to add interaction to the entity or other special functionalities. Example uses are |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
habitat |
string | "land" | There is sea , land , air , and underwater |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hitboxsize |
Vec2f | null | Convenience alias that sets both collisionBoxSize and selectionBoxSize . |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
collisionboxsize |
Vec2f | { x: 0.5, y: 0.5 } | The cuboid for collisions with other entities and blocks. The x value is the width and length of a square at the entity's feet. The y value is the height of the cuboid. Use .debug wireframe entity to see the box in game. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
selectionboxsize |
Vec2f | collisionboxsize | The cuboid for interacting with or attacking the entity. This is what would commonly be considered the entity's hitbox. The x value is the width and length of a square at the entity's feet. The y value is the height of the cuboid. Use .debug wireframe entity to see the box in game. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deadboxsize |
Vec2f | null | Convenience alias that sets both deadCollisionBoxSize and deadSelectionBoxSize . |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
collisionboxsize |
Vec2f | { x: 0.25, y: 0.25 } | The cuboid for collisions with other entities and blocks when the entity is dead. The x value is the width and length of a square at the entity's feet. The y value is the height of the cuboid. Use .debug wireframe entity to see the box in game. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deadselectionboxsize |
Vec2f | deadcollisionboxsize | The cuboid for interacting with or attacking the entity's carcass. The x value is the width and length of a square at the entity's feet. The y value is the height of the cuboid. Use .debug wireframe entity to see the box in game. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
eyeheight |
decimal number | 0.1 | Height of the eyes, measured from the bottom of the hitbox in meters. Used for camera angle and various other things. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
swimmingeyeheight |
decimal number | eyeheight | Replacement value for eyeheight while the entity is swimming. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
weight |
decimal number | 25 | This is unused by the base game. The documentation says it is the average weight of the entity in kilograms. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
canclimb |
boolean | false | Whether the entity can climb on ladders or other blocks which are climbable. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
canclimbanywhere |
boolean | false | Whether the entity can climb on any block, doesn't matter if it's a ladder or not. For example, this is set on locusts. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
obsolete: falldamage |
boolean | true | Whether the entity will take fall damage. Obsolete: set FallDamageMultipler to 0 instead. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
falldamagemultiplier |
decimal number | 1.0 | How much this creature is affected by fall damage. Setting this to 0 causes the entity to take no fall damage. Setting this to 2.0 causes it to take double fall damage. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
climbtouchdistance |
decimal number | 0.5 | Distance the entity can reach a block to climb on it. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rotatemodelonclimb |
boolean | false | If true the entity model will be rotated to face the block its climbing on. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
knockbackresistance |
decimal number | 0.0 | The higher the number is the less knockback will be applied. Useful for heavy entities. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
attributes |
key: string, value: object | - | Custom Attributes associated with this entity. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Extra attributes added to the entity. Those are final and cannot be modified. It's a good way to keep things organized and and modifiable. These can be used by behaviors or the entity class: attributes: {
"attackPower": 10
},
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
behaviorconfigs |
key: string, value: object | - | Adds fields to both the client and server behavior properties. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The dictionary is indexed by the behavior code. If a corresponding behavior is found in the client or server configs, then the properties specified in this dictionary are merged with the client/server behavior properties. Any entries in this dictionary are ignored if they do not match a client or server behavior. For example, behaviorConfigs: {
"controlledphysics": {
"stepHeightByType": {
"deer-pampas-*": 2.1251,
"deer-pudu-*": 2.1251,
"deer-redbrocket-*": 2.1251,
"*": 3.1251
}
},
...
},
client: {
...
behaviors: [
...
{ code: "controlledphysics" },
...
],
...
},
server: {
...
behaviors: [
...
{ code: "controlledphysics" },
...
],
...
},
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sounds |
key: string, value: string | - | Sounds of the entity, you can also add your own sounds and play them, but here is a list of default sounds used death , hurt , idle , jump , swim and eat |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
idlesoundchance |
decimal number | 0.3 | How likely it is for the entity to play an idle sound. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
idlesoundrange |
decimal number | 24 | How far the idle sound played by the entity can be heard. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
drops |
array of object | - | The items that should drop from breaking this block. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
No drop By default an entity does not drop anything at all: drops: [],
Drop You can also specify an item or block to drop. Therefore you need to define an ItemStack, with the given properties:
For example, if the entity should drop charcoalpile: drops: [
{ type: "item", code: "charcoal" }
],
You can also specify drop special itemstack if the entity is killed by certain tool, similar to Tallgrass which only drops something if it's mined by a knife: drops: [
{ type: "item", code: "drygrass", tool: "knife" },
],
Chance drops Let's take a look at an example. This is the drop property of rock:
drops: [
{
type: "item",
code: "stone-{rock}",
quantity: { avg: 2.5, var: 0.5 }
},
]
This will drop 2-3 blocks. avg: Stands for the default drop quantity. If var is 0 or not specified it will always drop the given average. var: How much the drop rate can vary. Meaning the drop rate can be Furthermore you can also switch between different distribution modes using the dist property.
Multiple Drops Of course you can also define multiple drops at once. A Sapling for example can drop a sapling and a stick: drops: [
{
type: "block",
code: "sapling-{wood}",
quantity: { avg: 0.02, var: 0 },
},
{
type: "item",
code: "stick",
quantity: { avg: 0.02, var: 0 },
}
],
Last Drop In order to add a special drop, which (if dropped) prevents all other drops, you can use the lastDrop property: drops: [
{ type: "item", code: "stick", quantity: { avg: 0.2, var: 0 }, lastDrop: true },
{ type: "item", code: "sapling", quantity: { avg: 1.25, var: 0 } }
],
The entity will either drop a stick with a chance of 20% or an average of 1.25 saplings. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
client: { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
renderer |
string | - | Name of there renderer system that draws this entity. Most entities use "shape". The valid values are:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
texture |
CompositeTexture | Sets the "all" entry in textures. The "all" entry overwrites all other textures in the shape. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
base overlays alternates |
Default example (player model): texture: {
base: "entity/humanoid/player"
}
texture: {
base: "entity/humanoid/player-{type}"
}
texture: {
base: "entity/humanoid/player-{type}",
overlays: [ "entity/humanoid/player-{type}-overlay" ],
}
Random textures: texture: {
base: "entity/humanoid/player-{type}",
alternates: [
{ base: "entity/humanoid/player-{type}2" },
{ base: "entity/humanoid/player-{type}3"}
]
}
Random textures and overlays combined: texture: {
base: "entity/humanoid/player-{type}",
overlays: [ "entity/humanoid/player-{type}-overlay" ],
alternates: [
{ base: "entity/humanoid/player-{type}2", overlays: [ "entity/humanoid/player-{type}2-overlay" ] },
{ base: "entity/humanoid/player-{type}3", overlays: [ "entity/humanoid/player-{type}3-overlay" ] }
]
}
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
textures |
key: string, value: CompositeTexture | Can be used to replace specific textures of the shape. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
base overlays alternates |
Replace arrow texture of the shape, the stick texture remains untouched: textures: {
"arrow": {
base: "entity/arrow/stone"
}
}
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shape |
CompositeShape | - | The shape of the entity. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
base |
The path to the shape json file, the base dir is assets/shapes/ . shape: { base: "entity/arrow" }
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
glowlevel |
0 ... 255 | 0 | Causes the entity to visually glow if Bloom is enabled. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
size |
decimal number | 1 | Can be used to scale the entity up or down. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sizegrowthfactor |
decimal number | 0 | The rate at which the entity's size grows with age - used for chicks and other small baby animals. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pitchstep |
boolean | true | Makes entities pitch forward and backwards when stepping. This is usually left as the default, except for humanoid entities where most set it to false. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
behaviors |
array of object | A behavior adds custom abilities to the entity. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
floatupwhenstuck
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
animations |
array of object | WIP | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
code |
string | The identifier of the animation. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
attributes |
key: string, value: object | - |
Custom attributes that can be used for the animation. Valid vanilla attributes are:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
animation |
string | The animation code identifier to play. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
weight |
decimal number | 1.0 | Animations with a high weight value will be prioritized over the other animations when the animations are combined. For example if the player aims with a bow while jumping around, the aiming animation has a higher weight (for the upper body) so the jumping animation will be reduced. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
elementweight |
key: string, value: decimal number | Allows you to specify a weight for each element individually. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
animationspeed |
decimal number | 1.0 | The speed of the animation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mulwithwalkspeed |
boolean | false | Whether the animation speed should be multiplied by the entity's current movement speed. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
easeinspeed |
decimal number | 10 | The ease in affects the weight of the animation, so that it starts off with weak strength (the animation only slightly changes the entity shape) and gradually goes to nearly full strength. The ease in only affects the strength of the animation, not the speed the animation plays at.
With easeinspeed=1, it takes roughly 0.7 seconds for the animation to get to half strength. Setting the easeinspeed to 2 causes the ease in to go roughly twice as fast (animation strength increases faster), such that get animation gets to half strength after about 0.35 seconds. Assuming a constant frame rate, this is the exact formula for the ease in strength (assuming weight=1, blendmode=add).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
easeoutspeed |
decimal number | 10 | Multiplies the speed at which the animation eases out. See the easein field for an explanation of easing. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
weightcapfactor |
decimal number | 0.0 | This field allows the ease in and ease out to work in the Average/AddAverage blend modes. The field has no affect for the Add blend mode, where ease in and ease out work without setting this field.
First, let's consider how the blending works without setting this field. Let's say animation A has weight 2 and animation B has weight 1, and they are both playing in the middle so ease in/out does not apply. Due to the weighted average, animation A will have 2/3 of its normal effect, and animation B will have 1/3 of its normal effect. Nothing wrong here. Next, let's consider what happens when animation A is eased in and animation B is playing at full strength with weight 1. Due to the ease in, animation A has weight 0.1. Now animation A gets 0.1/1.1 weight (low weight), and animation B gets 1/1.1 weight (almost full strength). Nothing wrong here either. Finally, let's consider what happens when only animation A is playing and it is getting eased in. Due to the easing, animation A only has strength 0.1. The total weight is 0.1. Animation A gets 0.1/0.1 = 1 (full strength)? That's not right; the ease in is supposed to reduce the strength of the animation. The weightcapfactor sets the minimum total weight. Let's say it is set to 1.0. Now let's revist the previous example. Animation A gets 0.1/max(1.0, 0.1) = 0.1/1.0 = 0.1. So with weightcapfactor=1.0, animation A gets properly eased in, even when it is the only animation playing. So for animations that use the Average/AddAverage modes, set weightcapfactor equal to the weight, for ease in/ease out to work properly. Note that the comment in the source code is wrong for this field as of 1.20.0-pre.4. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
triggeredby |
Specifies by what the animation is triggered. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
oncontrols |
array of strings | An array of activities that start the animation. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
none |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
idle |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
move |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sprintmode |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sneakmode |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fly |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
swim |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
jump |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fall |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
climb |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
floorsitting |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dead |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
break |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
place |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
glide |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mounted |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
matchexact |
boolean | false |
If set to true, all OnControls elements need to be happening simultaneously to trigger the animation. If set to false, at least one OnControls element needs to be happening to trigger the animation. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
defaultanim |
boolean | false | Set to true if this animation should be played whenever no other animations are playing. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
blendmode |
string | Animation blend mode for all elements. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
add |
Add the animation without taking other animations into considerations. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
average |
Add the pose and average it together with all other running animations with blendmode Average or AddAverage. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
addaverage |
The comment in the source code says, "Add the animation without taking other animations into consideration, but add it's weight for averaging." However, it actually has done the same thing as Average since version 1.17. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
elementblendmode |
key: string, value: string | Allows you to specify a blend mode for each element individually. Any element not in this list defaults its blend mode to the value specified in blendmode. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
suppressdefaultanimation |
boolean | false | When this animation plays, stop the default animation, even if the entity class set alwaysRunIdle=true (as EntityPlayer does). When alwaysRunIdle=false, setting suppressdefaultanimation is unnecessary, because all non-default animations already stop the default animation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
server: { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
attributes |
key: string, value: object | - | Custom Attributes associated with this entity only known by the server. They will not be send to the client. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Extra attributes added to the entity for server use only. Those are final and cannot be modified. It's a good way to keep things organized and and modifiable. These can be used by behaviors or the entity class: attributes: {
"attackPower": 10
},
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
behaviors |
array of object | A behavior adds custom abilities to the entity. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
floatupwhenstuck
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
spawnConditions |
object | - | Specifies the circumstances of the entity spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
runtime |
object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
group |
string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
chance |
decimal number | 1.0 | How long it takes to make an attempt to spawn the entity: 1.0 -> 4 seconds, 0.1 -> 40 seconds. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxquantity |
integer | 20 | Maximum number of entities inside the chunk, if this is exceeded the entity will not spawn there. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mindistancetoplayer |
integer | 18 | Minimum distance the entity can spawn away from the player. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minlightlevel |
integer | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxlightlevel |
integer | 32 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lightleveltype |
string | "MaxLight" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
onlyblocklight |
Will get you just the block light | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
onlysunlight |
Will get you just the sun light unaffected by the day/night cycle | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxlight |
Will get you max(onlysunlight, onlyblocklight) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxtimeofdaylight |
Will get you max(sunlight * sunbrightness, blocklight) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
groupsize |
object | { avg: 1, var: 0 } |
Determines the size of the group. By default the size of the group is always one. Find out more about the random generator. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
companions |
array of string | - | Codes of all possible companions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
insideblockcodes |
array of string | [ "game:air" ] |
The block codes in which the entity can spawn. Entities which can spawn underwater might use [ "game:water" ] instead. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
requiresolidground |
boolean | true | If the entity requires a solid block below it. For example birds and fishes do not require it. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tryonlysurface |
boolean | false | If false the game will also try to spawn the entity below the surface (in a cave for example). For ordinary animals this should be true so they only spawn on the surface. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mintemp |
integer | -40 | Minimum temperature at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxtemp |
integer | 40 | Maximum temperature at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minrain |
decimal number | 0 | Minimum rain average at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxrain |
decimal number | 1 | Maximum rain average at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minforest |
decimal number | 0 | Minimum forest density at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxforest |
decimal number | 1 | Maximum forest density at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minshrubs |
decimal number | 0 | Minimum shrubs density at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxshrubs |
decimal number | 1 | Maximum shrubs density at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minforestorshrubs |
decimal number | 0 | Minimum shrubs or forest density at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
worldgen |
object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
group |
string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
triesperchunk |
object | zero | How many tries per chunk the entity has to spawn. Find out more about the random generator. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minlightlevel |
integer | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxlightlevel |
integer | 32 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lightleveltype |
string | "MaxLight" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
onlyblocklight |
Will get you just the block light | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
onlysunlight |
Will get you just the sun light unaffected by the day/night cycle | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxlight |
Will get you max(onlysunlight, onlyblocklight) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxtimeofdaylight |
Will get you max(sunlight * sunbrightness, blocklight) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
groupsize |
object | { avg: 1, var: 0 } |
Determines the size of the group. By default the size of the group is always one. Find out more about the random generator. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
companions |
array of string | - | Codes of all possible companions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
insideblockcodes |
array of string | [ "game:air" ] |
The block codes in which the entity can spawn. Entities which can spawn underwater might use [ "game:water" ] instead. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
requiresolidground |
boolean | true | If the entity requires a solid block below it. For example birds and fishes do not require it. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tryonlysurface |
boolean | false | If false the game will also try to spawn the entity below the surface (in a cave for example). For ordinary animals this should be true so they only spawn on the surface. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mintemp |
integer | -40 | Minimum temperature at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxtemp |
integer | 40 | Maximum temperature at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minrain |
decimal number | 0 | Minimum rain average at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxrain |
decimal number | 1 | Maximum rain average at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minforest |
decimal number | 0 | Minimum forest density at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxforest |
decimal number | 1 | Maximum forest density at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minshrubs |
decimal number | 0 | Minimum shrubs density at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxshrubs |
decimal number | 1 | Maximum shrubs density at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minforestorshrubs |
decimal number | 0 | Minimum shrubs or forest density at which the entity can spawn. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} |
Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.
Modding | |
---|---|
Modding Introduction | Getting Started • Theme Pack |
Content Modding | Content Mods • Developing a Content Mod • Basic Tutorials • Intermediate Tutorials • Advanced Tutorials • Content Mod Concepts |
Code Modding | Code Mods • Setting up your Development Environment |
Property Overview | Item • Entity • Block • Block Behaviors • Block Classes • Block Entities • Block Entity Behaviors • World properties |
Workflows & Infrastructure | Modding Efficiency Tips • Mod-engine compatibility • Mod Extensibility • VS Engine |
Additional Resources | Community Resources • Modding API Updates • Programming Languages • List of server commands • List of client commands • Client startup parameters • Server startup parameters Example Mods • API Docs • GitHub Repository |