-
Notifications
You must be signed in to change notification settings - Fork 0
Category Based Stack Limits
Dasik (Rifaditya) edited this page Aug 9, 2026
·
1 revision
Minecraft naturally categorizes items into three primary stack tiers via DataComponents.MAX_STACK_SIZE:
- 64-Stackable: Building blocks, resources, common items (e.g. Cobblestone, Dirt, Iron Ingot).
- 16-Stackable: Ender pearls, snowballs, buckets, eggs, signboards.
- 1-Stackable (Unstackable): Tools, weapons, armor, potions, saddles, minecarts.
+--------------------------------+
| Item Stack Size Calculation |
+--------------------------------+
|
v
[ Check Registered Overrides ]
(e.g., Potion Stacker Addon)
|
+----------------+----------------+
| |
Override Found? No Override
| |
v v
Return Custom Limit Inspect Natural Default
(DataComponents)
|
+-----------------------------+-----------------------------+
| | |
Natural >= 64 Natural >= 16 Natural == 1
| | |
v v v
Return `items_64_limit` Return `items_16_limit` Return `items_1_limit`
Stack size calculation is handled by StackSizeManager.getModifiedStackSize:
public static int getModifiedStackSize(Item item, int original) {
if (original <= 0) {
return original;
}
// Apply registered overrides from addons (e.g. Potion Stacker)
int size = original;
for (BiFunction<Item, Integer, Integer> override : OVERRIDES) {
size = override.apply(item, size);
}
if (size != original) {
return size;
}
if (original >= 64) {
return limit64;
} else if (original >= 16) {
return limit16;
} else if (original == 1) {
return limit1;
}
return original;
}| Target Category | Default | Recommended Max | Performance Profile |
|---|---|---|---|
| 64-Stackable | 128 |
High efficiency. Multi-million limits supported smoothly. | |
| 16-Stackable | 32 |
Smooth scaling for pearls and eggs. | |
| 1-Stackable | 1 |
Allows tools/potions to stack. Enchants & damage merge safely. |
๐ Repository Source Disclaimer: The documentation in this Wiki reflects the current source code state in the repository, which may include recent unreleased commits or developmental features ahead of public release builds on CurseForge and Modrinth.
Copyright ยฉ 2026 Dasik (Rifaditya). Licensed under the GNU General Public License v3.0 (GPLv3).
๐ Home
- Dynamic GameRules
- Category Stack Limits
- Container Drop Optim.
- Large Chest Overflow
- ModMenu & YACL Config
- Item Count Rendering
- Item Clumps Synergies
- Troubleshooting & FAQ
- Developer Setup
- Architecture Layout
- Mixin Reference
- Addon Override API
- Network Sync Protocol
- Give Command Handling
- Behavior Profiles
- Consumer Mods Guide
- Performance Impact
- Advancements Matrix
- Author: Dasik (Rifaditya)
- License: GPL-3.0-or-later