Better compatibility of the largeShulkerBox
rule with other mods
#89
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR aims to improve the compatibility of the
largeShulkerBox
rule with other mods.Currently, this mod quietly replaces a vanilla screen handler with a custom one (
largeShulkerBoxScreenHandler
) during a player's interaction with a shulker box block. While this approach works fine on its own, it leaves no easy way for other modders to open a "proper" shulker box screen when a shulker box is not materialized in its block form in the world. The issue is not critical, as it doesn't lead to crashes or serious bugs, but it's far from ideal because players in such scenarios can only access half of the expected capacity of their shulker boxes.The PR removes the custom screen handler entirely and instead patches the vanilla one. This way, anyone using
ShulkerBoxScreenHandler
can expect the right screen to pop up, regardless of whether thelargeShulkerBox
rule is enabled or not.Tested on 1.16.5, 1.17.1, 1.18.2, 1.19.4, and 1.20.4, both client and server-side.
Fixed Issues
Fixes #81
Fixes Kir-Antipov/packed-inventory#14