diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-11-06 06:05:28 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-11-13 16:09:52 -0600 |
commit | 7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7 (patch) | |
tree | 843902ff94d82e86f40d7e0af1ac838fee859e75 /src/main/java/net/minecraft/server/Chunk.java | |
parent | a0c3b4f9d1b403fa64230f22b5dd3222181ba646 (diff) | |
download | craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.gz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.lz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.xz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.zip |
Update CraftBukkit to Minecraft 1.4.4.
Diffstat (limited to 'src/main/java/net/minecraft/server/Chunk.java')
-rw-r--r-- | src/main/java/net/minecraft/server/Chunk.java | 57 |
1 files changed, 23 insertions, 34 deletions
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java index 612d6f01..62c71090 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -159,7 +159,7 @@ public class Chunk { if (chunksection != null) { chunksection.c(j, i1 & 15, k, l); - this.world.n((this.x << 4) + j, i1, (this.z << 4) + k); + this.world.o((this.x << 4) + j, i1, (this.z << 4) + k); } } @@ -277,7 +277,7 @@ public class Chunk { chunksection = this.sections[l1 >> 4]; if (chunksection != null) { chunksection.c(i, l1 & 15, k, 15); - this.world.n((this.x << 4) + i, l1, (this.z << 4) + k); + this.world.o((this.x << 4) + i, l1, (this.z << 4) + k); } } } else { @@ -285,7 +285,7 @@ public class Chunk { chunksection = this.sections[l1 >> 4]; if (chunksection != null) { chunksection.c(i, l1 & 15, k, 0); - this.world.n((this.x << 4) + i, l1, (this.z << 4) + k); + this.world.o((this.x << 4) + i, l1, (this.z << 4) + k); } } } @@ -395,7 +395,7 @@ public class Chunk { int k2 = this.z * 16 + k; if (l1 != 0 && !this.world.isStatic) { - Block.byId[l1].g(this.world, j2, j, k2, i2); + Block.byId[l1].h(this.world, j2, j, k2, i2); } chunksection.a(i, j & 15, k, l); @@ -403,7 +403,7 @@ public class Chunk { if (!this.world.isStatic) { Block.byId[l1].remove(this.world, j2, j, k2, l1, i2); } else if (Block.byId[l1] instanceof BlockContainer && l1 != l) { - this.world.q(j2, j, k2); + this.world.r(j2, j, k2); } } @@ -659,13 +659,9 @@ public class Chunk { public void addEntities() { this.d = true; this.world.a(this.tileEntities.values()); - List[] alist = this.entitySlices; - int i = alist.length; - for (int j = 0; j < i; ++j) { - List list = alist[j]; - - this.world.a(list); + for (int i = 0; i < this.entitySlices.length; ++i) { + this.world.a(this.entitySlices[i]); } } @@ -679,12 +675,9 @@ public class Chunk { this.world.a(tileentity); } - List[] alist = this.entitySlices; - int i = alist.length; - - for (int j = 0; j < i; ++j) { + for (int i = 0; i < this.entitySlices.length; ++i) { // CraftBukkit start - java.util.Iterator<Object> iter = this.entitySlices[j].iterator(); + java.util.Iterator<Object> iter = this.entitySlices[i].iterator(); while (iter.hasNext()) { Entity entity = (Entity) iter.next(); int cx = Location.locToBlock(entity.locX) >> 4; @@ -698,9 +691,7 @@ public class Chunk { } // CraftBukkit end - List list = alist[j]; - - this.world.b(list); + this.world.b(this.entitySlices[i]); } } @@ -722,18 +713,17 @@ public class Chunk { for (int k = i; k <= j; ++k) { List list1 = this.entitySlices[k]; - Iterator iterator = list1.iterator(); - while (iterator.hasNext()) { - Entity entity1 = (Entity) iterator.next(); + for (int l = 0; l < list1.size(); ++l) { + Entity entity1 = (Entity) list1.get(l); if (entity1 != entity && entity1.boundingBox.a(axisalignedbb)) { list.add(entity1); Entity[] aentity = entity1.ao(); if (aentity != null) { - for (int l = 0; l < aentity.length; ++l) { - entity1 = aentity[l]; + for (int i1 = 0; i1 < aentity.length; ++i1) { + entity1 = aentity[i1]; if (entity1 != entity && entity1.boundingBox.a(axisalignedbb)) { list.add(entity1); } @@ -762,10 +752,9 @@ public class Chunk { for (int k = i; k <= j; ++k) { List list1 = this.entitySlices[k]; - Iterator iterator = list1.iterator(); - while (iterator.hasNext()) { - Entity entity = (Entity) iterator.next(); + for (int l = 0; l < list1.size(); ++l) { + Entity entity = (Entity) list1.get(l); if (oclass.isAssignableFrom(entity.getClass()) && entity.boundingBox.a(axisalignedbb) && (ientityselector == null || ientityselector.a(entity))) { list.add(entity); @@ -916,30 +905,30 @@ public class Chunk { if (this.sections[j] == null && (k1 == 0 || k1 == 15 || k == 0 || k == 15 || l == 0 || l == 15) || this.sections[j] != null && this.sections[j].a(k, k1, l) == 0) { if (Block.lightEmission[this.world.getTypeId(i1, l1 - 1, j1)] > 0) { - this.world.x(i1, l1 - 1, j1); + this.world.z(i1, l1 - 1, j1); } if (Block.lightEmission[this.world.getTypeId(i1, l1 + 1, j1)] > 0) { - this.world.x(i1, l1 + 1, j1); + this.world.z(i1, l1 + 1, j1); } if (Block.lightEmission[this.world.getTypeId(i1 - 1, l1, j1)] > 0) { - this.world.x(i1 - 1, l1, j1); + this.world.z(i1 - 1, l1, j1); } if (Block.lightEmission[this.world.getTypeId(i1 + 1, l1, j1)] > 0) { - this.world.x(i1 + 1, l1, j1); + this.world.z(i1 + 1, l1, j1); } if (Block.lightEmission[this.world.getTypeId(i1, l1, j1 - 1)] > 0) { - this.world.x(i1, l1, j1 - 1); + this.world.z(i1, l1, j1 - 1); } if (Block.lightEmission[this.world.getTypeId(i1, l1, j1 + 1)] > 0) { - this.world.x(i1, l1, j1 + 1); + this.world.z(i1, l1, j1 + 1); } - this.world.x(i1, l1, j1); + this.world.z(i1, l1, j1); } } } |