Skip to content

Commit

Permalink
Update particle schemas (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
stirante authored Mar 6, 2024
1 parent 2dbccee commit c65df90
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,19 @@
"facing_camera_mode": {
"description": "Used to orient the billboard.",
"type": "string",
"enum": ["lookat_xyz", "lookat_y", "rotate_xyz", "rotate_y", "direction_x", "direction_y", "direction_z"],
"enum": [
"rotate_xyz",
"rotate_y",
"lookat_xyz",
"lookat_y",
"lookat_direction",
"direction_x",
"direction_y",
"direction_z",
"emitter_transform_xy",
"emitter_transform_xz",
"emitter_transform_yz"
],
"title": "Facing Camera Mode"
},
"direction": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"type": "object",
"title": "Particle Motion Collision Component For 1.10.0",
"additionalProperties": false,
"required": ["collision_radius"],
"properties": {
"collision_drag": { "type": "number", "description": "UNDOCUMENTED: collision drag.", "title": "Collision Drag" },
"coefficient_of_restitution": {
Expand Down
83 changes: 58 additions & 25 deletions source/resource/particles/particles.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,62 @@
}
}
],
"definitions": {
"event": {
"additionalProperties": false,
"title": "Particle event",
"description": "The particle event.",
"properties": {
"sequence": {
"title": "Event sequence",
"description": "A sequence of elements to execute.",
"type": "array",
"items": {
"$ref": "#/definitions/event"
}
},
"randomize": {
"title": "Event randomize",
"description": "A list of elements to execute one of.",
"type": "array",
"items": {
"$ref": "#/definitions/event"
}
},
"particle_effect": {
"title": "Particle Effect",
"description": "Particle effect action.",
"properties": {
"effect": { "type": "string", "description": "Identifier of the effect.", "title": "Effect" },
"type": { "type": "string", "description": "UNDOCUMENTED: type.", "title": "Type", "enum": ["emitter", "emitter_bound", "particle", "particle_with_velocity"] },
"pre_effect_expression": { "type": "string", "description": "Molang expression to run on the new emitter.", "title": "Pre Effect Expression" }
}
},
"sound_effect": {
"title": "Sound Effect",
"description": "Sound effect action.",
"properties": {
"event_name": { "type": "string", "description": "Name of the level sound event.", "title": "Event Name" }
}
},
"expression": {
"type": "string",
"description": "Molang expression to run on the event-firing emitter.",
"title": "Expression"
},
"log": {
"type": "string",
"description": "Message to log, along with the firing effect's name and event position.",
"title": "Log"
},
"weight": {
"type": "number",
"description": "The weight of the element.",
"title": "Weight"
}
}
}
},
"type": "object",
"additionalProperties": false,
"description": "A particle definition file.",
Expand Down Expand Up @@ -45,7 +101,7 @@
"properties": {
"material": {
"type": "string",
"examples": ["particles_alpha", "particles_blend"],
"examples": ["particles_alpha", "particles_blend", "particles_add"],
"description": " Minecraft material to use for emitter.",
"title": "Material"
},
Expand Down Expand Up @@ -137,30 +193,7 @@
"description": "UNDOCUMENTED: events.",
"title": "Events",
"additionalProperties": {
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"title": "Event",
"type": "object",
"additionalProperties": false,
"properties": {
"particle_effect": {
"title": "Particle Effect",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"properties": {
"effect": { "type": "string", "description": "UNDOCUMENTED: effect.", "title": "Effect" },
"type": { "type": "string", "description": "UNDOCUMENTED: type.", "title": "Type" }
}
},
"sound_effect": {
"title": "Sound Effect",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"properties": {
"event_name": { "type": "string", "description": "UNDOCUMENTED: effect.", "title": "Event Name" }
}
}
}
"$ref": "#/definitions/event"
}
}
}
Expand Down

0 comments on commit c65df90

Please sign in to comment.