Too Many Tinker

A client-side rendering optimization mod for Tinkers' Construct

Too Many Tinkers

Too Many Tinkers is a client-side rendering optimization mod for Tinkers' Construct on Minecraft 1.12.2 (Cleanroom), designed for large modpacks with massive numbers of Tinkers' materials and addons (such as GreedyCraft2).

While preserving the appearance and functional contracts of native Tinkers' Construct tools, parts, and addon models, it replaces eager pre-generation and main-atlas stitching of all material textures and part models during resource loading with on-demand generation, 2D texture paging, and bounded LRU caches—dramatically reducing main atlas pressure, memory/VRAM usage, and reload hitches.

In the GreedyCraft2 modpack (818 Tinkers' materials), memory consumed by pre-baked Tinkers' material textures drops from up to 2 GB to < 0.05 MB, significantly lowering overall modpack memory requirements without sacrificing in-game tool rendering performance.


Requirements

  • Minecraft Version: 1.12.2
  • Mod Loader: Cleanroom Loader (required; standard Forge is not supported)
  • Java Version: Java 25 only

Addon Compatibility

Mods that register materials and parts through standard Tinkers' Construct APIs (such as MoreTcon) are handled directly by Too Many Tinkers' rendering pipeline.

Mods with custom rendering pipelines are supported on demand via conditional Mixins:

  • Construct's Armory: Provides a bounded cache (16 MiB / 256 entries) for dynamically composed armor textures and reuses ResourceLocation slots, preventing unbounded path-cache and texture growth when rendering worn armor.
  • Tinkers' Things 2: Preserves exact-match constraints when looking up Scout armor textures so base-layer tinting and mask pipelines work properly.
  • Tinkers' Evolution: Keeps native main-atlas registration and UVs for materials that sample directly from the main atlas (such as CosmicMaterialRenderInfo), and hooks delegate model cache cleanup into lifecycle events.
  • Had Enough Items / JEI: Automatically detects item models containing TMT-managed textures and falls back to standard item rendering, bypassing HEI's batch renderer limitations.

Core Optimization Mechanisms

  • On-Demand Texture Generation & 2D Texture Pages (NativeMaterialTextures)
    • Intercepts CustomTextureCreator from pre-building every part × material sprite into the main atlas, generating textures only when requested for rendering or model baking.
    • Dynamically packs generated sprites into 1024 × 1024 2D texture pages with pixel-content-hash deduplication (PixelContentKey).
    • Enforces bounded memory and VRAM budgets: 64 MiB for GPU texture pages, 16 MiB for prepared texture caches, and 32 MiB for animation frame buffers—evicting least-recently-used entries when full and re-uploading on demand.
  • Main Atlas Contract Preservation (NativeAtlasMaterial)
    • Special materials requiring direct main-atlas sampling (such as Cosmic materials) continue to be registered on the vanilla main TextureMap so shader effects render properly.
  • On-Demand Part Model Baking (TmtLazyMaterialModel)
    • Preserves the BakedMaterialModel contract while replacing eager per-material baking with lazy single-material baking, backed by a bounded WeightedLruCache (up to 4,096 entries / 16 MiB estimated weight).
  • Table Item Placement Cache (TableItemModels)
    • Caches spatially transformed baked models for TableItem entries on Tinkers' tables (up to 256 entries / 4 MiB), avoiding per-frame TRSRBakedModel matrix transformations.
  • Resource & World Lifecycle Cleanup (RenderLifecycle)
    • Automatically clears model caches and releases TMT-owned GPU textures on resource reload (TextureStitchEvent.Pre) and client world unload (WorldEvent.Unload).

Diagnostic Commands

Too Many Tinkers includes a client-side /tmt command (permission level 0) for inspecting cache status and troubleshooting rendering or performance issues:

Command Description
/tmt stats Prints real-time statistics for material textures, models, quads, masks, table items, and armor caches to chat and the log.
/tmt dump Exports a diagnostic snapshot JSON to <gameDir>/tmt-diagnostics/<timestamp>.json, including heap memory info, cache stats, resource packs, material and tool/part registries, active mods, and held item details.
/tmt profile start Starts recording client RenderTick frame interval samples (retaining up to the most recent 18,000 frames).
/tmt profile stop Stops profiling and automatically writes a diagnostic JSON report containing frame interval statistics.

Too Many Tinker Team

profile avatar
  • 1
    Followers
  • 17
    Projects
  • 77.8K
    Downloads

More from Shiver211View all