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

Eating Pufferfish in a stack of 1 does not give debuffs

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • Minecraft 1.11
    • Minecraft 16w50a
    • Java version, Running on Windows 10

      Java- 1.8.0_60 32bit
      CPU: i7-5500U @2.40 GHz
    • Confirmed
    • 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.

      Attachments

        Issue Links

          Activity

            People

              Excited Maria Lemón
              ChaosC Ian Douglas
              Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                CHK: