Incompatibility with all data packs that handle item entities in any way
GrantGryczan opened this issue ยท 0 comments
- ALWAYS PROVIDE INFORMATION ABOUT MODLOADER (Fabric / Forge) AND MOD VERSION (For Example 1.19.2-8.2.10)
Tested in Fabric and NeoForge for MC 1.21.1.
- Describe the bug
Because dropped backpacks that contain items have the entity ID travelersbackpack:backpack instead of minecraft:item as any other item does, data packs are unable to support handling your item the same way as all other items, at least without hard-coding support for the travelersbackpack:backpack entity ID.
Some examples of incompatibilities this causes:
- The Graves data pack from Vanilla Tweaks can't pick up backpacks containing items, so when a player dies, all items in their inventory except for their backpack will be stored safely in their grave.
- The Ender Hoppers data pack from Gamemode 4 can't pick up backpacks containing items, so any automation setups involving an ender hopper picking up item drops won't work for backpacks.
- Write steps to reproduce the bug
Put an item into a backpack. Drop the item. Enter /say @e[type=item]. The backpack item will not be listed.
- What is expected behaviour
Backpack items should be considered items in commands so that data packs that do things with items can support backpack items too.
Ideally, instead of subclassing the vanilla item entity, a new item component should be created for backpack items that provides all of the behavior that's currently programmed for your custom backpack item entity. If it helps, an item component in vanilla that's similar to what I believe might be useful to you is minecraft:fire_resistant in MC 1.21.1. In MC 1.21.2, it was replaced with a more generalized component, minecraft:damage_resistant.