Description
The crash: Your Minecraft 1.21.1 NeoForge server was crashing every time a player used Carry On to pick up an entity or block. The root cause was a NullPointerException inside StringTagVisitor.visitCompound(): Minecraft tried to sort the NBT keys of whatever was being carried, but one of those keys was null, causing Java's TimSort to explode.
The fix: We built a small standalone NeoForge mod called CarryOnFix that uses a Mixin to intercept the Collections.sort() call, strip any null entries from the list, and then let the sort proceed normally. Two lines of actual logic.
Mod features:
- Server-side only — clients don't need it installed, just drop the jar in the server's
mods/folder - No extra dependencies
- Compatible with NeoForge 21.1.228 / Minecraft 1.21.1
Bumps along the way:
IExtensionPointandNetworkRegistryno longer exist in NeoForge 21.1 and caused a compile error — we removed them entirely, sincedisplayTest = "IGNORE_ALL_VERSION"inneoforge.mods.tomlis all you need to declare a server-side-only mod in modern NeoForge.


