AntiNbtKick

AntiNbtKick

A mod that prevents your player from picking up items that exceed the NBT data limit and prevents being kicked in general.

by
382 Downloads
fabricoptimizationstorageutility
Rent Server with this Mod

About this Mod

AntiNbtKick

A Fabric mod that prevents players from getting kicked due to oversized NBT data in their inventory. This mod intelligently monitors and restricts inventory size to keep you safe from server kicks while still allowing you to manage your items effectively.

Features

🛡️ Inventory Size Protection

  • Smart Size Checking: Accurately calculates the byte size of items using Minecraft's CODEC-based encoding
  • Maximum Limit: Enforces a 1,777,777 byte limit for total inventory data (includes all slots and metadata overhead)
  • Metadata Accounting: Each slot accounts for 128 bytes of overhead for proper size tracking

📦 Comprehensive Inventory Monitoring

The mod tracks and checks:

  • Main inventory slots (36 slots)
  • Hotbar (9 slots)
  • Offhand slot
  • Armor slots (4 slots)
  • All NBT data and item attributes

🚫 Multi-Mode Protection

Ground Item Pickup:

  • Prevents picking up items that would exceed inventory limit
  • Silently blocks oversized items from being collected

Container Interactions (Survival & Creative):

  • Shift-Click: Blocks moving items FROM containers INTO your inventory if it would exceed the limit
  • Single Click: Prevents placing items into your inventory that are too large
  • Drag Operations: Blocks dragging items into your inventory when it would exceed the limit
  • Container Depositing: Allows you to freely move items FROM your inventory INTO containers, even when over the limit

Creative Mode Protection:

  • Blocks creative mode item placement if it would exceed the limit
  • Prevents creative mode dragging/painting that would overflow your inventory
  • Blocks creative mode cloning (middle-click) of oversized items

🎮 Easy Toggle Commands

Control the mod with simple chat commands:

Command Description
/apk Show current mod status
/apk toggle Toggle mod on/off
/apk on Enable the mod
/apk off Disable the mod
/apk status Display detailed status

Status messages use color coding:

  • 🟢 GREEN: Mod is enabled
  • 🔴 RED: Mod is disabled

How It Works

Size Calculation

The mod uses Minecraft's native ItemStack.CODEC to accurately encode items into NBT format and measures their serialized size in bytes. This matches how the server calculates inventory data size, ensuring consistency.

Smart Blocking

The mod intelligently:

  1. Allows picking up items from the ground (unless already at limit)
  2. Allows depositing items into containers (cleaning your inventory)
  3. Allows moving items within your own inventory
  4. Blocks adding new items that would exceed the limit
  5. Blocks dragging items into your inventory from containers
  6. Blocks creative mode placement of oversized items

Configuration

  • Default State: Enabled on startup
  • Togglable: Use /apk toggle to enable/disable on-the-fly
  • No Config Files: Works out of the box with sensible defaults

Installation

  1. Download the mod JAR file
  2. Place it in your .minecraft/mods folder
  3. Launch Minecraft with Fabric Loader
  4. The mod will be active by default

Requirements

  • Minecraft: 1.21.4 or later
  • Fabric Loader: 0.16.4 or later
  • Java: 21 or later
  • Fabric API: Any version compatible with your Minecraft version

Troubleshooting

Q: I can't place items in my inventory
A: Your inventory is likely at or near the 1,777,777 byte limit. Use /apk off to disable the mod, or deposit items into a container.

Q: Can I drag items into containers?
A: Yes! You can always move items FROM your inventory INTO containers, even when over the limit. This is the intended way to clean up.

Q: Does this affect multiplayer?
A: Yes, the mod protects you on any server. It prevents you from reaching the server-side NBT size limits that would cause kicks.

Q: Can I disable the mod?
A: Yes! Use /apk off to disable all protections. Use /apk on to re-enable.

Credits

  • Original Author: UnicornMaster-Dev
  • Minecraft Version: 1.21.4

Stay safe from NBT kicks!

Available Versions

AntiNbtKick 1.1release
MC 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11fabric
June 11, 2026
AntiNbtKick 1.0release
MC 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10fabric
March 18, 2026

How to Install AntiNbtKick on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.11).

3

Install Mod

Open the mod browser in the dashboard and search for "AntiNbtKick". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

1.21.11, 1.21.10, 1.21.9 (+11 more)

Server-side

Unsupported

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

AntiNbtKick server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.11). You can switch loaders with one click in the panel.

Is AntiNbtKick compatible with fabric?

AntiNbtKick officially supports fabric for Minecraft 1.21.11, 1.21.10, 1.21.9. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with AntiNbtKick – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if AntiNbtKick consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install AntiNbtKick with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
LicenseRef-All-Rights-Reserved
Server-side
Unsupported

Supported Versions

1.21.111.21.101.21.91.21.81.21.71.21.61.21.51.21.41.21.31.21.2+4 more