Skip to content

Commit

Permalink
Move extra snippets outside of sub module
Browse files Browse the repository at this point in the history
  • Loading branch information
outercloudstudio committed May 17, 2024
1 parent 15a296c commit 9c315dd
Show file tree
Hide file tree
Showing 8 changed files with 201 additions and 0 deletions.
22 changes: 22 additions & 0 deletions plugins/ExtraSnippets/README.md
Original file line number Diff line number Diff line change
@@ -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.

> ⚠️ **<font color="red">Warning:</font>** 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).
12 changes: 12 additions & 0 deletions plugins/ExtraSnippets/manifest.json
Original file line number Diff line number Diff line change
@@ -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"
}
23 changes: 23 additions & 0 deletions plugins/ExtraSnippets/snippets/BasicBlockProperties.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
33 changes: 33 additions & 0 deletions plugins/ExtraSnippets/snippets/BasicEntityMovement.json
Original file line number Diff line number Diff line change
@@ -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
}
}
}
39 changes: 39 additions & 0 deletions plugins/ExtraSnippets/snippets/BasicEntityProperties.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
33 changes: 33 additions & 0 deletions plugins/ExtraSnippets/snippets/BasicItemProperties.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
}
21 changes: 21 additions & 0 deletions plugins/ExtraSnippets/snippets/DisableEntityDamage.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
}
}
18 changes: 18 additions & 0 deletions plugins/ExtraSnippets/snippets/TradeTableLink.json
Original file line number Diff line number Diff line change
@@ -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
}
}
}

0 comments on commit 9c315dd

Please sign in to comment.