13
0
geforkt von Mirrors/Paper

Minor cleaning of code

Dieser Commit ist enthalten in:
Erik Broes 2011-02-20 17:40:40 +01:00
Ursprung 6e3ee31336
Commit 09026095b6
3 geänderte Dateien mit 8 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -249,8 +249,9 @@ public class BlockButton extends Block {
CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k); CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k);
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, 1, 0); BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, 1, 0);
server.getPluginManager().callEvent(eventRedstone); server.getPluginManager().callEvent(eventRedstone);
if(eventRedstone.getNewCurrent() > 0) return; if (eventRedstone.getNewCurrent() > 0) return;
// Craftbukkit end // Craftbukkit end
world.c(i, j, k, l & 7); world.c(i, j, k, l & 7);
world.h(i, j, k, this.id); world.h(i, j, k, this.id);
int i1 = l & 7; int i1 = l & 7;

Datei anzeigen

@ -19,8 +19,7 @@ import org.bukkit.event.world.ChunkLoadEvent;
import org.bukkit.event.world.ChunkUnloadEvent; import org.bukkit.event.world.ChunkUnloadEvent;
// CraftBukkit end // CraftBukkit end
public class ChunkProviderServer implements IChunkProvider public class ChunkProviderServer implements IChunkProvider {
{
public LongHashset a = new LongHashset(); // CraftBukkit public LongHashset a = new LongHashset(); // CraftBukkit
private Chunk b; private Chunk b;
private IChunkProvider c; private IChunkProvider c;
@ -203,9 +202,8 @@ public class ChunkProviderServer implements IChunkProvider
while (!this.a.isEmpty()) { while (!this.a.isEmpty()) {
long chunkcoordinates = this.a.popFirst(); long chunkcoordinates = this.a.popFirst();
Chunk chunk = e.get(chunkcoordinates); Chunk chunk = e.get(chunkcoordinates);
if (chunk == null) { if (chunk == null) continue;
continue;
}
ChunkUnloadEvent cue = new ChunkUnloadEvent(Type.CHUNK_UNLOADED, chunk.bukkitChunk); ChunkUnloadEvent cue = new ChunkUnloadEvent(Type.CHUNK_UNLOADED, chunk.bukkitChunk);
server.getPluginManager().callEvent(cue); server.getPluginManager().callEvent(cue);
if (!cue.isCancelled()) { if (!cue.isCancelled()) {

Datei anzeigen

@ -29,9 +29,8 @@ public class Explosion {
public Entity e; public Entity e;
public float f; public float f;
public Set g = new HashSet(); public Set g = new HashSet();
// Craftbukkit start
public boolean wasCanceled = false; public boolean wasCanceled = false; // Craftbukkit
// Craftbukkit end
public Explosion(World world, Entity entity, double d0, double d1, double d2, float f) { public Explosion(World world, Entity entity, double d0, double d1, double d2, float f) {
this.i = world; this.i = world;
@ -240,7 +239,7 @@ public class Explosion {
} }
if (i1 > 0) { 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); this.i.e(j, k, l, 0);
Block.byId[i1].a_(this.i, j, k, l); Block.byId[i1].a_(this.i, j, k, l);
} }