aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-05-14 23:59:03 +0200
committerLinnea Gräf <nea@nea.moe>2024-05-15 00:19:40 +0200
commitd7d863f76d78b90179918222539fe4de05f7b44e (patch)
tree9481ba5d75e685f4f599428388c668a277e60b18 /docs
parentfd069385118406cd641c802e0a3a7d166a482eee (diff)
downloadFirmament-d7d863f76d78b90179918222539fe4de05f7b44e.tar.gz
Firmament-d7d863f76d78b90179918222539fe4de05f7b44e.tar.bz2
Firmament-d7d863f76d78b90179918222539fe4de05f7b44e.zip
Add extra attribute item predicate
Diffstat (limited to 'docs')
-rw-r--r--docs/Texture Pack Format.md72
1 files changed, 72 insertions, 0 deletions
diff --git a/docs/Texture Pack Format.md b/docs/Texture Pack Format.md
index 1aedde9..914e157 100644
--- a/docs/Texture Pack Format.md
+++ b/docs/Texture Pack Format.md
@@ -86,6 +86,36 @@ Filter by item type:
"firmament:item": "minecraft:clock"
```
+#### Extra attributes
+
+Filter by extra attribute NBT data:
+
+Specify a `path` to look at, separating sub elements with a `.`. You can use a `*` to check any child.
+
+Then either specify a `match` sub-object or directly inline that object in the format of an [nbt matcher](#nbt-matcher).
+
+Inlined match:
+
+```json5
+"firmament:extra_attributes": {
+ "path": "gems.JADE_0",
+ "string": "PERFECT"
+}
+```
+
+Sub object match:
+
+```json5
+"firmament:extra_attributes": {
+ "path": "gems.JADE_0",
+ "match": {
+ "string": "PERFECT"
+ }
+}
+```
+
+
+
#### Logic Operators
Logic operators allow to combine other firmament predicates into one. This is done by building boolean operators:
@@ -151,6 +181,48 @@ specify one of these other matchers and one color preserving property.
}
```
+### Nbt Matcher
+
+This matches a single nbt element.
+
+Have the type of the nbt element as json key. Can be `string`, `int`, `float`, `double`, `long`, `short` and `byte`.
+
+The `string` type matches like a regular [string matcher](#string-matcher):
+
+```json
+"string": {
+ "color": "strip",
+ "regex": "^aaa bbb$"
+}
+```
+
+The other (numeric) types can either be matched directly against a number:
+
+```json
+"int": 10
+```
+
+Or as a range:
+
+```json
+"long": {
+ "min": 0,
+ "max": 1000
+}
+```
+
+Min and max are both optional, but you need to specify at least one. By default `min` is inclusive and `max` is exclusive.
+You can override that like so:
+
+```json
+"short": {
+ "min": 0,
+ "max": 1000,
+ "minExclusive": true,
+ "maxExclusive": false
+}
+```
+
## Armor textures
You can re-*texture* armors, but not re-*model* them with firmament.