Chorus forest slimes & math fixes

This commit is contained in:
paulevsGitch 2021-01-13 04:51:17 +03:00
parent 56d7a2b7c3
commit e09d1d2235
7 changed files with 14 additions and 6 deletions

View file

@ -190,6 +190,10 @@ public class EntityEndSlime extends SlimeEntity {
return this.dataTracker.get(VARIANT) == 3;
}
public boolean isChorus() {
return this.dataTracker.get(VARIANT) == 0;
}
public static boolean canSpawn(EntityType<EntityEndSlime> type, ServerWorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random) {
return random.nextInt(64) == 0 || isPermanentBiome(world, pos) || (notManyEntities(world, pos, 32, 3) && isWaterNear(world, pos, 32, 8));
}