-
Notifications
You must be signed in to change notification settings - Fork 0
Consumer Mods Integration Guide
Dasik (Rifaditya) edited this page Aug 9, 2026
·
1 revision
This guide details how third-party mod developers and collection addons can integrate with Stack Size Adjuster to define specialized stack limits or inspect active categories.
Add stack-size-adjuster to your mod's depends or suggests block:
"depends": {
"stack-size-adjuster": ">=1.4.16+26.2"
}In your mod's ModInitializer, call StackSizeManager.registerOverride:
package com.example.addon;
import net.fabricmc.api.ModInitializer;
import net.instantgratification.stacksizeadjuster.util.StackSizeManager;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.SplashPotionItem;
public class ExampleAddonMod implements ModInitializer {
@Override
public void onInitialize() {
// Register custom stack size rules for splash potions
StackSizeManager.registerOverride((item, originalSize) -> {
if (item instanceof SplashPotionItem) {
return 8; // Custom limit of 8 for splash potions
}
if (item == Items.TOTEM_OF_UNDYING) {
return 16; // Allow totems to stack up to 16
}
return originalSize; // Unmodified items retain category GameRule limits
});
}
}To query the currently active limit for a specific item programmatically:
import net.instantgratification.stacksizeadjuster.util.StackSizeManager;
import net.minecraft.world.item.ItemStack;
public class StackQueryUtil {
public static int getEffectiveLimit(ItemStack stack) {
int original = stack.getMaxStackSize();
return StackSizeManager.getModifiedStackSize(stack.getItem(), original);
}
}๐ 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