Minecraft
  1. Minecraft
  2. MC-110808

Eating Pufferfish in a stack of 1 does not give debuffs

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 1.11
    • Fix Version/s: Minecraft 16w50a
    • Security Level: Minecraft - Public (Viewable by everyone)
    • Environment:

      Java version, Running on Windows 10

      Java- 1.8.0_60 32bit
      CPU: i7-5500U @2.40 GHz

    • Confirmation Status:
      Confirmed
    • Game Mode:
      Survival

      Description

      Eating a singular unstacked pufferfish does not inflict any debuffs on the player. (tested in singleplayer)

      https://www.youtube.com/watch?v=I2CRCcnRcQI

      Code analysis

      Based on 1.11 decompiled using MCP 9.35 rc1

      The problem is that the stack size is decreased (net.minecraft.item.ItemFood.onItemUseFinish(ItemStack, World, EntityLivingBase)) before other methods are called, in particular net.minecraft.item.ItemFishFood.FishType.byItemStack(ItemStack) which calls the method net.minecraft.item.ItemStack.getItem() which returns air because the count is 0.

      This is a general problem and affects multiple items. Luckily they don't call methods which require a valid item at the moment.

        Issue Links

          Activity

          Hide
          [Helper] Dylan added a comment -

          Confirmed

          Show
          [Helper] Dylan added a comment - Confirmed

            People

            • Assignee:
              [Mojang] Maria Lemón
              Reporter:
              Ian Douglas
            • Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                CHK: