ModsFinder

EfficientHashing

by ZZZank

Hash lookups for block positions in the game get fewer collisions with EfficientHashing, which swaps the hashing algorithm of Vec3i and BlockPos.

FabricForgeNeoForgeClient and serverGNU Lesser General Public License v3.0 onlyOpen source1.18 – 26.1.2

What it does

EfficientHashing changes how Vec3i and its subclass BlockPos compute their hash codes. The replacement algorithm, called PhiMix, gives nearly every distinct position its own code, where the vanilla algorithm assigns many positions the same value. The mod's author describes the change as affecting wherever the hash code is used, so any feature that stores positions in hash-based collections is touched by it.

In a test covering every block position from -100, -20, -100 to 100, 50, 100, about 2,800,000 objects, the vanilla algorithm produced 194,571 distinct hash codes, while PhiMix produced 2,868,471. The author reports PhiMix running at about 95.3 percent of the vanilla speed, a gap described as small next to other hashing solutions. The default position 0, 0, 0 still hashes to 0 under PhiMix, which keeps behavior compatible with vanilla.

Every player and the server need a copy of the mod. It is published for Fabric, Forge and NeoForge, with files for game versions 1.18 – 26.1.2 across 13 release versions. The mod is licensed under the GNU Lesser General Public License v3.0 only, and it is open source, with the source code publicly available.

Key features

  1. PhiMix hashing algorithm

    Vec3i and BlockPos hash codes come from the PhiMix algorithm instead of the vanilla formula.

  2. Fewer hash collisions

    Distinct block positions receive distinct codes in the author's test, where vanilla produced far fewer unique values.

  3. Default position hash

    The position 0, 0, 0 still hashes to 0, the same value as the vanilla default integer.

Compatibility

Latest build for each game version and loader.

26.x1 of 1 version with builds
26.1.21.0.2Not available1.0.2
1.21.x2 of 2 versions with builds
1.21.11.0.2Not available1.0.2
1.211.0.2Not available1.0.2
1.20.x2 of 2 versions with builds
1.20.11.0.21.0.2Not available
1.201.0.21.0.2Not available
1.19.x5 of 5 versions with builds
1.19.41.0.0Not availableNot available
1.19.31.0.0Not availableNot available
1.19.21.0.21.0.2Not available
1.19.11.0.21.0.2Not available
1.191.0.21.0.2Not available
1.18.x3 of 3 versions with builds
1.18.21.0.21.0.2Not available
1.18.11.0.21.0.2Not available
1.181.0.21.0.2Not available
ReleaseBetaAlphaNot available

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

Use cases

Servers with heavy block-position lookups

Server owners whose worlds store many positions in hash-based structures can test the mod on their load.

Who it’s for: Server owners and modpack authors who want a hashing change in Vec3i and BlockPos, and players who run the mod on a client that uses the same hashing.

Questions

Does EfficientHashing need to be installed on the server?

Yes. Every player and the server need a copy of the mod.

Which loaders does EfficientHashing support?

It is published for Fabric, Forge and NeoForge. The latest Fabric file is 1.0.2 for 26.1.2, the latest Forge file is 1.0.2 for 1.20.1, and the latest NeoForge file is 1.0.2 for 26.1.2.

Does the hashing change affect vanilla behavior?

The author notes that the default position 0, 0, 0 still hashes to 0, the same value as the vanilla default integer.

In the catalog

EfficientHashing 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 ZZZank

All projects

Similar mods

What the author says

EfficientHashing replaced hashing algorithm of Vec3i (and its subclasses like BlockPos) with one that's much much more collision resistant, providing performance improvement in basically wherever its hashcode is used. We can prove this by doing a simple test. Test is perform by hashing every combination of BlockPos…
ZZZank, on the Modrinth page

Official listing

Owner
ZZZank
Published
2025-11-28
Updated on Modrinth
2026-10-08
Facts verified
2026-10-15

Tags