diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-03-11 10:15:39 +0000 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-03-11 10:15:39 +0000 |
commit | 20ef9f5676c3c2790c96e8ec4b835c9a7e2149ef (patch) | |
tree | 7d3b0ab764b98f513b59324a5f6ba54026ecd89e /nms-patches/WorldServer.patch | |
parent | 5cb9b70aaaef68ded762d686e950519f2972a085 (diff) | |
download | craftbukkit-20ef9f5676c3c2790c96e8ec4b835c9a7e2149ef.tar craftbukkit-20ef9f5676c3c2790c96e8ec4b835c9a7e2149ef.tar.gz craftbukkit-20ef9f5676c3c2790c96e8ec4b835c9a7e2149ef.tar.lz craftbukkit-20ef9f5676c3c2790c96e8ec4b835c9a7e2149ef.tar.xz craftbukkit-20ef9f5676c3c2790c96e8ec4b835c9a7e2149ef.zip |
SPIGOT-677: Add populators slightly later to make sure everything is initialized
Diffstat (limited to 'nms-patches/WorldServer.patch')
-rw-r--r-- | nms-patches/WorldServer.patch | 61 |
1 files changed, 35 insertions, 26 deletions
diff --git a/nms-patches/WorldServer.patch b/nms-patches/WorldServer.patch index 22f986b9..6efc04a3 100644 --- a/nms-patches/WorldServer.patch +++ b/nms-patches/WorldServer.patch @@ -1,5 +1,5 @@ ---- /home/matt/mc-dev-private//net/minecraft/server/WorldServer.java 2015-03-07 12:10:53.194679070 +0000 -+++ src/main/java/net/minecraft/server/WorldServer.java 2015-03-07 12:10:53.198679070 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/WorldServer.java 2015-03-11 10:15:29.143595382 +0000 ++++ src/main/java/net/minecraft/server/WorldServer.java 2015-03-11 10:15:29.147595381 +0000 @@ -16,11 +16,23 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -51,7 +51,16 @@ this.B(); this.C(); this.getWorldBorder().a(minecraftserver.aH()); -@@ -87,6 +107,89 @@ +@@ -84,9 +104,98 @@ + this.getWorldBorder().setSize(this.worldData.E()); + } + ++ // CraftBukkit start ++ if (generator != null) { ++ getWorld().getPopulators().addAll(generator.getDefaultPopulators(getWorld())); ++ } ++ // CraftBukkit end ++ return this; } @@ -141,7 +150,7 @@ public void doTick() { super.doTick(); if (this.getWorldData().isHardcore() && this.getDifficulty() != EnumDifficulty.HARD) { -@@ -104,9 +207,11 @@ +@@ -104,9 +213,11 @@ this.e(); } @@ -156,7 +165,7 @@ } this.methodProfiler.c("chunkSource"); -@@ -135,6 +240,8 @@ +@@ -135,6 +246,8 @@ this.Q.a(this.getTime()); this.methodProfiler.b(); this.ak(); @@ -165,7 +174,7 @@ } public BiomeBase.BiomeMeta a(EnumCreatureType enumcreaturetype, BlockPosition blockposition) { -@@ -161,7 +268,7 @@ +@@ -161,7 +274,7 @@ if (entityhuman.v()) { ++i; @@ -174,7 +183,7 @@ ++j; } } -@@ -187,25 +294,46 @@ +@@ -187,25 +300,46 @@ } private void ag() { @@ -225,7 +234,7 @@ return false; } else { -@@ -228,13 +356,20 @@ +@@ -228,13 +362,20 @@ int i = 0; int j = 0; @@ -251,7 +260,7 @@ this.a(k, l, chunk); this.methodProfiler.c("tickChunk"); -@@ -260,11 +395,29 @@ +@@ -260,11 +401,29 @@ BlockPosition blockposition1 = blockposition.down(); if (this.w(blockposition1)) { @@ -283,7 +292,7 @@ } if (this.S() && this.getBiome(blockposition1).e()) { -@@ -383,7 +536,7 @@ +@@ -383,7 +542,7 @@ } public void tickEntities() { @@ -292,7 +301,7 @@ if (this.emptyTime++ >= 1200) { return; } -@@ -408,7 +561,13 @@ +@@ -408,7 +567,13 @@ throw new IllegalStateException("TickNextTick list out of synch"); } else { if (i > 1000) { @@ -307,7 +316,7 @@ } this.methodProfiler.a("cleaning"); -@@ -508,6 +667,7 @@ +@@ -508,6 +673,7 @@ return arraylist; } @@ -315,7 +324,7 @@ public void entityJoinedWorld(Entity entity, boolean flag) { if (!this.getSpawnAnimals() && (entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal)) { entity.die(); -@@ -519,6 +679,7 @@ +@@ -519,6 +685,7 @@ super.entityJoinedWorld(entity, flag); } @@ -323,7 +332,7 @@ private boolean getSpawnNPCs() { return this.server.getSpawnNPCs(); -@@ -531,13 +692,43 @@ +@@ -531,13 +698,43 @@ protected IChunkProvider k() { IChunkLoader ichunkloader = this.dataManager.createChunkLoader(this.worldProvider); @@ -368,7 +377,7 @@ for (int k1 = 0; k1 < this.h.size(); ++k1) { TileEntity tileentity = (TileEntity) this.h.get(k1); BlockPosition blockposition = tileentity.getPosition(); -@@ -546,6 +737,8 @@ +@@ -546,6 +743,8 @@ arraylist.add(tileentity); } } @@ -377,7 +386,7 @@ return arraylist; } -@@ -609,6 +802,23 @@ +@@ -609,6 +808,23 @@ int j = this.worldProvider.getSeaLevel(); int k = 0; @@ -401,7 +410,7 @@ if (blockposition != null) { i = blockposition.getX(); k = blockposition.getZ(); -@@ -618,7 +828,7 @@ +@@ -618,7 +834,7 @@ int l = 0; @@ -410,7 +419,7 @@ i += random.nextInt(64) - random.nextInt(64); k += random.nextInt(64) - random.nextInt(64); ++l; -@@ -657,6 +867,7 @@ +@@ -657,6 +873,7 @@ public void save(boolean flag, IProgressUpdate iprogressupdate) throws ExceptionWorldConflict { if (this.chunkProvider.canSave()) { @@ -418,7 +427,7 @@ if (iprogressupdate != null) { iprogressupdate.a("Saving level"); } -@@ -667,7 +878,8 @@ +@@ -667,7 +884,8 @@ } this.chunkProvider.saveChunks(flag, iprogressupdate); @@ -428,7 +437,7 @@ Iterator iterator = arraylist.iterator(); while (iterator.hasNext()) { -@@ -698,8 +910,12 @@ +@@ -698,8 +916,12 @@ this.worldData.k(this.getWorldBorder().getWarningTime()); this.worldData.b(this.getWorldBorder().j()); this.worldData.e(this.getWorldBorder().i()); @@ -442,7 +451,7 @@ } protected void a(Entity entity) { -@@ -731,8 +947,16 @@ +@@ -731,8 +953,16 @@ } public boolean strikeLightning(Entity entity) { @@ -460,7 +469,7 @@ return true; } else { return false; -@@ -744,10 +968,20 @@ +@@ -744,10 +974,20 @@ } public Explosion createExplosion(Entity entity, double d0, double d1, double d2, float f, boolean flag, boolean flag1) { @@ -481,7 +490,7 @@ if (!flag1) { explosion.clearBlocks(); } -@@ -793,7 +1027,8 @@ +@@ -793,7 +1033,8 @@ BlockActionData blockactiondata = (BlockActionData) iterator.next(); if (this.a(blockactiondata)) { @@ -491,7 +500,7 @@ } } -@@ -816,6 +1051,7 @@ +@@ -816,6 +1057,7 @@ boolean flag = this.S(); super.p(); @@ -499,7 +508,7 @@ if (this.o != this.p) { this.server.getPlayerList().a(new PacketPlayOutGameStateChange(7, this.p), this.worldProvider.getDimension()); } -@@ -834,6 +1070,21 @@ +@@ -834,6 +1076,21 @@ this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(7, this.p)); this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(8, this.r)); } @@ -521,7 +530,7 @@ } -@@ -862,10 +1113,17 @@ +@@ -862,10 +1119,17 @@ } public void a(EnumParticle enumparticle, boolean flag, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, int... aint) { |