Stackables
使某些原本不可堆叠的物品变得可以堆叠。适用于药水、汤、蛋糕、附魔书、满桶、船、矿车、鞍、床、音乐唱片、山羊角和旗帜图案!所有内容均可配置,并内置了合理的默认值。甚至还包含为溅射药水添加冷却计时器的选项,以防止它们过于强大!
1.20.5 及更高版本的说明
Minecraft 1.20.5 更改了每个物品的最大堆叠数量的配置方式,使其更加依赖数据包驱动。因此,随着你修改配置文件来动态调整最大堆叠数量,这将非常不稳定。我仍在研究替代方案,但我担心从 1.20.5 开始,如果不彻底放弃动态配置功能,这个模组可能将不再可行。
关于 Bug 和模组兼容性的注意事项
请注意,仅仅改变物品的最大堆叠数量是不够的。如果你了解编程并查看此模组的源代码,你会立即明白原版 Minecraft(以及许多扩展的模组)对物品最大堆叠数量做出了大量假设。
例如,当你喝掉一桶牛奶时,原版代码最后只是简单地将该槽位中的物品替换为空桶,而没有检查实际内容。如果我只增加牛奶桶的最大堆叠数量,那么饮用一整组牛奶时会清空整个堆叠。因此,我还必须钩入原版处理喝牛奶的代码,并用自定义逻辑替换它,以给你空桶而不是其他东西。
正如我上面所说,这类问题在原版代码和许多模组中随处可见。我试图找出原版代码中的所有此类示例,但如果你发现任何我遗漏的地方,请在 GitHub 上报告,我会尽最大努力尽快修复。在某些情况下,Bug 实际上是另一个模组修改相同代码点导致的,这使得修复 Bug 变得更加困难。有时,就像经常报告的 Easy Anvils 一样,除非该模组的作者以与我修复相同的方式编写其新添加的模组代码(即堆叠数量和最大堆叠数量可以是任意数字),否则这些模组根本无法兼容。
标签
从版本 2.0.0 开始,Stackables 通过标签运行!现在所有最大堆叠数量都完全通过新标签控制。如果你遇到添加了你认为应属于特定类别的物品的模组,你可以使用数据包将它们添加到相应的标签中!
完整标签列表
stackables:potions - 药水和滞留药水
stackables:splash_potions - 溅射药水
stackables:soups - 炖菜和汤(所有木碗中的物品)
stackables:enchanted_books - 附魔书
stackables:boats - 普通船和箱子船
stackables:minecarts - 所有形式的矿车
stackables:buckets - 粉雪桶、水桶和熔岩桶
stackables:beds - 床
stackables:music_discs - 音乐唱片
stackables:instruments - 山羊角
stackables:banner_patterns - 旗帜图案
stackables:horse_equipment - 鞍和马铠
stackables:cakes - 蛋糕!
stackables:totems - 不死图腾
stackables:empty_buckets - 空桶
stackables:armor_stands - 盔甲架
stackables:banners - 旗帜
stackables:signs - 立牌和挂式告示牌
stackables:throwables - 鸡蛋和雪球
stackables:ender_pearls - 末影珍珠
stackables:drinkables - 蜂蜜瓶和牛奶桶
stackables:signed_books - 签名书
stackables:decorated_pots - 装饰陶罐。仅在 1.20-1.20.2 中有效
配置
你可以在配置文件夹中的 stackables.toml 文件中配置模组的行为。如果你安装了 ModMenu,也可以通过 ModMenu 模组列表中的 UI 访问配置(仅影响单人世界)!
配置版本 2 (模组版本 >= 2.0.0)
modEnabled: true|false - 模组的简易开关!设为 false 以禁用。
potions: true|false - 是否允许药水和滞留药水堆叠。
potionCount: 1-64 - 普通和滞留药水的最大堆叠数量。
splashPotions: true|false - 是否允许喷溅药水堆叠。
splashPotionCount: 1-64 - 喷溅药水的最大堆叠数量。
splashPotionDelay: 0-20 - 投掷喷溅药水时增加的延迟/冷却时间,单位为游戏刻。
soups: true|false - 是否允许汤类堆叠。
soupCount: 1-64 - 汤类的最大堆叠数量。
enchantedBooks: true|false - 是否允许附魔书堆叠。
enchantedBookCount: 1-64 - 附魔书的最大堆叠数量。
buckets: true|false - 是否允许满桶堆叠。
bucketCount: 1-64 - 满桶的最大堆叠数量。
boats: true|false - 是否允许船堆叠。
boatCount: 1-64 - 船的最大堆叠数量。
minecarts: true|false - 是否允许矿车堆叠。
minecartCount: 1-64 - 矿车的最大堆叠数量。
beds: true|false - 是否允许床堆叠。
bedCount: 1-64 - 床的最大堆叠数量。
discs: true|false - 是否允许音乐唱片堆叠。
discCount: 1-64 - 音乐唱片的最大堆叠数量。
instruments: true|false - 是否允许乐器(如山羊角)堆叠。
instrumentCount: 1-64 - 乐器(如山羊角)的最大堆叠数量。
patterns: true|false - 是否允许旗帜图案堆叠。
patternCount: 1-64 - 旗帜图案的最大堆叠数量。
horseEquipments: true|false - 是否允许马具(如鞍和盔甲)堆叠。
horseEquipmentCount: 1-64 - 马具(如鞍和盔甲)的最大堆叠数量。
cakes: true|false - 是否允许蛋糕堆叠。
cakeCount: 1-64 - 蛋糕的最大堆叠数量。
totems: true|false - 是否允许图腾堆叠。
totemCount: 1-64 - 图腾的最大堆叠数量。
decoratedPots: true|false - 是否允许装饰罐堆叠。仅适用于 1.20-1.20.2
decoratedPotCount: true|false - 装饰罐的最大堆叠数量。仅适用于 1.20-1.20.2
emptyBucketCount: 1-64 - 空桶的最大堆叠数量。
armorStandCount: 1-64 - 盔甲架的最大堆叠数量。
bannerCount: 1-64 - 旗帜的最大堆叠数量。
signCount: 1-64 - 告示牌的最大堆叠数量。
throwableCount: 1-64 - 可投掷物品(如雪球和鸡蛋)的最大堆叠数量。
enderPearlCount: 1-64 - 末影珍珠的最大堆叠数量。
drinkableCount: 1-64 - 可饮用物品(如蜂蜜瓶和牛奶桶)的最大堆叠数量。
signedBookCount: 1-64 - 签名书的最大堆叠数量。
Config version 1 (mod versions 2.0.0)
modEnabled: true|false - 模组的简易开关!设为 false 以禁用。
potions: true|false - 是否允许普通药水和滞留药水堆叠。
potionCount: 1-64 - 普通和滞留药水的最大堆叠数量。
splashPotions: true|false - 是否允许喷溅药水堆叠。
splashPotionCount: 1-64 - 喷溅药水的最大堆叠数量。
splashPotionDelay: 0-20 - 投掷喷溅药水时增加的延迟/冷却时间,单位为游戏刻。
soups: true|false - 是否允许汤类堆叠。
soupCount: 1-64 - 汤类的最大堆叠数量。
enchantedBooks: true|false - 是否允许附魔书堆叠。
enchantedBookCount: 1-64 - 附魔书的最大堆叠数量。
buckets: true|false - 是否允许满桶堆叠。
bucketCount: 1-64 - 满桶的最大堆叠数量。
boats: true|false - 是否允许船堆叠。
boatCount: 1-64 - 船的最大堆叠数量。
minecarts: true|false - 是否允许矿车堆叠。
minecartCount: 1-64 - 矿车的最大堆叠数量。
beds: true|false - 是否允许床堆叠。
bedCount: 1-64 - 床的最大堆叠数量。
discs: true|false - 是否允许音乐唱片堆叠。
discCount: 1-64 - 音乐唱片的最大堆叠数量。
horns: true|false - 是否允许山羊角堆叠。
hornCount: 1-64 - 山羊角的最大堆叠数量。
patterns: true|false - 是否允许旗帜图案堆叠。
patternCount: 1-64 - 旗帜图案的最大堆叠数量。
saddles: true|false - 是否允许鞍堆叠。
saddleCount: 1-64 - 鞍的最大堆叠数量。
cakes: true|false - 是否允许蛋糕堆叠。
cakeCount: 1-64 - 蛋糕的最大堆叠数量。
armorStandCount: 1-64 - 盔甲架的最大堆叠数量。
bannerCount: 1-64 - 旗帜的最大堆叠数量。
signCount: 1-64 - 告示牌的最大堆叠数量。
snowballCount: 1-64 - 雪球的堆叠数量。
eggCount: 1-64 - 鸡蛋的堆叠数量。
enderPearlCount: 1-64 - 末影珍珠的最大堆叠数量。
honeyBottleCount: 1-64 - 蜂蜜瓶的最大堆叠数量。
signedBookCount: 1-64 - 签名书的堆叠数量。
Stackables
Make some non-stackable items stackable. Works for potions, soups, cakes, enchanted books, full buckets, boats, minecarts, saddles, beds, music discs, goat horns, and banner patterns! Everything is configurable with sensible defaults built-in. Even includes an option to add a cooldown timer to splash potions to prevent them from being too strong!
Versions for 1.20.5 and beyond
Minecraft 1.20.5 changed how max stack size is configured for each item, making it more data-driven. Because of this, modifying the max stack size dynamically as you modify the configuration file is VERY unstable. I am still working on an alternative, but I fear that starting with 1.20.5, this mod might not be feasible anymore without completely doing away with the dynamic configuration aspect.
A note about bugs and mod compatibility
Be aware that simply changing the maximum stack size for items is not enough. If you know how to program and take a peek at the source for this mod, you'll understand immediately that vanilla Minecraft (and a lot of mods by extension) makes a lot of assumptions about the maximum stack size of items.
For example, when you drink a milk bucket, the vanilla code finishes off by simply replacing the item(s) in that slot with an empty bucket, without checking the actual contents. If I only increase the max stack size of milk buckets, drinking from a stack will wipe out the whole stack. Therefore I have to also hook into vanilla code where it handles drinking milk and replace it with custom logic to give you an empty bucket instead.
As I said above, these kinds of quirks are everywhere in the vanilla code and in a lot of mods. I have tried to find all the examples of this in vanilla code, but if you find any that I missed please report it on GitHub and I will do my best to fix it ASAP. In some cases, the bug is actually a result of another mod modifying the same points in code, which makes fixing the bug much more difficult. Sometimes, like with the commonly reported Easy Anvils, the mods are simply incompatible unless that mod's author writes their newly-added mod code in the same way my fixes are written, where stack size and maximum stack size can always be any number.
Tags
As of version 2.0.0, Stackables functions via tags! Every max stack size is now controlled exclusively through the new tags. If you come across mods that add items you feel should be included in a particular category, you can add them to the appropriate tag with a data pack!
Full list of tags
stackables:potions - Potions and lingering potions
stackables:splash_potions - Splash potions
stackables:soups - Stews & soups (everything in wooden bowls)
stackables:enchanted_books - Enchanted books
stackables:boats - Regular and chest boats
stackables:minecarts - All forms of minecarts
stackables:buckets - Powder snow, water, and lava buckets
stackables:beds - Beds
stackables:music_discs - Music discs
stackables:instruments - Goat horns
stackables:banner_patterns - Banner patterns
stackables:horse_equipment - Saddles and horse armor
stackables:cakes - Cake!
stackables:totems - Totems of Undying
stackables:empty_buckets - Empty bucket
stackables:armor_stands - Armor stands
stackables:banners - Banners
stackables:signs - Both standing and hanging signs
stackables:throwables - Eggs and snowballs
stackables:ender_pearls - Ender pearls
stackables:drinkables - Honey bottles and milk buckets
stackables:signed_books - Signed books
stackables:decorated_pots - Decorated pots. Only in 1.20-1.20.2
Configuration
You can configure the behavior of the mod from the stackables.toml file within your config folder. If you have ModMenu installed, you can also access the configuration through the UI in ModMenu's mod list (only affects single player worlds)!
Config version 2 (mod versions >= 2.0.0)
modEnabled: true|false - Simple toggle for the mod! Set to false to disable.
potions: true|false - Whether to allow potions to stack.
potionCount: 1-64 - Maximum stack size for potions.
splashPotions: true|false - Whether to allow splash potions to stack.
splashPotionCount: 1-64 - Maximum stack size for splash potions.
splashPotionDelay: 0-20 - The delay/cooldown to add to throwing splash potions, in game ticks.
soups: true|false - Whether to allow soups to stack.
soupCount: 1-64 - Maximum stack size for soups.
enchantedBooks: true|false - Whether to allow enchanted books to stack.
enchantedBookCount: 1-64 - Maximum stack size for enchanted books.
buckets: true|false - Whether to allow full buckets to stack.
bucketCount: 1-64 - Maximum stack size for full buckets.
boats: true|false - Whether to allow boats to stack.
boatCount: 1-64 - Maximum stack size for boats.
minecarts: true|false - Whether to allow minecarts to stack.
minecartCount: 1-64 - Maximum stack size for minecarts.
beds: true|false - Whether to allow beds to stack.
bedCount: 1-64 - Maximum stack size for beds.
discs: true|false - Whether to allow music discs to stack.
discCount: 1-64 - Maximum stack size for music discs.
instruments: true|false - Whether to allow instruments (i.e. goat horns) to stack.
instrumentCount: 1-64 - Maximum stack size for instruments (i.e. goat horns).
patterns: true|false - Whether to allow banner patterns to stack.
patternCount: 1-64 - Maximum stack size for banner patterns.
horseEquipments: true|false - Whether to allow horse equipment (i.e. saddles and armor) to stack.
horseEquipmentCount: 1-64 - Maximum stack size for horse equipment (i.e. saddles and armor).
cakes: true|false - Whether to allow cakes to stack.
cakeCount: 1-64 - Maximum stack size for cakes.
totems: true|false - Whether to allow totems to stack.
totemCount: 1-64 - Maximum stack size for totems.
decoratedPots: true|false - Whether to allow decorated pots to stack. Only in 1.20-1.20.2
decoratedPotCount: true|false - Maximum stack size for decorated pots. Only in 1.20-1.20.2
emptyBucketCount: 1-64 - Maximum stack size for empty buckets.
armorStandCount: 1-64 - Maximum stack size for armor stands.
bannerCount: 1-64 - Maximum stack size for banners.
signCount: 1-64 - Maximum stack size for signs.
throwableCount: 1-64 - Maximum stack size for throwables (i.e. snowballs and eggs).
enderPearlCount: 1-64 - Maximum stack size for ender pearls.
drinkableCount: 1-64 - Maximum stack size for drinkables (i.e. honey bottles and milk buckets).
signedBookCount: 1-64 - Maximum stack size for signed books.
Config version 1 (mod versions 2.0.0)
modEnabled: true|false - Simple toggle for the mod! Set to false to disable.
potions: true|false - Whether to allow regular & lingering potions to stack.
potionCount: 1-64 - Maximum stack size for regular & lingering potions.
splashPotions: true|false - Whether to allow splash potions to stack.
splashPotionCount: 1-64 - Maximum stack size for splash potions.
splashPotionDelay: 0-20 - The delay/cooldown to add to throwing splash potions, in game ticks.
soups: true|false - Whether to allow soups to stack.
soupCount: 1-64 - Maximum stack size for soups.
enchantedBooks: true|false - Whether to allow enchanted books to stack.
enchantedBookCount: 1-64 - Maximum stack size for enchanted books.
buckets: true|false - Whether to allow full buckets to stack.
bucketCount: 1-64 - Maximum stack size for full buckets.
boats: true|false - Whether to allow boats to stack.
boatCount: 1-64 - Maximum stack size for boats.
minecarts: true|false - Whether to allow minecarts to stack.
minecartCount: 1-64 - Maximum stack size for minecarts.
beds: true|false - Whether to allow beds to stack.
bedCount: 1-64 - Maximum stack size for beds.
discs: true|false - Whether to allow music discs to stack.
discCount: 1-64 - Maximum stack size for music discs.
horns: true|false - Whether to allow goat horns to stack.
hornCount: 1-64 - Maximum stack size for goat horns.
patterns: true|false - Whether to allow banner patterns to stack.
patternCount: 1-64 - Maximum stack size for banner patterns.
saddles: true|false - Whether to allow saddles to stack.
saddleCount: 1-64 - Maximum stack size for saddles.
cakes: true|false - Whether to allow cakes to stack.
cakeCount: 1-64 - Maximum stack size for cakes.
armorStandCount: 1-64 - Maximum stack size for armor stands.
bannerCount: 1-64 - Maximum stack size for banners.
signCount: 1-64 - Maximum stack size for signs.
snowballCount: 1-64 - Maximum stack size for snowballs.
eggCount: 1-64 - Maximum stack size for eggs.
enderPearlCount: 1-64 - Maximum stack size for ender pearls.
honeyBottleCount: 1-64 - Maximum stack size for honey bottles.
signedBookCount: 1-64 - Maximum stack size for signed books.
评论 0
登录后参与评分
还没有评论,来抢沙发吧