Files
Xterionix c9449c75d6 Updated for 1.21.70 along with other improvements (#337)
* Update vscode-settings.json

* - Updated map color

* - Added replaceable block component

* - Effect durations can be set to infinite now

* - Added support for entity sound variants

* - Fix description for renders_when_invisible entity component

* - Added is_collidable component

* - Updated entity_sensor

* - Added body_rotation_axis_aligned

* - Updated projectile > on_hit

* - Set min and max for collision_box

* - Added locator field to sounds in animation controllers and animations

* - Added new event response

* - Removed peak_factor from mountain_parameters component

* - Added isotropic field to material_instances

* - Added tint field to material_instances

* - Added input_air_controlled entity component

* - Added use_beta_features property to entity.json

* - Added missing match_tool property

* - Added use_home_position_restriction to float_wander goal

* - Added deferred client biome components

* - Added dry_foliage_color client biome component

* - Added destruction_particles

* - Marked biome tinting as experimental

* - Fix property_inheritance under breedable

* - Fix inconsistency with scatter feature

* - Update rideable description

* - Allowed event.add/remove to be strings

* - Added missing property in move_around_target behavior

* - Made features accept block references

* - Allowed repairable to use item descriptors

* - Fix typo
2025-03-03 08:44:05 +01:00

231 lines
9.5 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "blockception.minecraft.resource.animation_controller",
"defaultSnippets": [
{
"label": "New animation controller",
"body": {
"format_version": "${1:1.10.0}",
"animation_controllers": {
"controller.animation.${2:${TM_FILENAME/[\\.].*//}}": {
"states": {
"default": "^{$3}"
}
}
}
}
}
],
"examples": [
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.example": {
"states": {
"default": { "transitions": [{ "state_1": "query.is_baby" }] },
"state_1": { "animations": ["state_1"], "transitions": [{ "default": "query.all_animations_finished" }] }
}
}
}
}
],
"type": "object",
"title": "Animation Controller",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"definitions": {
"animationspec": {
"anyOf": [
{ "title": "Animation Specification", "description": "A single string that specifies which animation there are.", "type": "string" },
{
"type": "object",
"title": "Animation Specification",
"description": "A object specification on how to transition.",
"maxProperties": 1,
"minProperties": 1,
"additionalProperties": {
"oneOf": [
{ "type": "string", "$ref": "../../molang/string.json" },
{ "type": "number", "description": "A blend weight." }
]
}
}
]
},
"particle_effect_spec": {
"additionalProperties": false,
"type": "object",
"required": ["effect"],
"properties": {
"bind_to_actor": {
"type": "boolean",
"title": "Bind To Actor",
"description": "Set to false to have the effect spawned in the world without being bound to an actor (by default an effect is bound to the actor).",
"const": false
},
"effect": { "type": "string", "title": "Effect", "description": "The name of a particle effect that should be played." },
"locator": { "type": "string", "title": "Locator", "description": "The name of a locator on the actor where the effect should be located." },
"pre_effect_script": {
"type": "string",
"title": "Pre Effect Script",
"description": "A molang script that will be run when the particle emitter is initialized.",
"pattern": "^.+;$"
}
}
},
"commands": { "type": "string", "description": "The event or commands to execute.", "pattern": "^(@s .+|/.+)$" }
},
"required": ["format_version", "animation_controllers"],
"additionalProperties": false,
"properties": {
"format_version": { "type": "string", "const": "1.10.0" },
"animation_controllers": {
"type": "object",
"title": "Animation Controllers Schema",
"description": "The animation controllers schema for.",
"propertyNames": {
"pattern": "^controller\\.animation\\.[a-z\\.]+",
"examples": ["controller.animation.example", "controller.animation.example.foo"]
},
"additionalProperties": {
"additionalProperties": false,
"type": "object",
"title": "A Animation Controller",
"description": "A single animation controller.",
"required": ["states"],
"minProperties": 1,
"properties": {
"states": {
"title": "States",
"description": "The states of this animation controller.",
"propertyNames": { "pattern": "[a-z\\.]+", "examples": ["default"] },
"minProperties": 1,
"type": "object",
"additionalProperties": {
"additionalProperties": false,
"title": "Animation State",
"description": "Animation state.",
"type": "object",
"examples": [
{
"animations": ["anim.idle"],
"transitions": [{ "example": "query.is_sheared" }]
}
],
"properties": {
"animations": {
"title": "Animations",
"description": "The animations definition for.",
"type": "array",
"items": { "$ref": "#/definitions/animationspec", "title": "Animations" }
},
"blend_transition": {
"title": "Blend Transition",
"oneOf": [
{
"type": "number",
"default": 0.1,
"minimum": 0,
"description": "A short-hand version of blend_out that simply sets the amount of time to fade out if the animation is interrupted."
},
{
"type": "object",
"description": "Specifies the cross-fade time in seconds when transitioning to another state.",
"additionalProperties": {
"type": "number",
"description": "Mapping of time since the animation was canceled, to the blend value at that time. A default key of time=0 to a blend value of 1.0 is provided if any other key is set and a blend value at time=0 hasn't already been set."
}
}
]
},
"blend_via_shortest_path": {
"description": "When blending a transition to another state, animate each euler axis through the shortest rotation, instead of by value.",
"type": "boolean",
"title": "Blend Via Shortest Path"
},
"particle_effects": {
"description": "The effects to be emitted.",
"type": "array",
"items": {
"$ref": "#/definitions/particle_effect_spec",
"description": "UNDOCUMENTED: particle effects.",
"title": "Particle Effects"
},
"title": "Particle Effects"
},
"sound_effects": {
"type": "array",
"description": "Collection of sounds to trigger on entry to this animation state.",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["effect"],
"properties": {
"effect": {
"description": "Valid sound effect names should be listed in the entity's resource_definition json file.",
"type": "string"
},
"locator": {
"type": "string",
"title": "Locator",
"description":
"The name of a locator on the actor where the effect should be located."
}
}
}
},
"transitions": {
"title": "Transition",
"description": "The transition definition for.",
"minProperties": 1,
"type": "array",
"items": {
"$ref": "#/definitions/animationspec",
"description": "The specification on when to transition to a new state.",
"title": "Transitions"
}
},
"variables": {
"type": "object",
"additionalProperties": {
"additionalProperties": false,
"type": "object",
"required": ["input"],
"properties": {
"input": { "$ref": "../../molang/number.json" },
"remap_curve": {
"title": "Remap Curve",
"type": "object",
"additionalProperties": { "propertyNames": { "pattern": "^([\\-\\+0-9]+|[\\-\\+0-9]+.[0-9]+)$" }, "type": "number" }
}
}
}
},
"on_entry": {
"title": "On Entry",
"description": "Sets molang on data on entry.",
"$comment": "UNDOCUMENTED",
"type": "array",
"items": { "pattern": "^.+=.+;$", "title": "Molang", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "type": "string" }
},
"on_exit": {
"title": "On Exit",
"description": "Sets molang on data on exit.",
"$comment": "UNDOCUMENTED",
"type": "array",
"items": { "pattern": "^.+=.+;$", "title": "Molang", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "type": "string" }
}
}
}
},
"initial_state": {
"type": "string",
"description": "The state to start with, if not specified state at position 0 in the array is used.",
"title": "Initial State"
}
}
}
}
}
}