Generic code cleanup

This commit is contained in:
Erik Broes
2011-02-23 13:56:36 +01:00
parent 332d9c4f18
commit 09aa37fe4a
57 changed files with 415 additions and 344 deletions

View File

@@ -29,7 +29,8 @@ class PlayerInstance {
this.d = j;
this.e = new ChunkCoordIntPair(i, j);
playermanager.world.u.d(i, j); // Craftbukkit
// CraftBukkit
playermanager.world.u.d(i, j);
}
public void a(EntityPlayer entityplayer) {
@@ -56,7 +57,8 @@ class PlayerInstance {
PlayerManager.c(this.a).remove(this);
}
((WorldServer)entityplayer.world).u.c(this.c, this.d); // Craftbukkit
// CraftBukkit
((WorldServer) entityplayer.world).u.c(this.c, this.d);
}
entityplayer.f.remove(this.e);
@@ -132,12 +134,12 @@ class PlayerInstance {
j = this.j;
k = this.d * 16 + this.l;
// Craftbukkit start
// CraftBukkit start
this.a((Packet) (new Packet53BlockChange(i, j, k, a.world)));
if (Block.p[a.world.getTypeId(i, j, k)]) {
this.a(a.world.getTileEntity(i, j, k));
}
// Craftbukkit end
// CraftBukkit end
} else {
int l;
@@ -151,23 +153,28 @@ class PlayerInstance {
int i1 = this.k - this.j + 2;
int j1 = this.m - this.l + 1;
this.a((Packet) (new Packet51MapChunk(i, j, k, l, i1, j1, a.world))); // Craftbukkit
List list = a.world.d(i, j, k, i + l, j + i1, k + j1); // Craftbukkit
// CraftBukkit start
this.a((Packet) (new Packet51MapChunk(i, j, k, l, i1, j1, a.world)));
List list = a.world.d(i, j, k, i + l, j + i1, k + j1);
// CraftBukkit end
for (int k1 = 0; k1 < list.size(); ++k1) {
this.a((TileEntity) list.get(k1));
}
} else {
this.a((Packet) (new Packet52MultiBlockChange(this.c, this.d, this.f, this.g, a.world))); // Craftbukkit
// CraftBukkit
this.a((Packet) (new Packet52MultiBlockChange(this.c, this.d, this.f, this.g, a.world)));
for (i = 0; i < this.g; ++i) {
j = this.c * 16 + (this.g >> 12 & 15);
k = this.g & 255;
l = this.d * 16 + (this.g >> 8 & 15);
if (Block.p[a.world.getTypeId(j, k, l)]) { // Craftbukkit
// CraftBukkit start
if (Block.p[a.world.getTypeId(j, k, l)]) {
System.out.println("Sending!");
this.a(a.world.getTileEntity(j, k, l)); // Craftbukkit
this.a(a.world.getTileEntity(j, k, l));
}
// CraftBukkit end
}
}
}