Nature Wover Order Pin (source code) v1.0.0
The full source of Nature Wover Order Pin 1.0.0, a small mixin you can read in a few minutes.
This is the code behind the Nature Wover Order Pin jar on this page.
The bug: WoverBiomePicker.rebuild() in WorldWeaver 21.0.25 walks a HashSet of biomes. Their hash comes from a Minecraft ResourceKey, which uses the Java identity hash, so the order changes on every start. Sub-biome lists come from a HashMap with the same problem.
The fix is one mixin class. It walks the biomes sorted by id, and sorts each sub-biome list the same way before the pick tree is built.
Build outputs and caches are left out. The WorldWeaver jar it compiles against is not included; README.md says where to put your own copy. Two comment lines were edited to take out a private server name.
License: the mod metadata says MIT. Source provided as-is, use freely. It contains no WorldWeaver code. WorldWeaver itself is MIT licensed.
a1a289e3ad3dd1981d627a10e49fdc183a446bb7ddc04d4ad0ffd2bf5bf3d503
Check it: run certutil -hashfile nature_wover_order_pin-1.0.0-source.zip SHA256 on Windows or shasum -a 256 nature_wover_order_pin-1.0.0-source.zip on Mac and Linux. Every letter and number should match the code above.
Install
- Unzip it anywhere.
- Read README.md first. It explains the bug, the fix and how we tested it.
- Put worldweaver-21.0.25.jar in the libs folder, then run ./gradlew build. The jar lands in build/libs/.
Test it: Your own build should log the same pinned line at server start. Its SHA-256 may differ from the jar on this page.
Undo
Delete the unzipped folder.
Needs
- To build it: JDK 21, an internet connection the first time, and the NeoForge build of WorldWeaver 21.0.25 in libs/
- Nothing extra to read it
Tested
This is the same source that built the jar on this page. We have not rebuilt it from this zip.