A server-side companion fix for the Nature's Spirit redwood crash.
Nature's Spirit 2.3.x can crash the server during world generation. Its redwood branch
decorator reads the first entry of the tree's leaf list without checking that the list has
any entries. When a redwood's trunk places but every foliage position is obstructed, the
leaf list is empty, the decorator throws IndexOutOfBoundsException, and the crash surfaces
as ReportedException: Feature placement — the server goes down. Vanilla accepts these
trees (a tree is valid when either its log or leaf list is non-empty), so the crash needs
no broken setup: it happens wherever trunk-only redwoods generate, and mods that reuse
redwoods as a biome's default tree (such as Infinite Dimensions) make it happen at scale.
What this fix does
- Skips only the branch-decoration step for a tree that has no leaf positions.
- The trunk and any foliage that did place are untouched.
- Redwoods with normal foliage keep their branches, at the normal probability — tree shape, biomes, blocks, and generation are unchanged.
- Nothing else is patched: no other decorator, feature, or vanilla class.
Good to know
- This is a companion mod for Nature's Spirit — it is not a replacement and contains none of Nature's Spirit's code. The original mod is required.
- If Nature's Spirit is missing or is not a 2.3.x build, the guard stays completely inert and logs one warning — it will never crash a server over a version mismatch.
- No published Nature's Spirit release fixes this crash yet (2.3.2 is the current release). If upstream ships a fix, remove this mod.
- Chunks that failed to generate because of this crash will generate normally on next load once the guard is installed.
Requirements
- Minecraft 1.21.1
- NeoForge 21.1.267 or newer
- Nature's Spirit 2.3.x (built and verified against 2.3.2)
- Java 21
Installation
Server-side only. Put the jar in the server's mods folder alongside Nature's Spirit.
Clients joining the server do not need it.
Credits
Fix by Vonix Network. Nature's Spirit is by Team Hibiscus: https://www.curseforge.com/minecraft/mc-mods/natures-spirit
Licensed LGPL-3.0-or-later.