Stack Manager
可配置的堆叠数量(原版 + 模组)
一个轻量级的服务端模组,会生成包含所有物品(原版 + 模组物品)的配置,并允许你为每个物品设置最大堆叠数。适用于单人游戏(集成服务器)和专用服务器。
功能
- 生成
config/stackmanager_items.json,包含所有已注册的物品。 - 支持随时编辑的按物品设定的堆叠上限。
- 启动或重载时自动添加新安装模组中的新物品。
- 安全的网络上限设为 99,以避免协议/NBT 问题。
- 可选的游戏内命令(在存在 Fabric API 时启用)。
命令
(可选,需要 Fabric API) /stackmanager reload — 重新加载配置并追加缺失的物品。
/stackmanager set <id> <value> — 设置新的上限(限制在 99 以内)。
/stackmanager set <id> default — 恢复游戏/模组的默认值(限制在 99 以内)。
如果没有 Fabric API,模组仍然可以正常工作;请编辑文件并重启(或使用你偏好的方法进行重载)。
配置文件
路径:config/stackmanager_items.json
{
"formatVersion": 1,
"items": {
"minecraft:acacia_button": 64,
"minecraft:oak_planks": 99
}
}
- 键为完整的物品 ID(namespace:item)。
- 值在加载时被限制在 1–99 之间。
实用的编辑器快捷键
(VS Code / 大多数编辑器;Windows/Linux = Ctrl,macOS = Cmd,除非另有说明)
格式化文档:
Shift+Alt+F (Win/Linux) · Shift+Option+F (macOS)
- 查找 / 替换: Ctrl+F / Ctrl+H · Cmd+F / Cmd+Alt+F
- 选中下一个出现项(多光标): Ctrl+D · Cmd+D
- 跳转到指定行: Ctrl+G · Cmd+G
- 选中单词 / 整行: Ctrl+W(单词)/ Ctrl+L(整行)· Option+Shift+→/← 或 Cmd+L (macOS)
提示
- 保持 ID 按字母顺序排列,以便更轻松地查看差异。
- 在 Ctrl+H 中使用正则表达式替换来批量编辑数值。
- 编辑完成后,运行
/stackmanager reload(如果命令可用)或重启世界/服务器以应用更改。
兼容性与限制
- 模组在服务端强制执行限制;客户端无需安装该模组(除非其他模组依赖它)。
- 具有不同 NBT 数据(自定义名称、附魔、耐久度等)的物品永远不会堆叠,这是原版规则。
- 大多数原版和模组 GUI 都尊重这些限制。如果特定模组的界面仍然限制为 64/99,请报告此问题——针对单个界面的补丁是可行的。
- 超过 99 的值会被有意降低至 99,以保持网络稳定性。
要求
Fabric API:可选但推荐,以获得更好的体验(启用 /stackmanager 命令和更流畅的重载)。
推荐用法
- 安装 Fabric API(推荐,非必需)以使用游戏内命令并提升便利性。
- 在启动世界/服务器之前直接在配置文件中编辑数值。基于命令的更改——尤其是没有 Fabric API 时——可能比较繁琐,并且可能需要重启或额外步骤。
模组使用思路
- 药水: 更轻松:将药水的堆叠数设为每槽 16 或 32
"minecraft:potion": 16,
"minecraft:splash_potion": 16,
"minecraft:lingering_potion": 8–16
好处:在突袭、挖矿和 Boss 战中减少背包整理的次数。
注意:药水携带 NBT 数据(效果类型)。只有完全相同的药水才能堆叠。
其他快速建议
- 建造 / 大型项目(便利性):
- 方块(石头、木板、玻璃、陶瓦)99;食物 64–99;烟花火箭 64–99。
- 探索 / 鞘翅: 火箭 16(更难)或 64–99(更容易);末影珍珠 16–32(更容易)或 8(更难)。
- 战斗 / PvE: 箭矢 99;雪球/鸡蛋 64–99,用于活动/小游戏。
- 经济 / 生存挑战: 矿石/锭 16;矿石方块 8;珍珠/雪球 8,以防止刷屏式堆积。
常见问题
- 如何找到物品 ID?
启用高级工具提示(F3 + H),然后悬停在物品上:你会看到 namespace:item。
- 我可以设置为 9999 吗?
不可以。为了网络安全,有效上限为 99。
- 单人游戏还是服务器?
两者均可。在单人游戏中,将模组放入 mods/ 文件夹。在专用服务器上,仅需服务器端安装该模组。
Stack Manager
Configurable stack sizes (vanilla + mods)
A lightweight server-side mod that generates a config with all items (vanilla + modded) and lets you set the max stack size per item. Works in singleplayer (integrated server) and on dedicated servers.
Features
- Generates config/stackmanager_items.json with every registered item.
- Per-item stack limits you can edit at any time.
- Auto-adds new items from newly installed mods on startup/reload.
- Safe network cap = 99 to avoid protocol/NBT issues.
- Optional in-game commands (enabled when Fabric API is present).
Commands
(optional, require Fabric API) /stackmanager reload — reload the config and append any missing items.
/stackmanager set <id> <value> — set a new limit (clamped to 99).
/stackmanager set <id> default — restore the game/mod default (clamped to 99).
Without Fabric API the mod still works; edit the file and restart (or reload using your preferred method).
Config file
Path: config/stackmanager_items.json
{
"formatVersion": 1,
"items": {
"minecraft:acacia_button": 64,
"minecraft:oak_planks": 99
}
}
- Keys are full item IDs (namespace:item).
- Values are clamped to 1–99 at load time.
Handy editor shortcuts
(VS Code / most editors; Windows/Linux = Ctrl, macOS = Cmd unless noted)
Format document:
Shift+Alt+F (Win/Linux) · Shift+Option+F (macOS)
- Find / Replace: Ctrl+F / Ctrl+H · Cmd+F / Cmd+Alt+F -Select next occurrence (multi-cursor): Ctrl+D · Cmd+D
- Go to line: Ctrl+G · Cmd+G
- Select word / line: Ctrl+W (word) / Ctrl+L (line) · Option+Shift+→/← or Cmd+L (macOS)
Tips
- Keep IDs alphabetized for easier diffs.
- Use regex replace in Ctrl+H to mass-edit values.
- After editing, run /stackmanager reload (if commands available) or restart the world/server to apply changes.
Compatibility & limits
- The mod enforces limits on the server; clients don’t need the mod (unless other mods require it).
- Items with different NBT (custom names, enchantments, damage, etc.) never stack, by vanilla rules.
- Most vanilla and modded GUIs respect these limits. If a specific mod screen still caps at 64/99, report it—small per-screen patches are possible.
- Values above 99 are intentionally reduced to 99 to keep networking stable.
Requirements
Fabric API: optional but recommended for better experience (enables /stackmanager commands and smoother reloading).
Recommended usage
- Install Fabric API (recommended, not required) to use in-game commands and improve quality of life.
- Edit values directly in the config file before starting a world/server. Command-based changes—especially without Fabric API—can be cumbersome and may require restarts or extra steps.
Ideas for using the mod
- Potions: Easier: set potions to 16 or 32 per slot
minecraft:potion: 16
minecraft:splash_potion: 16
minecraft:lingering_potion: 8–16
Benefit: fewer inventory trips during raids, mining, and boss fights.
Note: Potions carry NBT (effect type). Only identical potions stack.
Other quick ideas
- Builder / mega-projects (QoL):
- Blocks (stone, planks, glass, terracotta) 99; food 64–99; firework_rocket 64–99.
- Exploration / Elytra: Rockets 16 (harder) or 64–99 (easier); Ender Pearls 16–32 (easier) or 8 (harder).
- Combat / PvE: arrow 99; snowballs/eggs 64–99 for events/minigames.
- Economy / survival challenge: Ores/ingots 16; ore blocks 8; pearls/snowballs 8 to curb spam
FAQ
- How do I find an item ID?
Enable advanced tooltips with F3 + H, then hover the item: you’ll see namespace:item.
- Can I set 9999?
No. For network safety the effective cap is 99.
- Singleplayer or server?
Both. In singleplayer, drop the mod into mods/. On a dedicated server, only the server needs the mod.
下载 Stack Manager (Fabric/NeoForge)
下载 Stack Manager (Fabric/NeoForge)
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Stack Manager (Fabric/NeoForge)
下载 Stack Manager (Fabric/NeoForge)
下载 Stack Manager (Fabric/NeoForge)
下载 Stack Manager (Fabric/NeoForge)
下载 Stack Manager (Fabric/NeoForge)
下载 Stack Manager (Fabric/NeoForge)
下载 Stack Manager (Fabric/NeoForge)
下载 Stack Manager (Fabric/NeoForge)
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧