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

Slimes and magma cubes with Size 0 despawn with Peaceful difficulty

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.9.4, Minecraft 1.10.2, Minecraft 1.11, Minecraft 16w50a, Minecraft 1.13.1, Minecraft 1.13.2-pre2, Minecraft 1.13.2, Minecraft 19w08b, Minecraft 19w09a
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      Based on the code slimes and magma cubes with a Size value of 0 are probably not supposed to despawn. This makes sense because they cannot damage the player.

      The reason

      The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

      The reason for this is that the method net.minecraft.entity.monster.EntitySlime.readEntityFromNBT(NBTTagCompound) sets the Size value to 0 if it is lower and then saves 1 added to the value as value for the net.minecraft.entity.monster.EntitySlime.SLIME_SIZE DataParameter.

      The problem is that the method net.minecraft.entity.monster.EntitySlime.onUpdate() tests if the net.minecraft.entity.monster.EntitySlime.SLIME_SIZE DataParameter value is greater than 0 to despawn the slime when Peaceful is the selected difficulty.
      Based on what I said before this is always the case because the value is only valid if it is greater than 1.

      To fix this the condition for it to despawn should be that the method net.minecraft.entity.monster.EntitySlime.isSmallSlime() does not return true. This method is also used for determining whether the slime can deal damage or not.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              marcono1234 [Mod] Marcono1234
            • Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                CHK: