Skip to content

Fix placed shulkers always counting as empty#10026

Open
VoidLeech wants to merge 1 commit intoCreators-of-Create:mc1.21.1/devfrom
VoidLeech:mc1.21.1/what-have-i-placed-in-my-placed-shulker
Open

Fix placed shulkers always counting as empty#10026
VoidLeech wants to merge 1 commit intoCreators-of-Create:mc1.21.1/devfrom
VoidLeech:mc1.21.1/what-have-i-placed-in-my-placed-shulker

Conversation

@VoidLeech
Copy link
Collaborator

Fixes - #9331
Also fixes a typo.

fix: typo in DisplayLinkPeripheral exception
@VoidLeech VoidLeech added pr type: fix PR fixes a bug pr flag: simple PR has minimal changes labels Feb 28, 2026
if (block instanceof ShulkerBoxBlock
&& level.getBlockEntity(targetPos) instanceof ShulkerBoxBlockEntity shulkerBoxBlockEntity
&& !shulkerBoxBlockEntity.isEmpty()) {
stack.applyComponents(shulkerBoxBlockEntity.collectComponents());
Copy link
Member

@IThundxr IThundxr Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it perhaps make sense to just collect and apply components for all block entities for all shulker box like cases?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting thought.

Even outside other mods adding new attributes types where it'd be useful to not have to mixin into Create to have their BE also pass the component map to the filtered stack, that opens up new interactions where ItemNameAttribute can compare with the name of placed BE's (even say, a cogwheel that only has that name due to getting placed by an item with that name), or the list filter with similar effect on the entire component map it had.

I don't hate it but to players that might feel very arbitrary to which blocks you can detect what stack it was placed with. (Admittedly, this PR does also just add have the behaviour I describe for shulkers specifically actually not quite it won't be able to detect the name of empty shulkers). lmk what you'd think is best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr flag: simple PR has minimal changes pr type: fix PR fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants