Ability for slimes to spawn with low chance far from water
This commit is contained in:
parent
2a3087821e
commit
56d7a2b7c3
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,7 @@ public class EntityEndSlime extends SlimeEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean canSpawn(EntityType<EntityEndSlime> type, ServerWorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random) {
|
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) {
|
private static boolean isPermanentBiome(ServerWorldAccess world, BlockPos pos) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue