diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-02-06 23:47:44 +0000 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-02-07 01:51:06 +0000 |
commit | e9b1607fdcee363e45be8f9b333d6de3fc3e5451 (patch) | |
tree | 2eb860b0af54c681eb027e1dd8da14d62b8c9f43 /src/main/java/net/minecraft/server | |
parent | 7bdc190637081a8f46c404b556bafc5eccf4903f (diff) | |
download | craftbukkit-e9b1607fdcee363e45be8f9b333d6de3fc3e5451.tar craftbukkit-e9b1607fdcee363e45be8f9b333d6de3fc3e5451.tar.gz craftbukkit-e9b1607fdcee363e45be8f9b333d6de3fc3e5451.tar.lz craftbukkit-e9b1607fdcee363e45be8f9b333d6de3fc3e5451.tar.xz craftbukkit-e9b1607fdcee363e45be8f9b333d6de3fc3e5451.zip |
Fixed entity updating
Diffstat (limited to 'src/main/java/net/minecraft/server')
3 files changed, 13 insertions, 16 deletions
diff --git a/src/main/java/net/minecraft/server/PlayerInstance.java b/src/main/java/net/minecraft/server/PlayerInstance.java index 23443e03..76c475fc 100644 --- a/src/main/java/net/minecraft/server/PlayerInstance.java +++ b/src/main/java/net/minecraft/server/PlayerInstance.java @@ -17,12 +17,10 @@ class PlayerInstance { private int k; private int l; private int m; - private WorldServer world; // Craftbukkit final PlayerManager a; - // Craftbukkit - this method signature is changed. - public PlayerInstance(PlayerManager playermanager, int i, int j, WorldServer world) { + public PlayerInstance(PlayerManager playermanager, int i, int j) { this.a = playermanager; this.b = new ArrayList(); this.f = new short[10]; @@ -32,8 +30,7 @@ class PlayerInstance { this.e = new ChunkCoordIntPair(i, j); // Craftbukkit start - this.world = world; - world.A.d(i, j); + playermanager.world.A.d(i, j); // Craftbukkit end } @@ -136,9 +133,9 @@ class PlayerInstance { i = this.c * 16 + this.h; j = this.j; k = this.d * 16 + this.l; - this.a((Packet) (new Packet53BlockChange(i, j, k, world))); // Craftbukkit - if (Block.p[world.getTypeId(i, j, k)]) { // Craftbukkit - this.a(world.getTileEntity(i, j, k)); // Craftbukkit + this.a((Packet) (new Packet53BlockChange(i, j, k, a.world))); // Craftbukkit + if (Block.p[a.world.getTypeId(i, j, k)]) { // Craftbukkit + this.a(a.world.getTileEntity(i, j, k)); // Craftbukkit } } else { int l; @@ -153,22 +150,22 @@ 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, world))); // Craftbukkit - List list = world.d(i, j, k, i + l, j + i1, k + j1); // Craftbukkit + 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 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, world))); // Craftbukkit + this.a((Packet) (new Packet52MultiBlockChange(this.c, this.d, this.f, this.g, a.world))); // Craftbukkit 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[world.getTypeId(j, k, l)]) { // Craftbukkit + if (Block.p[a.world.getTypeId(j, k, l)]) { // Craftbukkit System.out.println("Sending!"); - this.a(world.getTileEntity(j, k, l)); // Craftbukkit + this.a(a.world.getTileEntity(j, k, l)); // Craftbukkit } } } diff --git a/src/main/java/net/minecraft/server/PlayerManager.java b/src/main/java/net/minecraft/server/PlayerManager.java index 51dca1b4..9d05d243 100644 --- a/src/main/java/net/minecraft/server/PlayerManager.java +++ b/src/main/java/net/minecraft/server/PlayerManager.java @@ -9,7 +9,7 @@ public class PlayerManager { private PlayerList b = new PlayerList(); private List c = new ArrayList(); private MinecraftServer d; - private WorldServer world; // Craftbukkit + public WorldServer world; // Craftbukkit // Craftbukkit - change of method signature public PlayerManager(MinecraftServer minecraftserver, WorldServer world) { @@ -32,7 +32,7 @@ public class PlayerManager { PlayerInstance playerinstance = (PlayerInstance) this.b.a(k); if (playerinstance == null && flag) { - playerinstance = new PlayerInstance(this, i, j, world); + playerinstance = new PlayerInstance(this, i, j); this.b.a(k, playerinstance); } diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java index dfb86e48..4e725672 100644 --- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java +++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java @@ -92,7 +92,7 @@ public class ServerConfigurationManager { } public void b(EntityPlayer entityplayer) { - ((WorldServer)entityplayer.world).c(entityplayer); // Craftbukkit + ((WorldServer)entityplayer.world).manager.c(entityplayer); // Craftbukkit } public void c(EntityPlayer entityplayer) { |