NaN
NaN is an experimental Fabric mod for Minecraft 1.20.1 that overwrites the core math functions in MathHelper, so the world's arithmetic stops behaving as expected.
What it does
The mod uses a minimal Mixin to replace seven methods in net.minecraft.util.math.MathHelper with overwrite annotations. Operations that normally return numbers are changed to produce NaN, a value that stands for a number-like result that cannot be defined. Because the change reaches the math used across the game, a world created with the mod has its calculations broken from the start.
Creating a new world takes at least five minutes, and the loading progress bar jumps erratically between 3% and 100% while it runs. The author warns against trusting that bar. Installation requires Fabric Loader 0.15.0 or newer and Fabric API, and the mod runs on the client alone, so servers do not need it. Files are published for 1.20.1 under the MIT License, and the source code and issue tracker are public.
Key features
MathHelper overwrites
Seven methods in MathHelper are replaced through Mixin, changing the math the game depends on.
NaN results
Mathematical operations return NaN, a result that cannot be defined, instead of a usable number.
Broken world generation
Terrain and world creation run on the altered math, and world creation can take several minutes.
Command-free setup
The mod is placed in the mods folder and the game is launched with a new world, with no commands to run.
Gallery
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Requirements
Dependencies declared by the latest file for each loader.
Required 1
Use cases
Experimental worlds
Players who want to see Minecraft's math collapse can create a fresh world with the mod for a deliberately chaotic test.
Mod development reference
Developers studying Mixin overwrite annotations can read a short example of replacing vanilla methods in MathHelper.
Who it’s for: The mod suits players looking for chaos in a single-player world and developers interested in how Mixin overwrites vanilla methods. It is not meant for regular survival play, because the altered math affects the whole world.
Questions
Does NaN need Fabric API?
Do servers need to install NaN?
Can an existing world be used with NaN?
More from xiaofanforfabric
What the author says
NaN is an experimental Fabric mod that overwrites core mathematical functions in MathHelper using minimal Mixin code, twisting Minecraft's world into an indescribable Cthulhu dimension. NaN 是一个实验性 Fabric 模组,用极少的 Mixin 代码覆盖 MathHelper 中的核心数学函数,将 Minecraft 的世界扭曲成一个不可名状的克苏鲁维度。
Official listing
- Modrinth page
- modrinth.com/mod/nan
- Owner
- xiaofanforfabric
- Published
- 2026-04-28
- Updated on Modrinth
- 2026-04-28
- Facts verified
- 2026-10-15