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

Using eye of ender acts like consuming it slowing down player

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 16w38a, Minecraft 16w39a, Minecraft 16w42a, Minecraft 1.11 Pre-Release 1, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w15a, Minecraft 17w17b, Minecraft 17w18b, Minecraft 1.12 Pre-Release 1, Minecraft 1.12 Pre-Release 2, Minecraft 1.12 Pre-Release 6, Minecraft 1.12, Minecraft 1.12.2, Minecraft 17w47b, Minecraft 18w01a, Minecraft 18w11a, Minecraft 1.13-pre1, Minecraft 1.13.2, Minecraft 19w05a, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14 Pre-Release 3, Minecraft 1.14.3, Minecraft 1.14.4 Pre-Release 3, 1.14.4, 19w37a
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      Items, Player

      Description

      The bug

      Using an eye of ender acts like you are consuming it slowing you down while holding right-click like food or potions. This can be seen better in Creative mode but happens for a short moment in Survival mode as well.

      Expected would be that holding right-click would continously throw the eye of enders.

      How to reproduce

      1. Switch to Creative mode
        /gamemode creative
        
      2. While moving forward hold right-click to use eye of enders

      Code analysis

      Based on 1.12 decompiled using MCP 9.40 PRE 1

      The method net.minecraft.item.ItemEnderEye.onItemRightClick(World, EntityPlayer, EnumHand) sets the eye of ender as actively used item stack similar to bows, food or potions. However, since eye of enders do not override net.minecraft.item.Item.getMaxItemUseDuration(ItemStack) their use time is 0. This causes you to slow down in Creative mode because the condition for stopping using the active item stack is --this.activeItemStackUseCount == 0, so with 0 as start value the first check is -1 == 0.

      Since the method ItemEnderEye.onItemRightClick directly decreases the count in Survival the active item stack is reset since its count changed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rexcaptain501 .
              • Votes:
                7 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: