From b781121dfa9501696d45f4e0ecc019e14add75cf Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Tue, 1 Feb 2022 18:06:14 +0100 Subject: [PATCH] Adding more snippets --- source/general/block/identifier.json | 3 ++- source/general/block/reference.json | 1 + source/general/entity/identifier.json | 3 ++- source/general/feature/identifier.json | 3 ++- source/general/fog/identifier.json | 3 ++- source/general/format_version.json | 8 +++++++- source/general/item/identifier.json | 3 ++- source/general/loot_table/identifier.json | 3 ++- source/general/particle/identifier.json | 3 ++- source/general/rawtext/rawtext.json | 8 +------- source/general/vectors/integer2.json | 3 ++- source/general/vectors/integer3.json | 3 ++- source/general/vectors/number2.json | 3 ++- source/general/vectors/number3.json | 3 ++- source/general/volume/identifier.json | 3 ++- 15 files changed, 33 insertions(+), 20 deletions(-) diff --git a/source/general/block/identifier.json b/source/general/block/identifier.json index a0e0ccff..9abc7431 100644 --- a/source/general/block/identifier.json +++ b/source/general/block/identifier.json @@ -4,5 +4,6 @@ "examples": ["namespace:block"], "pattern": "^[0-9a-zA-Z:_\\.\\-]+$", "title": "Block Identifier", - "type": "string" + "type": "string", + "defaultSnippets": [{ "label": "New Identifier", "body": "$1:$2" }] } diff --git a/source/general/block/reference.json b/source/general/block/reference.json index 62a777a9..ace5413e 100644 --- a/source/general/block/reference.json +++ b/source/general/block/reference.json @@ -3,6 +3,7 @@ "description": "A minecraft block reference", "examples": ["namespace:block", { "name": "namespace:block" }], "title": "Block Reference", + "defaultSnippets": [{ "label": "New Identifier", "body": "$1:$2" }], "oneOf": [ { "type": "string", "$ref": "./identifier.json" }, { diff --git a/source/general/entity/identifier.json b/source/general/entity/identifier.json index 34ab0b23..28633e72 100644 --- a/source/general/entity/identifier.json +++ b/source/general/entity/identifier.json @@ -4,5 +4,6 @@ "examples": ["namespace:entity_name"], "pattern": "^[0-9a-zA-Z:_\\.\\-]+$", "title": "Entity Identifier", - "type": "string" + "type": "string", + "defaultSnippets": [{ "label": "New Identifier", "body": "$1:$2" }] } diff --git a/source/general/feature/identifier.json b/source/general/feature/identifier.json index 9b815a9f..7516a018 100644 --- a/source/general/feature/identifier.json +++ b/source/general/feature/identifier.json @@ -4,5 +4,6 @@ "examples": ["namespace:feature"], "pattern": "^[0-9a-zA-Z:_\\.\\-]+$", "title": "Feature Identifier", - "type": "string" + "type": "string", + "defaultSnippets": [{ "label": "New Identifier", "body": "$1:$2" }] } diff --git a/source/general/fog/identifier.json b/source/general/fog/identifier.json index 06cbfdc2..7345244e 100644 --- a/source/general/fog/identifier.json +++ b/source/general/fog/identifier.json @@ -4,5 +4,6 @@ "examples": ["namespace:fog_name"], "pattern": "^[0-9a-zA-Z:_\\.\\-]+$", "title": "Fog Identifier", - "type": "string" + "type": "string", + "defaultSnippets": [{ "label": "New Identifier", "body": "$1:$2" }] } diff --git a/source/general/format_version.json b/source/general/format_version.json index a1fd04c6..cec0e435 100644 --- a/source/general/format_version.json +++ b/source/general/format_version.json @@ -4,5 +4,11 @@ "description": "A version that tells minecraft what type of data format can be expected when reading this file.", "pattern": "^([1-9]+)\\.([0-9]+)\\.([0-9]+)$", "type": "string", - "examples": ["1.17.40", "1.17.30", "1.17.0", "1.16.0", "1.15.0", "1.14.0", "1.13.0", "1.12.0", "1.10.0", "1.8.0"] + "examples": ["1.17.40", "1.17.30", "1.17.0", "1.16.0", "1.15.0", "1.14.0", "1.13.0", "1.12.0", "1.10.0", "1.8.0"], + "defaultSnippets": [ + { + "label": "New Format version", + "body": "1.${1|8,10,12,17,18|}.${2|0|}" + } + ] } diff --git a/source/general/item/identifier.json b/source/general/item/identifier.json index 53305ff0..3d1cfaf1 100644 --- a/source/general/item/identifier.json +++ b/source/general/item/identifier.json @@ -3,5 +3,6 @@ "description": "A minecraft item identifier", "pattern": "^[0-9a-zA-Z:_\\-\\.]+$", "title": "Item Identifier", - "type": "string" + "type": "string", + "defaultSnippets": [{ "label": "New Identifier", "body": "$1:$2" }] } diff --git a/source/general/loot_table/identifier.json b/source/general/loot_table/identifier.json index 4a9dce9b..ec615bcb 100644 --- a/source/general/loot_table/identifier.json +++ b/source/general/loot_table/identifier.json @@ -4,5 +4,6 @@ "examples": ["loot_tables/"], "pattern": "^loot_tables/.*\\.json$", "title": "Loot Table Identifier", - "type": "string" + "type": "string", + "defaultSnippets": [{ "label": "New Identifier", "body": "loot_tables/$1.json" }] } diff --git a/source/general/particle/identifier.json b/source/general/particle/identifier.json index 09470cf1..6c2f6026 100644 --- a/source/general/particle/identifier.json +++ b/source/general/particle/identifier.json @@ -4,5 +4,6 @@ "examples": ["namespace:particle_name"], "pattern": "^[0-9a-zA-Z:_\\.\\-]+$", "title": "Particle Identifier", - "type": "string" + "type": "string", + "defaultSnippets": [{ "label": "New Identifier", "body": "$1:$2" }] } diff --git a/source/general/rawtext/rawtext.json b/source/general/rawtext/rawtext.json index b4f1645e..9247df52 100644 --- a/source/general/rawtext/rawtext.json +++ b/source/general/rawtext/rawtext.json @@ -13,13 +13,7 @@ "$comment": "UNDOCUMENTED", "type": "array", "items": { - "oneOf": [ - { "type": "string" }, - { "$ref": "#/definitions/translate" }, - { "$ref": "#/definitions/text" }, - { "$ref": "#/definitions/selector" }, - { "$ref": "#/definitions/score" } - ] + "oneOf": [{ "type": "string" }, { "$ref": "#/definitions/translate" }, { "$ref": "#/definitions/text" }, { "$ref": "#/definitions/selector" }, { "$ref": "#/definitions/score" }] } }, "selector": { diff --git a/source/general/vectors/integer2.json b/source/general/vectors/integer2.json index 45ed4be6..4ba895c2 100644 --- a/source/general/vectors/integer2.json +++ b/source/general/vectors/integer2.json @@ -6,5 +6,6 @@ "items": [ { "type": "integer", "description": "The X component", "title": "X", "default": 0 }, { "type": "integer", "description": "The Y component", "title": "Y", "default": 0 } - ] + ], + "defaultSnippets": [{ "label": "New Array 2", "body": ["^$1", "^$2"] }] } diff --git a/source/general/vectors/integer3.json b/source/general/vectors/integer3.json index 5c0cef8a..b02721ec 100644 --- a/source/general/vectors/integer3.json +++ b/source/general/vectors/integer3.json @@ -7,5 +7,6 @@ { "type": "integer", "description": "The X component", "title": "X", "default": 0 }, { "type": "integer", "description": "The Y component", "title": "Y", "default": 0 }, { "type": "integer", "description": "The Z component", "title": "Z", "default": 0 } - ] + ], + "defaultSnippets": [{ "label": "New Array 3", "body": ["^$1", "^$2", "^$3"] }] } diff --git a/source/general/vectors/number2.json b/source/general/vectors/number2.json index 44a535a9..17933f59 100644 --- a/source/general/vectors/number2.json +++ b/source/general/vectors/number2.json @@ -6,5 +6,6 @@ "items": [ { "type": "number", "description": "The X component", "title": "X", "default": 0 }, { "type": "number", "description": "The Y component", "title": "Y", "default": 0 } - ] + ], + "defaultSnippets": [{ "label": "New Array 2", "body": ["^$1", "^$2"] }] } diff --git a/source/general/vectors/number3.json b/source/general/vectors/number3.json index c235f698..d571d844 100644 --- a/source/general/vectors/number3.json +++ b/source/general/vectors/number3.json @@ -7,5 +7,6 @@ { "type": "number", "description": "The X component", "title": "X", "default": 0 }, { "type": "number", "description": "The Y component", "title": "Y", "default": 0 }, { "type": "number", "description": "The Z component", "title": "Z", "default": 0 } - ] + ], + "defaultSnippets": [{ "label": "New Array 3", "body": ["^$1", "^$2", "^$3"] }] } diff --git a/source/general/volume/identifier.json b/source/general/volume/identifier.json index 7961aff5..f7ed7b53 100644 --- a/source/general/volume/identifier.json +++ b/source/general/volume/identifier.json @@ -4,5 +4,6 @@ "examples": ["namespace:volume_name"], "pattern": "^[0-9a-zA-Z:_\\.\\-]+$", "title": "Volume Identifier", - "type": "string" + "type": "string", + "defaultSnippets": [{ "label": "New Identifier", "body": "$1:$2" }] }