From c64fe5080c996e8ea29b3e113043dd0aa962aaee Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 13 Dec 2018 11:00:00 +1100 Subject: Mappings Update --- nms-patches/WorldServer.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'nms-patches/WorldServer.patch') 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 -- cgit v1.2.3