Ability for slimes to spawn with low chance far from water

This commit is contained in:
paulevsGitch 2021-01-13 04:20:22 +03:00
parent 2a3087821e
commit 56d7a2b7c3

View file

@ -191,7 +191,7 @@ public class EntityEndSlime extends SlimeEntity {
}
public static boolean canSpawn(EntityType<EntityEndSlime> type, ServerWorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random) {
return isPermanentBiome(world, pos) || (notManyEntities(world, pos, 32, 3) && isWaterNear(world, pos, 32, 8));
return random.nextInt(64) == 0 || isPermanentBiome(world, pos) || (notManyEntities(world, pos, 32, 3) && isWaterNear(world, pos, 32, 8));
}
private static boolean isPermanentBiome(ServerWorldAccess world, BlockPos pos) {