diff options
author | md_5 <git@md-5.net> | 2018-12-13 11:00:00 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-12-13 11:00:00 +1100 |
commit | c64fe5080c996e8ea29b3e113043dd0aa962aaee (patch) | |
tree | bdd0883450532288f4d4e1f4687bad7aca234019 /nms-patches/WorldServer.patch | |
parent | a3c2ec03148f9f38d4d27d045b1afee2fc6ff173 (diff) | |
download | craftbukkit-c64fe5080c996e8ea29b3e113043dd0aa962aaee.tar craftbukkit-c64fe5080c996e8ea29b3e113043dd0aa962aaee.tar.gz craftbukkit-c64fe5080c996e8ea29b3e113043dd0aa962aaee.tar.lz craftbukkit-c64fe5080c996e8ea29b3e113043dd0aa962aaee.tar.xz craftbukkit-c64fe5080c996e8ea29b3e113043dd0aa962aaee.zip |
Mappings Update
Diffstat (limited to 'nms-patches/WorldServer.patch')
-rw-r--r-- | nms-patches/WorldServer.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nms-patches/WorldServer.patch b/nms-patches/WorldServer.patch index bde040ab..bd17e446 100644 --- a/nms-patches/WorldServer.patch +++ b/nms-patches/WorldServer.patch @@ -223,21 +223,21 @@ @@ -128,9 +271,12 @@ } - this.methodProfiler.a("spawner"); + this.methodProfiler.enter("spawner"); - if (this.getGameRules().getBoolean("doMobSpawning") && this.worldData.getType() != WorldType.DEBUG_ALL_BLOCK_STATES) { - this.spawnerCreature.a(this, this.allowMonsters, this.allowAnimals, this.worldData.getTime() % 400L == 0L); -- this.getChunkProviderServer().a(this, this.allowMonsters, this.allowAnimals); +- this.getChunkProvider().a(this, this.allowMonsters, this.allowAnimals); + // CraftBukkit start - Only call spawner if we have players online and the world allows for mobs or animals + long time = this.worldData.getTime(); + if (this.getGameRules().getBoolean("doMobSpawning") && this.worldData.getType() != WorldType.DEBUG_ALL_BLOCK_STATES && (this.allowMonsters || this.allowAnimals) && (this instanceof WorldServer && this.players.size() > 0)) { + this.spawnerCreature.a(this, this.allowMonsters && (this.ticksPerMonsterSpawns != 0 && time % this.ticksPerMonsterSpawns == 0L), this.allowAnimals && (this.ticksPerAnimalSpawns != 0 && time % this.ticksPerAnimalSpawns == 0L), this.worldData.getTime() % 400L == 0L); -+ this.getChunkProviderServer().a(this, this.allowMonsters && (this.ticksPerMonsterSpawns != 0 && time % this.ticksPerMonsterSpawns == 0L), this.allowAnimals && (this.ticksPerAnimalSpawns != 0 && time % this.ticksPerAnimalSpawns == 0L)); ++ this.getChunkProvider().a(this, this.allowMonsters && (this.ticksPerMonsterSpawns != 0 && time % this.ticksPerMonsterSpawns == 0L), this.allowAnimals && (this.ticksPerAnimalSpawns != 0 && time % this.ticksPerAnimalSpawns == 0L)); + // CraftBukkit end } - this.methodProfiler.c("chunkSource"); + this.methodProfiler.exitEnter("chunkSource"); @@ -160,6 +306,8 @@ - this.methodProfiler.e(); + this.methodProfiler.exit(); this.an(); this.P = false; + @@ -413,7 +413,7 @@ WorldServer.a.warn("Unable to find spawn biome"); } @@ -647,6 +848,7 @@ - ChunkProviderServer chunkproviderserver = this.getChunkProviderServer(); + ChunkProviderServer chunkproviderserver = this.getChunkProvider(); if (chunkproviderserver.d()) { + org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit |