Add configurable ender chest and shulker box slot counts#13733
Add configurable ender chest and shulker box slot counts#13733cev-api wants to merge 2 commits intoPaperMC:mainfrom
Conversation
It's not difficult at all to replace default ender chest inventory with custom inventory that saves items in PDC. You can ask for help in discord if you'd like, but I doubt paper would start becoming more like purpur by adding such features |
A PDC-backed inventory is still a custom replacement for the native container. Supporting this natively removes the need for faux-inventory plugins, avoids repeated implementations of the same feature, and reduces the desync/duplication risk that comes from emulating container behavior in plugin code. |
|
While doing it in the server is the only real way that entirely makes sense, we're generally not too happy with breaking the vanilla save layout, we expect people to be able to take their save data back to vanilla without any real issues |
This would be an opt-in non-vanilla feature, so any incompatibility when switching back to the standard server would result from an intentional server-side choice. Thus if a server enables larger native containers and later returns to software that only supports the default storage layout, loss of data beyond those limits seems like an expected consequence of that transition. |
paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
Show resolved
Hide resolved
|
If you replace ShulkerBoxMenu with ChestMenu, you may need to note that shulker box items can be placed into ChestMenu. |
I tested this case specifically with expanded shulker sizes, and shulker boxes still cannot be placed inside them. The the vanilla no-nesting behavior still appears to be enforced by the backing container logic rather than only by ShulkerBoxMenu. I agree the menu swap makes this worth checking, but in practice I was not able to put shulker boxes inside expanded shulker boxes. |
It's strange. I also tested it using the vanilla client and found that shulker boxes can be nested. nested.shulker.boxes.mp4 |
|
Thank you for your pull request! In the interest of making sure that you get a quick resolution with this, I am going to be closing your PR. We arent really interested in upkeeping changes like this that result in changing the default sizes for containers, as this is something that as stated before can be reimplemented by plugins. For api suggestions with the inventory api, it would be nice to create issues so discussions could be made as to what could be added to make it easier to do something like this. Especially with the dupes you mentioned, it would be perhaps helpful so we can help promote best practices. Additionally, this becomes nuanced as it seems oddly specific for this to just be a change for ender chests / shulker boxes. But, making such changes results in the end with more of a maintenance burden than it is worth. In the future, its recommended you open issues before making PRs so dicussions could be made, as certain features like these we see implemented in other forks because we have already decided against features like these. |
This adds configurable slot counts for ender chests and shulker boxes.
Summary:
misc.ender-chest-slot-countandmisc.shulker-box-slot-counttoGlobalConfigurationReasoning:
Ender chest and shulker box capacity changes are difficult to implement cleanly at the plugin layer, because the underlying container size, menu type, and inventory view handling all need to stay in sync. In practice, plugins that provide larger ender chests or shulker boxes often have to emulate the inventory with separate storage and custom handling rather than using the native container directly. This leads to repeated re-implementation of the same behavior across many plugins and increases the likelihood of edge cases such as desync or duplication issues. This change provides a built-in implementation for that customization while preserving the default 27-slot behavior.
Testing: