Fix placed shulkers always counting as empty#10026
Fix placed shulkers always counting as empty#10026VoidLeech wants to merge 1 commit intoCreators-of-Create:mc1.21.1/devfrom
Conversation
fix: typo in DisplayLinkPeripheral exception
| if (block instanceof ShulkerBoxBlock | ||
| && level.getBlockEntity(targetPos) instanceof ShulkerBoxBlockEntity shulkerBoxBlockEntity | ||
| && !shulkerBoxBlockEntity.isEmpty()) { | ||
| stack.applyComponents(shulkerBoxBlockEntity.collectComponents()); |
There was a problem hiding this comment.
Would it perhaps make sense to just collect and apply components for all block entities for all shulker box like cases?
There was a problem hiding this comment.
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
Fixes - #9331
Also fixes a typo.