Skip to content

Add configurable ender chest and shulker box slot counts#13733

Closed
cev-api wants to merge 2 commits intoPaperMC:mainfrom
cev-api:shulker-ender-capacity
Closed

Add configurable ender chest and shulker box slot counts#13733
cev-api wants to merge 2 commits intoPaperMC:mainfrom
cev-api:shulker-ender-capacity

Conversation

@cev-api
Copy link
Copy Markdown

@cev-api cev-api commented Mar 30, 2026

This adds configurable slot counts for ender chests and shulker boxes.

Summary:

  • adds misc.ender-chest-slot-count and misc.shulker-box-slot-count to GlobalConfiguration
  • normalizes both values to multiples of 9 between 9 and 54
  • updates ender chest menu creation to use the correct container row count and menu type
  • updates shulker box storage and menu creation to support non-default sizes
  • updates CraftContainer handling so non-27-slot shulker boxes open with the appropriate generic chest menu

Reasoning:
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:

  • built Paper successfully
  • rebuilt patches successfully
  • verified default behavior remains 27 slots
  • verified custom values open with the correct menu size
  • verified values are clamped and normalized to supported multiples of 9

@cev-api cev-api requested a review from a team as a code owner March 30, 2026 15:33
@github-project-automation github-project-automation bot moved this to Awaiting review in Paper PR Queue Mar 30, 2026
@masmc05
Copy link
Copy Markdown
Contributor

masmc05 commented Mar 30, 2026

Ender chest and shulker box capacity changes are difficult to implement cleanly at the plugin layer

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

@cev-api
Copy link
Copy Markdown
Author

cev-api commented Mar 30, 2026

Ender chest and shulker box capacity changes are difficult to implement cleanly at the plugin layer

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.

@electronicboy
Copy link
Copy Markdown
Member

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

@cev-api
Copy link
Copy Markdown
Author

cev-api commented Mar 31, 2026

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.

@KioProject123
Copy link
Copy Markdown
Contributor

If you replace ShulkerBoxMenu with ChestMenu, you may need to note that shulker box items can be placed into ChestMenu.

@cev-api
Copy link
Copy Markdown
Author

cev-api commented Apr 4, 2026

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.

@KioProject123
Copy link
Copy Markdown
Contributor

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, 和 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

@Owen1212055
Copy link
Copy Markdown
Member

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.

@Owen1212055 Owen1212055 closed this Apr 4, 2026
@github-project-automation github-project-automation bot moved this from Awaiting review to Closed in Paper PR Queue Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

6 participants