mojira.dev
MC-266175

Panda keeps eating after using command to replace its handitem

Panda keeps eating after using command to replace its handitem.

Relates to: MC-174700

Linked issues

Attachments

Comments 3

Possible duplicate of MC-174700 or related.

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)) {

Wilf233

(Unassigned)

Confirmed

Platform

Low

Commands

panda, replaceitem

1.20.2, 23w44a, 23w46a, 1.20.3 Pre-Release 1, 1.20.3 Pre-Release 3, , 24w21b, 1.21.1, 1.21.3, 1.21.4, 25w05a

Retrieved