Generic cleanup of the org.bukkit.craftbukkit classes.

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
CraftBukkit/Spigot
2011-06-12 01:12:43 +02:00
parent 889f8d765d
commit 9bf573516b
34 changed files with 160 additions and 145 deletions

View File

@@ -35,7 +35,7 @@ public class CraftChunk implements Chunk {
public net.minecraft.server.Chunk getHandle() {
net.minecraft.server.Chunk c = weakChunk.get();
if (c == null) {
c = worldServer.getChunkAt(x,z);
c = worldServer.getChunkAt(x, z);
weakChunk = new WeakReference<net.minecraft.server.Chunk>(c);
}
return c;
@@ -64,7 +64,7 @@ public class CraftChunk implements Chunk {
if (block == null) {
Block newBlock = new CraftBlock(this, (getX() << 4) | (x & 0xF), y & 0x7F, (getZ() << 4) | (z & 0xF));
Block oldBlock = this.cache.put(pos, newBlock);
if(oldBlock == null) {
if (oldBlock == null) {
block = newBlock;
} else {
block = oldBlock;