You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/defaulted/intro.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -74,24 +74,24 @@ This component patch will apply to every single item that exists.
74
74
That is fine if you want to make a global change, but remember that in this exemple we wanted to only apply it to certain items.
75
75
76
76
From this point, I will introduce the next element:
77
-
The `items` and `tag` fields.
77
+
The `items` and `tags` fields.
78
78
79
79
1.`items` defines a set of registered, existing items to apply the patch to.
80
-
2.`tag` defines a list of item tags to apply the patch to.
80
+
2.`tags` defines a list of item tags to apply the patch to.
81
81
82
82
:::details {open}
83
83
If both are absent, the patch is global, or rather, applies to every item that exists.
84
84
85
-
Either `items` or `tag` can be absent, items which are patched depend solely on if the item is in the `items` set or is within a tag in the `tag` list.
85
+
Either `items` or `tags` can be absent, items which are patched depend solely on if the item is in the `items` set or is within a tag in the `tags` list.
86
86
87
-
If both are present, then any item within either `items` or `tag` will be patched, so including items which are within a tag which is defined, is generally redundant.
87
+
If both are present, then any item within either `items` or `tags` will be patched, so including items which are within a tag which is defined, is generally redundant.
88
88
:::
89
89
90
90
For our example, let's say we want every sword to get this blocking component:
91
91
92
92
```json{2-4}
93
93
{
94
-
"tag": [
94
+
"tags": [
95
95
"minecraft:swords"
96
96
],
97
97
"patch": {
@@ -127,7 +127,7 @@ The addition to make this occur, is as follows:
127
127
"items": [
128
128
"minecraft:totem_of_undying"
129
129
],
130
-
"tag": [
130
+
"tags": [
131
131
"minecraft:swords"
132
132
],
133
133
"patch": {
@@ -161,7 +161,7 @@ Ignoring the frivolity of such an idea, here is how you would do that:
0 commit comments