SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls

By: Doc <nachito94@msn.com>
This commit is contained in:
CraftBukkit/Spigot
2022-02-07 18:47:27 +11:00
parent f01afaf08f
commit 314b83ffae
9 changed files with 296 additions and 194 deletions

View File

@@ -122,7 +122,7 @@
gameprofilerfiller.push("pollingChunks");
int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING);
- boolean flag1 = worlddata.getGameTime() % 400L == 0L;
+ boolean flag1 = level.ticksPerAnimalSpawns != 0L && worlddata.getGameTime() % level.ticksPerAnimalSpawns == 0L; // CraftBukkit
+ boolean flag1 = level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
gameprofilerfiller.push("naturalSpawnCount");
int l = this.distanceManager.getNaturalSpawnChunkCount();