summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-02-20 17:40:40 +0100
committerErik Broes <erikbroes@grum.nl>2011-02-20 18:15:17 +0100
commit09026095b69a25c59fd5b360442c7fa0bd390f4f (patch)
treedf0b281da8677a182f34663d5945709936b5b769 /src/main
parent6e3ee31336dcec939139cc97cab11d98fb99145d (diff)
downloadcraftbukkit-09026095b69a25c59fd5b360442c7fa0bd390f4f.tar
craftbukkit-09026095b69a25c59fd5b360442c7fa0bd390f4f.tar.gz
craftbukkit-09026095b69a25c59fd5b360442c7fa0bd390f4f.tar.lz
craftbukkit-09026095b69a25c59fd5b360442c7fa0bd390f4f.tar.xz
craftbukkit-09026095b69a25c59fd5b360442c7fa0bd390f4f.zip
Minor cleaning of code
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/net/minecraft/server/BlockButton.java3
-rw-r--r--src/main/java/net/minecraft/server/ChunkProviderServer.java8
-rw-r--r--src/main/java/net/minecraft/server/Explosion.java7
3 files changed, 8 insertions, 10 deletions
diff --git a/src/main/java/net/minecraft/server/BlockButton.java b/src/main/java/net/minecraft/server/BlockButton.java
index c79766c4..f20a8818 100644
--- a/src/main/java/net/minecraft/server/BlockButton.java
+++ b/src/main/java/net/minecraft/server/BlockButton.java
@@ -249,8 +249,9 @@ public class BlockButton extends Block {
CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k);
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, 1, 0);
server.getPluginManager().callEvent(eventRedstone);
- if(eventRedstone.getNewCurrent() > 0) return;
+ if (eventRedstone.getNewCurrent() > 0) return;
// Craftbukkit end
+
world.c(i, j, k, l & 7);
world.h(i, j, k, this.id);
int i1 = l & 7;
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index e6b4be5e..8b2b44bd 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -19,8 +19,7 @@ import org.bukkit.event.world.ChunkLoadEvent;
import org.bukkit.event.world.ChunkUnloadEvent;
// CraftBukkit end
-public class ChunkProviderServer implements IChunkProvider
-{
+public class ChunkProviderServer implements IChunkProvider {
public LongHashset a = new LongHashset(); // CraftBukkit
private Chunk b;
private IChunkProvider c;
@@ -203,9 +202,8 @@ public class ChunkProviderServer implements IChunkProvider
while (!this.a.isEmpty()) {
long chunkcoordinates = this.a.popFirst();
Chunk chunk = e.get(chunkcoordinates);
- if (chunk == null) {
- continue;
- }
+ if (chunk == null) continue;
+
ChunkUnloadEvent cue = new ChunkUnloadEvent(Type.CHUNK_UNLOADED, chunk.bukkitChunk);
server.getPluginManager().callEvent(cue);
if (!cue.isCancelled()) {
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index c59cebf1..e5734447 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -29,9 +29,8 @@ public class Explosion {
public Entity e;
public float f;
public Set g = new HashSet();
- // Craftbukkit start
- public boolean wasCanceled = false;
- // Craftbukkit end
+
+ public boolean wasCanceled = false; // Craftbukkit
public Explosion(World world, Entity entity, double d0, double d1, double d2, float f) {
this.i = world;
@@ -240,7 +239,7 @@ public class Explosion {
}
if (i1 > 0) {
- Block.byId[i1].a(this.i, j, k, l, this.i.getData(j, k, l), event.getYield()); //Modified by Craftbukkit
+ Block.byId[i1].a(this.i, j, k, l, this.i.getData(j, k, l), event.getYield()); // Craftbukkit
this.i.e(j, k, l, 0);
Block.byId[i1].a_(this.i, j, k, l);
}