188.8.131.52 Beta, 1.17.2 Hotfix
All mobs that can naturally spawn with random armor or tools are intended to drop additional experience for each piece. This is explicitly included in the behavior files. For example, here is what husks use:
This does not work. query.equipment_count always returns 0 in this context, rendering it completely unfunctional.
The query itself works fine in other contexts, on both the server and client side. Other queries such as query.is_in_water also work fine in this context.
Ambiguous Vanilla Method
1. Spawn a bunch of husks or zombies or whatever
2. Kill them and observe how much experience you get
→ You get no additional experience from ones that have armor
Clean Custom Method
1. Download the attached world
2. Kill the husk wearing armor
→ No experience is dropped
This world overrides the husk behavior to remove some unneeded components, and simplifies its experience molang string to the following:
Fixing this naively will introduce an exploit! If mobs drop additional experience for armor they pick up, you can trivially buff the experience output of your mob farm by allowing mobs to pick up items, which they will drop on death, ready to be recycled again.
In Java Edition, mobs only give additional experience for natural equipment, not equipment picked up from the ground! For this reason, query.equipment_count should not be used at all, but rather something different that can distinguish between natural and picked-up equipment. Also, the hand item should count as well; query.equipment_count does not account for it.