promotional banner

MegaStacks

Raise the maximum stack size of every stackable item to anything you want, up to 1,000,000.
Screenshot 2026-08-08 200631.png

Screenshot 2026-08-08 200631.png

Description

Mega Stacks

Raise the maximum stack size of every stackable item to anything you want, up to 1,000,000.

Works on modded items automatically. The mod raises the limit on the Item class itself — the same path vanilla and every mod already go through — so it does not need to know anything about the mods you have installed, and ships no compatibility patches for individual mods.

Requirements

  • Minecraft 1.20.1
  • Fabric Loader 0.14 or newer
  • Java 17

Fabric API is not required. The mod has no dependencies at all.

Install it on both the client and the server. Vanilla stores an item count in a single byte (max 127), and this mod widens that in both save files and network packets. A client without the mod cannot display or send large stacks correctly.

Features

  • Any stack size up to 1,000,000, set globally or per item.
  • Wildcard rules — give every item from one mod its own limit with a single line.
  • In-game commands — change limits without restarting; changes save to disk and sync to players.
  • Server authority — the server pushes its limits to joining clients, so both sides always agree.
  • Readable slots — counts are shortened to 1.2k / 340k / 1.0M over the item, with the exact number in the tooltip.
  • Built-in self test/megastacks selftest verifies every patch in a live game, so you can confirm the mod still works after dropping it into a large pack.

Configuration

config/megastacks.json is created on first launch.

Option Default Description
defaultMaxStackSize 1000000 Limit for every stackable item (1–1,000,000)
applyToSmallStacks true Also raise items with vanilla limits of less than 64 (ender pearls, snowballs, eggs, signs)
abbreviateCountInGui true Draw 1.0M instead of an unreadable 1000000 over the slot
showExactCountInTooltip true Add an exact, grouped count line to the tooltip
overrides {} Per-item limits

Per-item overrides

"overrides": {
  "minecraft:ender_pearl": 4096,
  "create:*": 100000,
  "*:*_bucket": 64
}

Commands

status, held, and overrides are open to everyone. The rest need permission level 2.

  • /megastacks status — current limit and how many overrides are active
  • /megastacks held — the limit of the item you are holding, plus its vanilla limit
  • /megastacks default <1-1000000> — set the global limit
  • /megastacks set <item> <size> — set a limit for one item
  • /megastacks clear <item> — remove an override
  • /megastacks overrides — list overrides
  • /megastacks reload — reload the config file
  • /megastacks selftest — verify the mod is working

What the mod changes

  • Stack limit — written straight into Item.maxCount, so any mod calling getMaxCount() sees the new value with no overhead. Items that override getMaxCount() themselves are handled separately.
  • Save files — the Count tag becomes an int only when a stack holds more than 127 items. Normal stacks are written byte for byte the same as vanilla.
  • Networking — the vanilla count byte stays exactly where it is; the overflow rides along in the NBT that is already being sent, and is stripped the moment the stack is read. Packets for stacks of 127 or fewer items are byte for byte identical to vanilla.
  • Inventories and slots — the hardcoded cap of 64 is lifted. Slots that deliberately ask for something else (a lectern holding one book) are left alone.
  • Creative mode — the server-side limit of 64 items per creative slot edit is lifted.
  • /item replace — its count argument is no longer capped at 64.
  • Dropped items — a large stack drops as one entity instead of being split into tens of thousands of them, which would stall the server.
  • Items merging on the ground — uses the item's own limit instead of a hardcoded 64.
  • Bundles — keep their vanilla capacity of 64. Without this, vanilla divides by zero and crashes.

Known limitations

  • Items that do not stack in vanilla — tools, armour, potions — stay at 1. Stacking things that carry durability and enchantments breaks more than it fixes.
  • If you remove the mod, stacks larger than 127 in existing worlds will be corrupted. Normal stacks are unaffected.
  • A mod that computes slot capacity in its own code, bypassing Inventory and Slot, will keep its own limit of 64.

License

All Rights Reserved

The MegaStacks Team

profile avatar
  • 4
    Projects
  • 1.3K
    Downloads
Donate

More from Yami_Mosimoto