diff options
author | t00thpick1 <t00thpick1dirko@gmail.com> | 2013-12-08 21:50:18 -0500 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2013-12-08 22:39:50 -0600 |
commit | 0aa187f151ad829adc0ec20b8bd662d625d561e7 (patch) | |
tree | 4bea45b180a124f73cd2680b7fdab016e5494f57 /src/main/java/net/minecraft/server/ChunkProviderServer.java | |
parent | c7b4514ad30f3b65500152d18355eec59c5f8909 (diff) | |
download | craftbukkit-0aa187f151ad829adc0ec20b8bd662d625d561e7.tar craftbukkit-0aa187f151ad829adc0ec20b8bd662d625d561e7.tar.gz craftbukkit-0aa187f151ad829adc0ec20b8bd662d625d561e7.tar.lz craftbukkit-0aa187f151ad829adc0ec20b8bd662d625d561e7.tar.xz craftbukkit-0aa187f151ad829adc0ec20b8bd662d625d561e7.zip |
[Bleeding] Ignore Block Physics in Chunk population. Fixes BUKKIT-4923
Suppressing physics updates during Chunk population prevents
infinite recursion due to custom Block Populators editing border
blocks on chunks.
Diffstat (limited to 'src/main/java/net/minecraft/server/ChunkProviderServer.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ChunkProviderServer.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java index a702fe82..2f842c3c 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -237,8 +237,13 @@ public class ChunkProviderServer implements IChunkProvider { org.bukkit.World world = this.world.getWorld(); if (world != null) { - for (org.bukkit.generator.BlockPopulator populator : world.getPopulators()) { - populator.populate(world, random, chunk.bukkitChunk); + this.world.populating = true; + try { + for (org.bukkit.generator.BlockPopulator populator : world.getPopulators()) { + populator.populate(world, random, chunk.bukkitChunk); + } + } finally { + this.world.populating = false; } } BlockSand.instaFall = false; |