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

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

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

      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.

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

              Created:
              Updated:
              Resolved:
              CHK: