Community listing page, reviews may not be monitored by the author.
Thirst Was Taken : Mixin Server Fix
No reviews yet
Universal NBT ItemStack null safety patch. Fixes EncoderException crashes during server-client sync in any mod. Uses Mixins to prevent null references without modifying source code. Initial developed for TWT (Thirst Was Taken)
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
Thirst Was Taken: Server Fix
🔧 What is this mod?
A critical patch mod that fixes NBT tag synchronization crashes affecting ItemStack serialization during server-client communication. Originally discovered and solved for Thirst Was Taken and Thirst-No-More mods, this fix is universally applicable to any mod suffering from null ItemStack crashes during Netty packet encoding.
🐛 The Problem
Several mods (particularly water/drinking container mods) use ItemStack.getOrCreateTag() patterns that can inadvertently create NBT tags containing null ItemStack references. When these items are synced from server to client, the Netty encoder attempts to serialize null ItemStack objects, resulting in:
EncoderException: Cannot invoke net.minecraft.world.item.ItemStack.m_41619_()
because p_130056_ is null
This crash prevents players from joining the server entirely.
✅ The Solution
This mod uses Forge Mixins to inject protective patches at the network layer without modifying the original mods:
- FriendlyByteBufItemStackMixin: Intercepts all ItemStack writes to network packets and safely replaces null ItemStack references with
ItemStack.EMPTY, maintaining packet protocol integrity - ItemStackNullSafetyMixin: Protects critical ItemStack serialization methods (
save(),getMaxStackSize(),isEmpty(),getItem())
🎯 Why This Mod?
- No source modification needed - Mixins patch at runtime
- Universal solution - Works with any mod that has null ItemStack issues
- Safe - Replaces nulls with valid empty stacks, maintaining server stability
- Transparent - Zero configuration needed, works immediately on install
📋 Compatibility
- Minecraft: Actually only in 1.20.1
- Works with: Thirst Was Taken, Thirst-No-More, and any mod with ItemStack NBT sync issues
🔍 Origin
This fix was developed to solve critical join crashes in servers using Thirst Was Taken and Thirst-No-More mods. The underlying issue (null ItemStack in NBT serialization) can occur in any mod, so this solution is provided as a universal patch.
Issues? Report them along with your latest.log if you encounter any problems.
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
(opens in a new tab)
Get it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources