ItemStacking
ItemStacking 是一款轻量级、高性能的 Minecraft Paper 服务器优化插件,旨在消除物品实体卡顿,同时不损害原版游戏体验。
在生存服务器上,诸如挖矿、砍树或运行大型农田等活动会在地上掉落成千上万的物品。Minecraft 默认的 5 分钟消失机制意味着这些物品会悬浮在已加载的区域中,导致严重的客户端渲染卡顿和服务器 Tick 延迟。
ItemStacking 通过将地面上匹配的物品合并为单个实体来解决这一问题——甚至超越了原版 64 个物品的堆叠上限!
? 主要特性
- 无限地面堆叠:将地上的方块和物品堆叠至 100、1,000 或更多。
- 自定义可配置材质:你可以精确选择哪些物品应该堆叠(例如圆石、石头、泥土、下界岩),从而确保稀有/自定义物品不受影响。
- 多层合并引擎:
- 生成时合并:物品掉落时立即合并。
- 默认合并拦截:与 Bukkit 内置的堆叠合并无缝协作。
- 周期性水流扫描:高度优化的后台扫描功能,会将在水流中汇聚在一起的物品进行合并。
- 智能性能优化:
- 实际物品数量安全地存储在实体的元数据(PDC)中。地面上的物理物品大小永远不会超过 64,防止出现客户端图形错误。
- 使用 Mojang 原生的空间索引(八叉树)进行邻近搜索,而非耗时的循环计算。
- 符合原版逻辑的拾取机制:
- 当玩家走过堆叠物品时,系统会使用标准的、符合原版安全的 64 堆叠方式填充其背包。
- 如果玩家的背包只能容纳 30 个物品,他们只会拾取正好 30 个,剩余的堆叠仍留在地面上。
- 漏斗与漏斗矿车支持:漏斗会逐个从堆叠中提取物品,保持漏斗分拣速度和物品流水线。
- 视觉显示名称标签:在堆叠物品上方显示简洁的浮动文本标签(例如
Cobblestone (x350))。你可以配置仅在堆叠数量超过 64 时才显示该标签,使小批量掉落的世界看起来干净且原汁原味。
?️ 命令与权限
- /itemstacking reload (别名: /istack reload)
- 描述:动态重载插件配置。
-
- 权限:itemstacking.admin (默认:服务器 OP)
⚙️ 配置 (config.yml)
默认配置文件简洁明了,并带有完整文档注释:
# Configuration for ItemStacking plugin
# Enable or disable the plugin
enabled: true
# The radius in blocks to search for matching items to stack
merge-radius: 3.0
# The frequency in ticks to scan for items on the ground (20 ticks = 1 second)
# Set to 0 to disable periodic scanning and only stack on spawn.
scan-interval: 40
# Minimum count of items in a stack before the custom name tag is displayed.
# Set to 65 to only show the tag when the item exceeds the vanilla stack size (64).
# Set to -1 to never show the name tag.
min-count-for-name: 65
# Format for the custom name tag displayed above stacked items
# Use %material% for the item name, %count% for the quantity.
display-name-format: "&7%material% &e(x%count%)"
# List of materials that are allowed to stack beyond 64.
stackable-items:
- COBBLESTONE
- STONE
- DIRT
- GRASS_BLOCK
- SAND
- GRAVEL
- NETHERRACK
- OAK_LOG
- DEEPSLATE
- COBBLED_DEEPSLATE
- ANDESITE
- DIORITE
- GRANITE
- COAL
- RAW_IRON
- RAW_GOLD
- RAW_COPPER
- REDSTONE
- LAPIS_LAZULI
- WHEAT
- POTATO
- CARROT
ItemStacking
ItemStacking is a lightweight, high-performance optimization plugin for Minecraft Paper servers designed to eliminate item entity lag without compromising the vanilla gameplay feel.
On survival servers, activities like mining mountains, tree-chopping, or running large crop farms drop thousands of items on the ground. Minecraft's default 5-minute despawn window means these items hover in loaded chunks, creating severe client rendering lag and server tick delay.
ItemStacking solves this by merging matching items on the ground into a single entity—even beyond the vanilla stack limit of 64!
? Key Features
- Infinite Ground Stacking: Stack blocks and items on the ground to 100, 1,000, or more.
- Custom Configurable Materials: You choose exactly which items should stack (e.g. Cobblestone, Stone, Dirt, Netherrack) so rare/custom items are left untouched.
- Multi-Layer Merging Engine:
- Spawn-Time Merging: Items merge instantly when they drop.
- Default Merge Interception: Works seamlessly with Bukkit's built-in stack merges.
- Periodic Water & Flow Scan: A highly optimized background scan merges items that flow together in water streams.
- Smart Performance Optimization:
- The actual item count is stored securely in the entity's metadata (PDC). The physical item size on the ground never exceeds 64, preventing client-side graphical bugs.
- Uses Mojang's native spatial indexing (octree) for nearby searches instead of heavy loop calculations.
- Vanilla-Safe Pickup Logic:
- When a player walks over a stacked item, it populates their inventory using standard, vanilla-safe stacks of 64.
- If a player's inventory only has room for 30 items, they pick up exactly 30, and the remaining stack stays on the ground.
- Hopper & Hopper Minecart Support: Hoppers pull items from the stack one by one, preserving hopper sorting speeds and item pipelines.
- Visual Display Nameplates: Displays a sleek floating text tag above stacked items (e.g.
Cobblestone (x350)). You can configure the tag to only show up when the stack size exceeds 64, keeping the world looking clean and vanilla for small drops.
?️ Commands & Permissions
- /itemstacking reload (Alias: /istack reload)
- Description: Reloads the plugin configuration on the fly.
-
- Permission: itemstacking.admin (Default: Server OP)
⚙️ Configuration (config.yml)
The default configuration file is clean and fully documented:
# Configuration for ItemStacking plugin
# Enable or disable the plugin
enabled: true
# The radius in blocks to search for matching items to stack
merge-radius: 3.0
# The frequency in ticks to scan for items on the ground (20 ticks = 1 second)
# Set to 0 to disable periodic scanning and only stack on spawn.
scan-interval: 40
# Minimum count of items in a stack before the custom name tag is displayed.
# Set to 65 to only show the tag when the item exceeds the vanilla stack size (64).
# Set to -1 to never show the name tag.
min-count-for-name: 65
# Format for the custom name tag displayed above stacked items
# Use %material% for the item name, %count% for the quantity.
display-name-format: "&7%material% &e(x%count%)"
# List of materials that are allowed to stack beyond 64.
stackable-items:
- COBBLESTONE
- STONE
- DIRT
- GRASS_BLOCK
- SAND
- GRAVEL
- NETHERRACK
- OAK_LOG
- DEEPSLATE
- COBBLED_DEEPSLATE
- ANDESITE
- DIORITE
- GRANITE
- COAL
- RAW_IRON
- RAW_GOLD
- RAW_COPPER
- REDSTONE
- LAPIS_LAZULI
- WHEAT
- POTATO
- CARROT
下载 Itemstacking
下载 Itemstacking
下载 Itemstacking
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Itemstacking
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Itemstacking
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Itemstacking
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Itemstacking
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Itemstacking
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Itemstacking
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Itemstacking
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
-
可配置的扫描间隔:您现在可以在配置文件中调整
scanInterval的刻率,以控制地面物品的扫描和堆叠速度,与 Paper 版本中的行为一致。 -
自定义重载消息:重新加载配置文件时显示的确认消息现在可以在配置文件中自由编辑(英文为新的默认值)。
-
改进的热重载功能:使用
/itemstacking reload或/istack reload命令后,所有对已在地面上的物品所做的更改将立即生效,无需重启服务器。
- 漏斗与漏斗矿车的物品即时转移:
在 stackable-items 中定义且数量超过配置的 min-count-for-name: 阈值的物品,现在会像原版 Minecraft 那样一次性瞬间抽取完毕,而不是逐件缓慢转移。此功能同时适用于普通漏斗和漏斗矿车。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
原版世界生成优化模组
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
缓冲的原始输入和线程化的事件轮询
评论 0
登录后参与评分
还没有评论,来抢沙发吧