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, 1.15.2, 20w08a, 1.16.4, 20w48a, 20w51a, 21w03a, 21w05b, 21w06a, 21w07a, 21w14a
-
Fix Version/s: None
-
Labels:
-
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.