Skip to content

Commit

Permalink
Fixes (#177)
Browse files Browse the repository at this point in the history
* Adding block minecraft:transformation #176
* Updated heartbeat #171
* Fixing #152
  • Loading branch information
DaanV2 authored May 21, 2023
1 parent c7c9f67 commit 86171d9
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 5 deletions.
84 changes: 84 additions & 0 deletions source/behavior/blocks/format/components/transformation.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
}
}
1 change: 1 addition & 0 deletions source/behavior/blocks/format/minecraft.block.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion source/behavior/entities/format/components/breedable.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
11 changes: 7 additions & 4 deletions source/behavior/entities/format/components/heartbeat.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
{
"$id": "blockception.minecraft.behavior.entities.minecraft.heartbeat",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"description": "defines the entity's heartbeat..",
"type": "object",
"title": "Heartbeat",
"additionalProperties": false,
"required": [],
"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": [{}]
Expand Down
20 changes: 20 additions & 0 deletions source/behavior/entities/format/types/event_object_filters.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}

0 comments on commit 86171d9

Please sign in to comment.