Archiviert
13
0

Fix possible tick list syncing issue

Dieser Commit ist enthalten in:
Thinkofdeath 2015-03-15 21:11:15 +00:00
Ursprung 6e0120a058
Commit 6a374be737

Datei anzeigen

@ -1,5 +1,5 @@
--- /home/matt/mc-dev-private//net/minecraft/server/WorldServer.java 2015-03-11 10:15:29.143595382 +0000 --- /home/matt/mc-dev-private//net/minecraft/server/WorldServer.java 2015-03-15 21:11:07.596380090 +0000
+++ src/main/java/net/minecraft/server/WorldServer.java 2015-03-11 10:15:29.147595381 +0000 +++ src/main/java/net/minecraft/server/WorldServer.java 2015-03-15 21:11:07.600380090 +0000
@@ -16,11 +16,23 @@ @@ -16,11 +16,23 @@
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -316,7 +316,25 @@
} }
this.methodProfiler.a("cleaning"); this.methodProfiler.a("cleaning");
@@ -508,6 +673,7 @@ @@ -477,7 +642,9 @@
for (int i = 0; i < 2; ++i) {
Iterator iterator;
+ boolean remove = false; // CraftBukkit
if (i == 0) {
+ remove = true; // CraftBukkit
iterator = this.M.iterator();
} else {
iterator = this.V.iterator();
@@ -492,6 +659,7 @@
if (blockposition.getX() >= structureboundingbox.a && blockposition.getX() < structureboundingbox.d && blockposition.getZ() >= structureboundingbox.c && blockposition.getZ() < structureboundingbox.f) {
if (flag) {
+ if (remove) // CraftBukkit
this.L.remove(nextticklistentry);
iterator.remove();
}
@@ -508,6 +676,7 @@
return arraylist; return arraylist;
} }
@ -324,7 +342,7 @@
public void entityJoinedWorld(Entity entity, boolean flag) { public void entityJoinedWorld(Entity entity, boolean flag) {
if (!this.getSpawnAnimals() && (entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal)) { if (!this.getSpawnAnimals() && (entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal)) {
entity.die(); entity.die();
@@ -519,6 +685,7 @@ @@ -519,6 +688,7 @@
super.entityJoinedWorld(entity, flag); super.entityJoinedWorld(entity, flag);
} }
@ -332,7 +350,7 @@
private boolean getSpawnNPCs() { private boolean getSpawnNPCs() {
return this.server.getSpawnNPCs(); return this.server.getSpawnNPCs();
@@ -531,13 +698,43 @@ @@ -531,13 +701,43 @@
protected IChunkProvider k() { protected IChunkProvider k() {
IChunkLoader ichunkloader = this.dataManager.createChunkLoader(this.worldProvider); IChunkLoader ichunkloader = this.dataManager.createChunkLoader(this.worldProvider);
@ -377,7 +395,7 @@
for (int k1 = 0; k1 < this.h.size(); ++k1) { for (int k1 = 0; k1 < this.h.size(); ++k1) {
TileEntity tileentity = (TileEntity) this.h.get(k1); TileEntity tileentity = (TileEntity) this.h.get(k1);
BlockPosition blockposition = tileentity.getPosition(); BlockPosition blockposition = tileentity.getPosition();
@@ -546,6 +743,8 @@ @@ -546,6 +746,8 @@
arraylist.add(tileentity); arraylist.add(tileentity);
} }
} }
@ -386,7 +404,7 @@
return arraylist; return arraylist;
} }
@@ -609,6 +808,23 @@ @@ -609,6 +811,23 @@
int j = this.worldProvider.getSeaLevel(); int j = this.worldProvider.getSeaLevel();
int k = 0; int k = 0;
@ -410,7 +428,7 @@
if (blockposition != null) { if (blockposition != null) {
i = blockposition.getX(); i = blockposition.getX();
k = blockposition.getZ(); k = blockposition.getZ();
@@ -618,7 +834,7 @@ @@ -618,7 +837,7 @@
int l = 0; int l = 0;
@ -419,7 +437,7 @@
i += random.nextInt(64) - random.nextInt(64); i += random.nextInt(64) - random.nextInt(64);
k += random.nextInt(64) - random.nextInt(64); k += random.nextInt(64) - random.nextInt(64);
++l; ++l;
@@ -657,6 +873,7 @@ @@ -657,6 +876,7 @@
public void save(boolean flag, IProgressUpdate iprogressupdate) throws ExceptionWorldConflict { public void save(boolean flag, IProgressUpdate iprogressupdate) throws ExceptionWorldConflict {
if (this.chunkProvider.canSave()) { if (this.chunkProvider.canSave()) {
@ -427,7 +445,7 @@
if (iprogressupdate != null) { if (iprogressupdate != null) {
iprogressupdate.a("Saving level"); iprogressupdate.a("Saving level");
} }
@@ -667,7 +884,8 @@ @@ -667,7 +887,8 @@
} }
this.chunkProvider.saveChunks(flag, iprogressupdate); this.chunkProvider.saveChunks(flag, iprogressupdate);
@ -437,7 +455,7 @@
Iterator iterator = arraylist.iterator(); Iterator iterator = arraylist.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -698,8 +916,12 @@ @@ -698,8 +919,12 @@
this.worldData.k(this.getWorldBorder().getWarningTime()); this.worldData.k(this.getWorldBorder().getWarningTime());
this.worldData.b(this.getWorldBorder().j()); this.worldData.b(this.getWorldBorder().j());
this.worldData.e(this.getWorldBorder().i()); this.worldData.e(this.getWorldBorder().i());
@ -451,7 +469,7 @@
} }
protected void a(Entity entity) { protected void a(Entity entity) {
@@ -731,8 +953,16 @@ @@ -731,8 +956,16 @@
} }
public boolean strikeLightning(Entity entity) { public boolean strikeLightning(Entity entity) {
@ -469,7 +487,7 @@
return true; return true;
} else { } else {
return false; return false;
@@ -744,10 +974,20 @@ @@ -744,10 +977,20 @@
} }
public Explosion createExplosion(Entity entity, double d0, double d1, double d2, float f, boolean flag, boolean flag1) { public Explosion createExplosion(Entity entity, double d0, double d1, double d2, float f, boolean flag, boolean flag1) {
@ -490,7 +508,7 @@
if (!flag1) { if (!flag1) {
explosion.clearBlocks(); explosion.clearBlocks();
} }
@@ -793,7 +1033,8 @@ @@ -793,7 +1036,8 @@
BlockActionData blockactiondata = (BlockActionData) iterator.next(); BlockActionData blockactiondata = (BlockActionData) iterator.next();
if (this.a(blockactiondata)) { if (this.a(blockactiondata)) {
@ -500,7 +518,7 @@
} }
} }
@@ -816,6 +1057,7 @@ @@ -816,6 +1060,7 @@
boolean flag = this.S(); boolean flag = this.S();
super.p(); super.p();
@ -508,7 +526,7 @@
if (this.o != this.p) { if (this.o != this.p) {
this.server.getPlayerList().a(new PacketPlayOutGameStateChange(7, this.p), this.worldProvider.getDimension()); this.server.getPlayerList().a(new PacketPlayOutGameStateChange(7, this.p), this.worldProvider.getDimension());
} }
@@ -834,6 +1076,21 @@ @@ -834,6 +1079,21 @@
this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(7, this.p)); this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(7, this.p));
this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(8, this.r)); this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(8, this.r));
} }
@ -530,7 +548,7 @@
} }
@@ -862,10 +1119,17 @@ @@ -862,10 +1122,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) { 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) {