Minecraft wiki entry for Slime, associated text: Like most other hostile mobs, slimes do not spawn within 24 blocks (spherical) of any player, despawn over time if no player is within 32 blocks, and despawn instantly if no player is within the despawn radius (128 blocks in Java Edition, 44 to 128 blocks in Bedrock Edition depending on simulation distance[verify]).