ModsFinder

Tetrachord Lib

by Viola-Siemens

Tetrachord Lib is a library mod that supplies data structures such as KD trees and segment trees, along with a few other utility functions.

FabricForgeNeoForgeClient or server, optionalGNU Lesser General Public License v2.1 or laterOpen source1.16 – 26.1.2

What it does

Other mods that handle spatial lookups or range queries in a Minecraft world can call the structures this library provides, instead of scanning every element by hand. A KD tree stores k-dimensional points and answers nearest-neighbor and range queries. A segment tree splits a range into smaller subsections arranged hierarchically, so range updates and queries stay quick. The author states that brute-force methods often prove inefficient for these jobs, and that the structures are meant to improve performance during world generation.

The library sits in the Optimization category and is classed as a Library. Either side can run it, and neither needs it, so it can be used on a client, a server, both, or left out entirely. Files exist for Fabric, Forge and NeoForge across 38 release versions, 1.16 – 26.1.2, and the code is released under the GNU Lesser General Public License v2.1 or later, which makes it open source. The author used the Spark profiler to measure milliseconds per tick (mspt) when testing the optimization, with benchmarks run on a campfire-lighting scenario.

Key features

  1. KD tree structure

    Provides a KD tree that stores points in k-dimensional space, supporting nearest-neighbor and range searches.

  2. Segment tree structure

    Provides a segment tree that handles range updates and range queries, with subsections organized hierarchically.

  3. Lookup-focused design

    Aims to replace brute-force scans in world-related code, which the author describes as frequently inefficient.

  4. Benchmarked with Spark

    Performance was measured in milliseconds per tick using the Spark profiler, including a campfire-lighting test.

Compatibility

Latest build for each game version and loader.

26.x3 of 3 versions with builds
26.1.2Not availableNot available26.1+1.0.3
26.1.1Not availableNot available26.1+1.0.3
26.1Not availableNot available26.1+1.0.3
1.21.x12 of 12 versions with builds
1.21.111.21+1.0.3Not available1.21+1.0.3
1.21.101.21+1.0.3Not available1.21+1.0.3
1.21.91.21+1.0.3Not available1.21+1.0.3
1.21.81.21+1.0.3Not available1.21+1.0.3
1.21.71.21+1.0.3Not available1.21+1.0.3
1.21.61.21+1.0.3Not available1.21+1.0.3
1.21.51.21+1.0.3Not available1.21+1.0.3
1.21.41.21+1.0.3Not available1.21+1.0.3
1.21.31.21+1.0.3Not available1.21+1.0.3
1.21.21.21+1.0.3Not available1.21+1.0.3
1.21.11.21+1.0.3Not available1.21+1.0.3
1.211.21+1.0.3Not available1.21+1.0.3
1.20.x7 of 7 versions with builds
1.19.x5 of 5 versions with builds
1.18.x3 of 3 versions with builds
1.17.x2 of 2 versions with builds
1.16.x6 of 6 versions with builds
ReleaseBetaAlphaNot available

Only full game releases are shown. This mod publishes no snapshot builds.

Questions

Does Tetrachord Lib need to be installed on the server?

No. Either side can run it, and neither needs it, so the library works on a client, a server, both, or neither.

Which loaders does Tetrachord Lib support?

Fabric, Forge and NeoForge. The latest Fabric file is 1.21+1.0.3 for 1.21.11, the latest Forge file is 1.20.6+1.0.3 for 1.20.6, and the latest NeoForge file is 26.1+1.0.3 for 26.1.2.

Which game versions have files?

Files cover 38 release versions 1.16 – 26.1.2, including 1.21.11 and 26.1.2.

In the catalog

Tetrachord Lib is one of 3,545 Optimization mods on ModsFinder, and one of 2,575 Optimization mods for Fabric. 15,189 mods support Minecraft 26.1.2.

More from Viola-Siemens

All projects

Similar mods

What the author says

Numerous Minecraft mods have integrated functional features within both 2D and 3D environments1[3], yet brute-force methods frequently prove inefficient. In this regard, we introduce Tetrachord Lib, a lightweight library modification designed to optimize diverse data structures. jellysquid3_[4] introduced Lithium, a…
Viola-Siemens, on the Modrinth page

Official listing

Owner
Viola-Siemens
Published
2024-02-27
Updated on Modrinth
2026-06-02
Facts verified
2026-10-15

Tags