From 335a33728ebfe6fe547e9ea90e9c6a0b26e00e27 Mon Sep 17 00:00:00 2001 From: Misode Date: Fri, 4 Oct 2019 10:33:19 +0200 Subject: [PATCH] Add entity distance property --- locales/en.json | 8 ++++++++ schemas/1.14.json | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/locales/en.json b/locales/en.json index d0c87a2e..f21485ee 100644 --- a/locales/en.json +++ b/locales/en.json @@ -234,6 +234,7 @@ "type": "Entity", "nbt": "NBT", "location": "Location", + "distance": "Distance", "status_effect": "Effects", "status_effect_add": "Add Effect", "status_effect_remove": "Remove Effect" @@ -249,6 +250,13 @@ "feature": "Feature", "dimension": "Dimension" }, + "$distance": { + "x": "X", + "y": "Y", + "z": "Z", + "absolute": "Absolute", + "horizontal": "Horizontal" + }, "$status_effect": { "amplifier": "Amplifier", "duration": "Duration", diff --git a/schemas/1.14.json b/schemas/1.14.json index d2eba69b..ce4f673e 100644 --- a/schemas/1.14.json +++ b/schemas/1.14.json @@ -702,6 +702,13 @@ "value": "location", "collapse": true }, + { + "id": "distance", + "type": "object", + "translate": "$entity.distance", + "value": "distance", + "collapse": true + }, { "id": "effects", "type": "map", @@ -768,6 +775,38 @@ } ] }, + { + "id": "distance", + "type": "object", + "color": "dark", + "fields": [ + { + "id": "x", + "type": "boundary", + "translate": "$distance.x" + }, + { + "id": "y", + "type": "boundary", + "translate": "$distance.y" + }, + { + "id": "z", + "type": "boundary", + "translate": "$distance.z" + }, + { + "id": "absolute", + "type": "boundary", + "translate": "$distance.absolute" + }, + { + "id": "horizontal", + "type": "boundary", + "translate": "$distance.horizontal" + } + ] + }, { "id": "status_effect", "type": "object",