ConTex is a library which allows resource packs to add block models with connected textures.
The connection metadata is specified in the block's blockstate file and the geometry is pulled from the standard variant and/or multipart declarations in the same blockstate file.
For resource packs
ConTex provides several builtin connected texture types and connection predicates.
Builtin texture types:
- Simple (connects on all six sides, only checks for the four axis-aligned directions, making no distinction between the diagonal blocks at the corner being present or not)
- Full (connects on all six sides, checks axis-aligned and diagonal directions for improved visual appearance)
- Pillar (connects only on the four sides perpendicular to the specified axis, only along the directions parallel to the specified axis)
- Default pillar type (takes existing geometry rotation on the source model into account, only requiring a vertical connected pillar texture, intended for pillar-like blocks like logs)
- Rotating pillar type (assumes source model has no existing rotation, requires both vertical and horizontal connected pillar texture, intended for blocks which don't already have pillar-like behaviour baked in)
- Omni-directional pillar (like rotating sub-type of Pillar but can connect along any of the three axis, attempting the different axis in the order Y, X, Z)
- Simple carpet (like Simple but only on the top and bottom surface)
- Full carpet (like Full but only on the top and bottom surface)
Builtin connection predicates:
- Same Block (connects if the two blocks are the same)
- Same State (connects if the blockstates of the two blocks are the same)
- Match Block (connects if the two blocks match the specified block)
- Allows specifying either a single block for both to match or a "self" block and an "other" block
- Match State (connects if the blockstates of the two blocks match the specified blockstate)
- Allows specifying either a single blockstate for both to match or a "self" blockstate and an "other" blockstate
- Match Tag (connects if the two blocks match the specified block tag)
- Allows specifying either a single tag for both to match or a "self" tag and an "other" tag
See the wiki (TBD) for the full details.
For mod developers
ConTex provides datagen helpers for mods wishing to use connected textures for resources in their builtin resource pack.
Due to the approach for metadata declaration taken by ConTex, a blockstate file specifying connected textures metadata cannot be loaded without ConTex being installed. For mods wishing to provide optional integration with ConTex it is therefore recommended to put the ConTex-aware blockstate files into a separate builtin resource pack which is registered via AddPackFindersEvent when ConTex is installed.
Mods can also register custom texture types and connection predicates via RegisterTextureMetaEvent to add custom connection behaviours not natively supported by ConTex.

