During the process of making a mod for Minecraft: Java Edition, I noticed a potential implementation error, while this currently doesn't effect gameplay it does affect mods and may affect gameplay further down the line.
Currently it is possible to input items, which return false
for Item#canFitInsideContainerItems
, into shulker boxes via hoppers.
This is not a problem when inserting items using the GUI since ShulkerBoxSlot
correctly delegates to Item#canFitInsideContainerItems
while ShulkerBoxBlockEntity#canPlaceItemThroughFace
specifically checks if the items block representation is ShulkerBoxBlock
.
The fix would probably just be making ShulkerBoxBlockEntity#canPlaceItemThroughFace
delegate to Item#canFitInsideContainerItems
as well.
All code mentions use official mappings for version 1.19
Per prior Mojang resolutions, this means this report is invalid.
See, for example this comment, and this comment.