From afa128e8c621f3ad8139d57a7b4723d170b6106b Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Fri, 2 May 2025 18:48:30 +0200 Subject: feat: Add generic component matcher --- web/src/pages/docs/_texture-pack-format.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'web/src/pages') diff --git a/web/src/pages/docs/_texture-pack-format.md b/web/src/pages/docs/_texture-pack-format.md index da66043..bfa22ff 100644 --- a/web/src/pages/docs/_texture-pack-format.md +++ b/web/src/pages/docs/_texture-pack-format.md @@ -167,6 +167,32 @@ Sub object match: } ``` +#### Components + +You can match generic components similarly to [extra attributes](#extra-attributes). If you want to match an extra +attribute match directly using that, for better performance. + +You can specify a `path` and match similar to extra attributes, but in addition you can also specify a `component`. This +variable is the identifier of a component type that will then be encoded to nbt and matched according to the `match` +using a [nbt matcher](#nbt-matcher). + +```json5 +"firmament:component": { + "path": "rgb", + "component": "minecraft:dyed_color", + "int": 255 +} +// Alternatively +"firmament:component": { + "path": "rgb", + "component": "minecraft:dyed_color", + "match": { + "int": 255 + } +} +``` + + #### Pet Data Filter by pet information. While you can already filter by the skyblock id for pet type and tier, this allows you to -- cgit