diff --git a/plugins/ExtraSnippets/README.md b/plugins/ExtraSnippets/README.md new file mode 100644 index 00000000..73325997 --- /dev/null +++ b/plugins/ExtraSnippets/README.md @@ -0,0 +1,22 @@ +# Extra Snippets + +### A Snippets extension for the add-on creator brige + +This adds many snippets for your add-ons. Some of the snippets are basic components that are common to entitys, blocks, and items, some are different methods of changing properties like disabling damage on entities. + +> ⚠️ **Warning:** Intellisense will not show snippets unless there is a comma after the last component like this: + +```json +{ + "components": { + "minecraft:attack": { + "damage": 5 + }, <-- + Snippet Intellisense activates here + } +} +``` + +## Help + +If you need any help or want to suggest a snippet, please submit a Github issue [here](https://github.com/THG2009/ExtraSnippets/issues). diff --git a/plugins/ExtraSnippets/manifest.json b/plugins/ExtraSnippets/manifest.json new file mode 100644 index 00000000..9d6c1917 --- /dev/null +++ b/plugins/ExtraSnippets/manifest.json @@ -0,0 +1,12 @@ +{ + "author": "Twig", + "name": "Extra Snippets", + "version": "1.0.0", + "description": "This extensions adds many snippets for Entitys, Blocks, Items, etx.", + "id": "609489ae-bb05-4264-9d20-cad0d7e4e8d7", + "tags": ["Snippets"], + "icon": "mdi-attachment-plus", + "releaseTimestamp": 1620755291316, + "readme": "https://github.com/bridge-core/plugins/tree/master/plugins/ExtraSnippets", + "target": "v2" +} diff --git a/plugins/ExtraSnippets/snippets/BasicBlockProperties.json b/plugins/ExtraSnippets/snippets/BasicBlockProperties.json new file mode 100644 index 00000000..84aa9af4 --- /dev/null +++ b/plugins/ExtraSnippets/snippets/BasicBlockProperties.json @@ -0,0 +1,23 @@ +{ + "name": "Snippet: Basic Block Properties", + "description": "This adds basic block properties that almost all normal mobs need", + "fileTypes": [ + "block" + ], + "locations": [ + "minecraft:block/components", + "minecraft:block/component_groups/*" + ], + "data": { + "minecraft:destructible_by_mining": { + "seconds_to_destroy": 1 + }, + "minecraft:destructible_by_explosion": { + "explosion_resistance": 1 + }, + "minecraft:flammable": true, + "minecraft:friction": 0.4, + "minecraft:display_name": "undefined", + "minecraft:map_color": "#000000" + } +} \ No newline at end of file diff --git a/plugins/ExtraSnippets/snippets/BasicEntityMovement.json b/plugins/ExtraSnippets/snippets/BasicEntityMovement.json new file mode 100644 index 00000000..022e7f41 --- /dev/null +++ b/plugins/ExtraSnippets/snippets/BasicEntityMovement.json @@ -0,0 +1,33 @@ +{ + "name": "Snippet: Basic Entity Movement", + "description": "This adds basic entity movement that almost all normal mobs need", + "fileTypes": [ + "entity" + ], + "locations": [ + "minecraft:entity/components", + "minecraft:entity/component_groups/*" + ], + "data": { + "minecraft:movement": { + "value": 5, + "max": 10 + }, + "minecraft:movement.generic": { + "max_turn": 270 + }, + "minecraft:navigation.generic": { + "avoid_damage_blocks": true, + "can_jump": true, + "can_float": true + }, + "minecraft:behavior.random_stroll": { + "interval": 120, + "priority": 0, + "speed_multiplier": 1 + }, + "minecraft:attack": { + "damage": 5 + } + } +} \ No newline at end of file diff --git a/plugins/ExtraSnippets/snippets/BasicEntityProperties.json b/plugins/ExtraSnippets/snippets/BasicEntityProperties.json new file mode 100644 index 00000000..a9a42f0e --- /dev/null +++ b/plugins/ExtraSnippets/snippets/BasicEntityProperties.json @@ -0,0 +1,39 @@ +{ + "name": "Snippet: Basic Entity Properties", + "description": "This adds basic entity properties that almost all normal mobs need", + "fileTypes": [ + "entity" + ], + "locations": [ + "minecraft:entity/components", + "minecraft:entity/component_groups/*" + ], + "data": { + "minecraft:behavior.look_at_player": { + "priority": 3, + "look_distance": 6 + }, + "minecraft:can_climb": {}, + "minecraft:pushable": { + "is_pushable": true, + "is_pushable_by_piston": true + }, + "minecraft:collision_box": { + "height": 1, + "width": 1 + }, + "minecraft:leashable": {}, + "minecraft:physics": { + "has_collision": true, + "has_gravity": true + }, + "minecraft:jump.static": { + "jump_power": 0.42 + }, + "minecraft:health": { + "max": 20, + "value": 20 + }, + "minecraft:floats_in_liquid": {} + } +} \ No newline at end of file diff --git a/plugins/ExtraSnippets/snippets/BasicItemProperties.json b/plugins/ExtraSnippets/snippets/BasicItemProperties.json new file mode 100644 index 00000000..bd5aa0a4 --- /dev/null +++ b/plugins/ExtraSnippets/snippets/BasicItemProperties.json @@ -0,0 +1,33 @@ +{ + "name": "Snippet: Basic Item Properties", + "description": "This adds basic item properties that almost all normal items need", + "fileTypes": [ + "item" + ], + "locations": [ + "minecraft:item/components", + "minecraft:item/component_groups/*" + ], + "data": { + "minecraft:icon": { + "texture": "undefined.png" + }, + "minecraft:allow_off_hand": { + "value": true + }, + "minecraft:display_name": { + "value": "undefined" + }, + "minecraft:fuel": { + "duration": 3.0 + }, + "minecraft:hand_equipped": true, + "minecraft:max_stack_size": 64, + "minecraft:should_despawn": true, + "minecraft:tags": { + "tags": [ + "undefined_tag" + ] + } + } +} \ No newline at end of file diff --git a/plugins/ExtraSnippets/snippets/DisableEntityDamage.json b/plugins/ExtraSnippets/snippets/DisableEntityDamage.json new file mode 100644 index 00000000..a15baae1 --- /dev/null +++ b/plugins/ExtraSnippets/snippets/DisableEntityDamage.json @@ -0,0 +1,21 @@ +{ + "name": "Snippet: Disable Entity Damage", + "description": "This adds a damage sensor that makes the entity invulnerable", + "fileTypes": [ + "entity" + ], + "locations": [ + "minecraft:entity/components", + "minecraft:entity/component_groups/*" + ], + "data": { + "minecraft:damage_sensor": { + "triggers": [ + { + "cause": "all", + "deals_damage": false + } + ] + } + } +} \ No newline at end of file diff --git a/plugins/ExtraSnippets/snippets/TradeTableLink.json b/plugins/ExtraSnippets/snippets/TradeTableLink.json new file mode 100644 index 00000000..83057a3d --- /dev/null +++ b/plugins/ExtraSnippets/snippets/TradeTableLink.json @@ -0,0 +1,18 @@ +{ + "name": "Snippet: Trade Table Link", + "description": "This adds a link to a trade table", + "fileTypes": [ + "entity" + ], + "locations": [ + "minecraft:entity/components", + "minecraft:entity/component_groups/*" + ], + "data": { + "minecraft:trade_table": { + "display_name": "undefined", + "table": "undefined.json", + "new_screen": true + } + } +} \ No newline at end of file