promotional bannermobile promotional banner

TsAssembly

Dynamically connected textures!
glass_full.png

glass_full.png

glass_original.png

glass_original.png

gray_stained_glass_composite.png

gray_stained_glass_composite.png

glass_composite.png

glass_composite.png

Description

TsAssembly — Dynamic Rule Tile & Connected Textures Engine

TsAssembly is a lightweight, high-performance, client-side dynamic connected textures (CTM) and rule-tile engine for NeoForge. Built for real-time quad manipulation, it seamlessly merges adjacent blocks, glass panes, and complex surfaces using 3x3 composite overlays, 47-tile full connectivity, and directional edge solvers with zero runtime garbage collection overhead.


Key Features

  • Zero-Allocation Quad Remapping: Utilizes precomputed $O(1)$ lookup tables (LUT) and raw vertex transforms during chunk meshing to eliminate micro-stutters.

  • 3 Flexible Connection Modes:

  • COMPOSITE (3x3 Grid): Dynamic layering with seamless transparent corners and edge overlays.

  • FULL (6x6 Grid / 47-Tile CTM): Complete classic connected texture mapping with inner/outer corner detection.

  • PANE_EDGE: Dedicated glass pane connection solver that removes interior seams while preserving exterior borders.

  • Smart 3D Geometry Detection: Accurately calculates adjacent occlusion, diagonal steps, stair offsets, and inverted quad winding.

  • Built-in Template Exporter: Generate complete resource pack templates with sliced textures directly from in-game blocks.


In-Game Commands

Generate ready-to-edit resource packs and texture templates directly in the game:

/tsassembly export <block>
/tsassembly export <block> [composite|full]
/tsassembly export <block> [composite|full] <pack_name>
  • Exported templates are saved directly to .minecraft/resourcepacks/<pack_name>/.

Custom Resource Pack Guide

Creating a connected texture pack for TsAssembly requires no Java code—only standard PNG textures and JSON rule files.

1. Folder Structure

Create a resource pack folder (e.g., MyConnectedPack) inside your .minecraft/resourcepacks/ directory:

MyConnectedPack/
├── pack.mcmeta
├── pack.png                               (Optional: 64x64 icon)
└── assets/
    └── <namespace>/                       (e.g., "tsassembly" or your custom ID)
        ├── rule_tiles/                    (JSON rule definitions)
        │   ├── glass.json
        │   └── oak_log_sides.json
        └── textures/
            └── block/                     (Connected texture sheets)
                ├── glass_composite.png
                └── oak_log_sides_full.png

2. pack.mcmeta

{
  "pack": {
    "pack_format": 34,
    "description": "Custom Connected Textures for TsAssembly"
  }
}

3. Rule Tile JSON Specification

Place your rule definitions in assets/<namespace>/rule_tiles/<name>.json.

Example: glass.json (3x3 COMPOSITE Mode)

{
  "type": "COMPOSITE",
  "faces": ["all"],
  "texture": "tsassembly:block/glass_composite",
  "original_texture": "tsassembly:block/glass_original",
  "target_blocks": [
    "minecraft:glass",
    "minecraft:tinted_glass"
  ]
}

Example: oak_log.json (Direction-Specific FULL Mode)

{
  "type": "FULL",
  "faces": ["sides"],
  "texture": "tsassembly:block/oak_log_sides_full",
  "match_sprite": "minecraft:block/oak_log",
  "target_blocks": [
    "minecraft:oak_log"
  ]
}

Configuration Properties Reference

Property Type Default Description
type String "AUTO" "COMPOSITE" (3x3 overlay), "FULL" (6x6 47-tile), or "PANE_EDGE" (Glass pane edge removal).
faces Array ["all"] Target faces: "all", "sides", "top", "bottom", "north", "south", "east", "west".
texture String "" Path to the grid sheet texture (<namespace>:block/<texture_name>).
original_texture String "" Fallback texture used when a block is isolated or when an overlay is blank.
match_sprite String "" Exact sprite location on the target quad to match (prevents cross-face misapplication).
target_blocks Array [] List of block registry IDs that connect to each other.

Texture Dimensions & Sheet Layout

  • COMPOSITE (3x3 Sheet):

  • Aspect ratio must be 1:1 (e.g., 48x48, 96x96, 192x192).

  • Texture resolution must be divisible by 3.

  • Center tile (1, 1) is always rendered; border tiles (col, row) are layered on demand.

  • FULL (6x6 Sheet / 47-Tile):

  • Aspect ratio must be 1:1 (e.g., 96x96, 192x192, 384x384).

  • Texture resolution must be divisible by 6.

  • Maps all 47 standard CTM edge, corner, and intersection states into a single unified quad replacement.

Client Configuration (tsassembly-client.toml) The configuration file is located at .minecraft/config/tsassembly-client.toml:

[rendering]
    # Allow dual-sided rendering (FakeCull) for transparent blocks
    enable_fake_cull_blocks = true

    # Blocks or tags to receive automatic internal backface quads
    fake_cull_blocks = [
        "#c:glass_blocks"
    ]

    # Blocks or tags to apply perspective-correct U/V texture inversion on backfaces
    invert_backface_blocks = [
        "#c:glass_blocks"
    ]

    # Active 3D resource pack filenames to natively support without double-meshing
    compatible_3d_packs = [
        "3D Default 1.20+ v1.15.0.zip"
    ]

    # Granular resource pack model routing rules
    # 1. Exclusion: 'Pack.zip=BlockOrTag' (Strips 3D model, falls back to prior pack/vanilla)
    # 2. Whitelist: 'Pack.zip!=BlockOrTag' (Locks model to Pack.zip; forces vanilla if disabled)
    # 3. Vanilla:   '!=BlockOrTag' (Unconditionally forces vanilla 2D model)
    pack_block_exclusions = [
        "3D Default 1.20+ v1.15.0.zip=#c:glass_blocks"
    ]

    # Blocks switching UV mirror evaluation based on vertex-to-center offset
    relative_position_blocks = []

The TsAssembly Team

profile avatar
  • 1
    Followers
  • 9
    Projects
  • 3.7K
    Downloads

More from TerrySet_