Panda keeps eating after using command to replace its handitem.
Relates to: MC-174700
Linked issues
relates to 2
Attachments
Comments 3
The same thing happens when feeding a panda an item that is not in #panda_eats_from_ground. This significantly affects data packs with items in #panda_food that are not in #panda_eats_from_ground.
See https://minecraft.wiki/w/Item_tag_(Java_Edition)#panda_eats_from_ground%5D for a detailed explanation of the behavior.
This could be solved simply by removing the tag's condition from Panda.handleEating() on the line:
if (this.getEatCounter() > 100 && this.getItemBySlot(EquipmentSlot.MAINHAND).is(ItemTags.PANDA_EATS_FROM_GROUND)) {
Possible duplicate of MC-174700 or related.