diff --git a/source/behavior/blocks/format/components/transformation.json b/source/behavior/blocks/format/components/transformation.json new file mode 100644 index 00000000..c51bc925 --- /dev/null +++ b/source/behavior/blocks/format/components/transformation.json @@ -0,0 +1,84 @@ +{ + "$id": "blockception.minecraft.behavior.blocks.minecraft.transformation", + "title": "Transformation", + "description": "Supports rotation, scaling, and translation", + "type": "object", + "additionalProperties": false, + "properties": { + "rotation": { + "title": "Rotation", + "description": "Rotation in xxx?", + "type": "array", + "items": [ + { + "title": "X", + "description": "Rotation in xxx?", + "type": "number", + "default": 0 + }, + { + "title": "Y", + "description": "Rotation in xxx?", + "type": "number", + "default": 0 + }, + { + "title": "Z", + "description": "Rotation in xxx?", + "type": "number", + "default": 0 + } + ] + }, + "scale": { + "title": "Scale", + "description": "UNDOCUMENTED", + "type": "array", + "items": [ + { + "title": "X", + "description": "UNDOCUMENTED", + "type": "number", + "default": 1 + }, + { + "title": "Y", + "description": "UNDOCUMENTED", + "type": "number", + "default": 1 + }, + { + "title": "Z", + "description": "UNDOCUMENTED", + "type": "number", + "default": 1 + } + ] + }, + "translation": { + "title": "Translation", + "description": "UNDOCUMENTED", + "type": "array", + "items": [ + { + "title": "X", + "description": "UNDOCUMENTED", + "type": "number", + "default": 0 + }, + { + "title": "Y", + "description": "UNDOCUMENTED", + "type": "number", + "default": 0 + }, + { + "title": "Z", + "description": "UNDOCUMENTED", + "type": "number", + "default": 0 + } + ] + } + } +} diff --git a/source/behavior/blocks/format/minecraft.block.json b/source/behavior/blocks/format/minecraft.block.json index c7c004a5..3dbbf51b 100644 --- a/source/behavior/blocks/format/minecraft.block.json +++ b/source/behavior/blocks/format/minecraft.block.json @@ -32,6 +32,7 @@ "minecraft:placement_filter": { "$ref": "./components/placement_filter.json" }, "minecraft:rotation": { "$ref": "./components/rotation.json" }, "minecraft:selection_box": { "$ref": "./components/selection_box.json" }, + "minecraft:transformation": { "$ref": "./components/transformation.json" }, "minecraft:unit_cube": { "$ref": "./components/unit_cube.json" }, //Triggers diff --git a/source/behavior/entities/format/components/breedable.json b/source/behavior/entities/format/components/breedable.json index 1f76c7bd..097de90d 100644 --- a/source/behavior/entities/format/components/breedable.json +++ b/source/behavior/entities/format/components/breedable.json @@ -16,7 +16,7 @@ "title": "Baby Type" }, "breed_event": { - "$ref": "../types/event_object.json", + "$ref": "../types/event_object_filters.json", "description": "Event to run when this entity breeds.", "title": "Breed Event" }, diff --git a/source/behavior/entities/format/components/heartbeat.json b/source/behavior/entities/format/components/heartbeat.json index 1fbff814..1d329d37 100644 --- a/source/behavior/entities/format/components/heartbeat.json +++ b/source/behavior/entities/format/components/heartbeat.json @@ -1,7 +1,6 @@ { "$id": "blockception.minecraft.behavior.entities.minecraft.heartbeat", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", + "description": "defines the entity's heartbeat..", "type": "object", "title": "Heartbeat", "additionalProperties": false, @@ -9,9 +8,13 @@ "properties": { "interval": { "title": "Interval", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", + "description": "A Molang expression defining the inter-beat interval in seconds. A value of zero or less means no heartbeat..", "$ref": "../../../../molang/number.json" + }, + "sound_event": { + "title": "Sound Event", + "description": "Level sound event to be played as the heartbeat sound.", + "type": "string" } }, "examples": [{}] diff --git a/source/behavior/entities/format/types/event_object_filters.json b/source/behavior/entities/format/types/event_object_filters.json new file mode 100644 index 00000000..0da319b3 --- /dev/null +++ b/source/behavior/entities/format/types/event_object_filters.json @@ -0,0 +1,20 @@ +{ + "$id": "blockception.minecraft.entities.event_object", + "title": "Event", + "description": "Minecraft behavior event.", + "examples": [{ "event": "example:foo", "target": "self" }], + "type": "object", + "additionalProperties": false, + "properties": { + "event": { "type": "string", "pattern": "^[a-zA-Z0-9_\\-:]+$", "description": "The event to fire.", "title": "Event" }, + "target": { + "type": "string", + "description": "The target of the event.", + "title": "Target", + "enum": ["baby", "block", "damager", "other", "parent", "player", "self", "target"] + }, + "filters": { + "$ref": "../../filters/filters.json" + } + } +}