Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-93841

Right clicking on a tamed wolf, ocelot or parrot causes it to sit / stand up and uses item

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 19w37a
    • Minecraft 15w49b, Minecraft 1.10, Minecraft 1.10.2, Minecraft 16w40a, Minecraft 16w41a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 1.12 Pre-Release 5, Minecraft 1.12 Pre-Release 6, Minecraft 1.12.2, Minecraft 17w50a, Minecraft 1.13-pre1, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w11a, Minecraft 1.14, Minecraft 1.14.1 Pre-Release 1
    • Confirmed
    • (Unassigned)

      The bug

      Right clicking on a tamed wolf, ocelot or parrot while holding an item makes the wolf, ocelot or parrot sit / stand up and uses the item.

      How to reproduce

      1. Tame a wolf, ocelot or parrot
      2. Right click it while holding an item with right click action, for example a fishing rod
        → The pet will sit but you also used the item you are holding

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The methods net.minecraft.entity.passive.EntityWolf.processInteract(EntityPlayer, EnumHand) and net.minecraft.entity.passive.EntityOcelot.processInteract(EntityPlayer, EnumHand) both don't return true when the wolf or ocelot sits or stands up.

      Important:

      • To not break the spawn egg and breeding behavior the methods should probably first call net.minecraft.entity.passive.EntityAnimal.processInteract(EntityPlayer, EnumHand).
      • To not break name tag behavior the methods should probably call net.minecraft.item.Item.itemInteractionForEntity(ItemStack, EntityPlayer, EntityLivingBase, EnumHand).

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            7 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: