summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--[-rwxr-xr-x]pom.xml0
-rw-r--r--src/main/java/net/minecraft/server/BlockFlowing.java74
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java4
-rw-r--r--src/main/java/net/minecraft/server/NetServerHandler.java4
-rw-r--r--src/main/java/net/minecraft/server/ServerConfigurationManager.java2
-rw-r--r--src/main/java/net/minecraft/server/WorldServer.java26
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftLivingEntity.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java3
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftWorld.java6
-rw-r--r--src/main/java/org/bukkit/craftbukkit/Main.java2
10 files changed, 60 insertions, 63 deletions
diff --git a/pom.xml b/pom.xml
index cbfb2c74..cbfb2c74 100755..100644
--- a/pom.xml
+++ b/pom.xml
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
index 86405a89..0fba19fd 100644
--- a/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java
@@ -56,8 +56,8 @@ public class BlockFlowing extends BlockFluids
if(world.d(i1, j1 - 1, k1))
j2 = 0;
else
- if(world.c(i1, j1 - 1, k1) == bs && world.b(i1, j1, k1) == 0)
- j2 = 0;
+ if(world.c(i1, j1 - 1, k1) == bs && world.b(i1, j1, k1) == 0)
+ j2 = 0;
if(bs == Material.g && l1 < 8 && j2 < 8 && j2 > l1 && random.nextInt(4) != 0)
{
j2 = l1;
@@ -76,52 +76,52 @@ public class BlockFlowing extends BlockFluids
world.g(i1, j1, k1, bh);
}
} else
- if(flag)
- i(world, i1, j1, k1);
+ if(flag)
+ i(world, i1, j1, k1);
} else
{
i(world, i1, j1, k1);
}
-
+
// Craftbukkit start
CraftBlock source = (CraftBlock) ((WorldServer) world).getWorld().getBlockAt(i1, j1, k1);
-
+
if(l(world, i1, j1 - 1, k1))
{
- // Craftbucket send "down" to the server
- BlockFromToEvent blockFlow = new BlockFromToEvent(Type.BLOCK_FLOW, source, BlockFace.Down);
+ // Craftbucket send "down" to the server
+ BlockFromToEvent blockFlow = new BlockFromToEvent(Type.BLOCK_FLOW, source, BlockFace.Down);
((WorldServer) world).getServer().getPluginManager().callEvent(blockFlow);
-
- if (!blockFlow.isCancelled()) {
- if(l1 >= 8)
- world.b(i1, j1 - 1, k1, bh, l1);
- else
- world.b(i1, j1 - 1, k1, bh, l1 + 8);
- }
+
+ if (!blockFlow.isCancelled()) {
+ if(l1 >= 8)
+ world.b(i1, j1 - 1, k1, bh, l1);
+ else
+ world.b(i1, j1 - 1, k1, bh, l1 + 8);
+ }
} else
- if(l1 >= 0 && (l1 == 0 || k(world, i1, j1 - 1, k1)))
- {
- boolean aflag[] = j(world, i1, j1, k1);
- int k2 = l1 + byte0;
- if(l1 >= 8)
- k2 = 1;
- if(k2 >= 8)
- return;
-
- // Craftbukkit start
- BlockFace[] faces = new BlockFace[]{ BlockFace.North, BlockFace.South, BlockFace.East, BlockFace.West };
- for (BlockFace currentFace : faces) {
- int index = 0;
- if (aflag[index]) {
- BlockFromToEvent event = new BlockFromToEvent(Type.BLOCK_FLOW, source, currentFace);
- ((WorldServer) world).getServer().getPluginManager().callEvent(event);
- if (!event.isCancelled())
- f(world, i1 + currentFace.getModX(), j1, k1 + currentFace.getModZ(), k2);
- }
- index++;
+ if(l1 >= 0 && (l1 == 0 || k(world, i1, j1 - 1, k1)))
+ {
+ boolean aflag[] = j(world, i1, j1, k1);
+ int k2 = l1 + byte0;
+ if(l1 >= 8)
+ k2 = 1;
+ if(k2 >= 8)
+ return;
+
+ // Craftbukkit start
+ BlockFace[] faces = new BlockFace[]{ BlockFace.North, BlockFace.South, BlockFace.East, BlockFace.West };
+ for (BlockFace currentFace : faces) {
+ int index = 0;
+ if (aflag[index]) {
+ BlockFromToEvent event = new BlockFromToEvent(Type.BLOCK_FLOW, source, currentFace);
+ ((WorldServer) world).getServer().getPluginManager().callEvent(event);
+ if (!event.isCancelled())
+ f(world, i1 + currentFace.getModX(), j1, k1 + currentFace.getModZ(), k2);
+ }
+ index++;
+ }
+ // Craftbukkit stop
}
- // Craftbukkit stop
- }
}
private void f(World world, int i1, int j1, int k1, int l1)
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8d49cfa6..541dcffe 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -19,7 +19,7 @@ import org.bukkit.craftbukkit.CraftServer;
public class MinecraftServer
- implements ICommandListener, Runnable {
+implements ICommandListener, Runnable {
public static Logger a = Logger.getLogger("Minecraft");
public static HashMap b = new HashMap();
@@ -79,7 +79,7 @@ public class MinecraftServer
a.info((new StringBuilder()).append("Starting Minecraft server on ").append(s.length() != 0 ? s : "*").append(":").append(i1).toString());
try {
c = new NetworkListenThread(this, inetaddress, i1);
- // CraftBukkit: Be more generic; IOException -> Throwable
+ // CraftBukkit: Be more generic; IOException -> Throwable
} catch (Throwable ioexception) {
a.warning("**** FAILED TO BIND TO PORT!");
a.log(Level.WARNING, (new StringBuilder()).append("The exception was: ").append(ioexception.toString()).toString());
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java
index 1168a6df..299caec7 100644
--- a/src/main/java/net/minecraft/server/NetServerHandler.java
+++ b/src/main/java/net/minecraft/server/NetServerHandler.java
@@ -14,7 +14,7 @@ import org.bukkit.event.player.PlayerMoveEvent;
public class NetServerHandler extends NetHandler
- implements ICommandListener {
+implements ICommandListener {
public static Logger a = Logger.getLogger("Minecraft");
public NetworkManager b;
@@ -394,7 +394,7 @@ public class NetServerHandler extends NetHandler
server.getPluginManager().callEvent(event);
s = (new StringBuilder()).append("<").append(event.getPlayer().getName()).append("> ").append(event.getMessage()).toString();
// CraftBukkit stop
-
+
a.info(s);
d.f.a(new Packet3Chat(s));
}
diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java
index dac524b8..ebdf2221 100644
--- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java
+++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java
@@ -104,7 +104,7 @@ public class ServerConfigurationManager {
} else if (b.size() >= e) {
event.disallow(PlayerLoginEvent.Result.KICK_FULL, "The server is full!");
}
-
+
server.getPluginManager().callEvent(event);
if (event.getResult() != PlayerLoginEvent.Result.ALLOWED) {
netloginhandler.a(event.getKickMessage());
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 431cb0ac..6f1dd38f 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -51,9 +51,9 @@ public class WorldServer extends World {
public CraftWorld getWorld() {
return world;
}
-
+
public CraftServer getServer() {
- return server;
+ return server;
}
// CraftBukkit stop
@@ -92,19 +92,19 @@ public class WorldServer extends World {
// CraftBukkit start
@Override
public boolean a(int i1, int j1, int k1, int l1, boolean flag) {
- boolean superResult = super.a(i1, j1, k1, l1, flag);
-
- if (!flag) {
- BlockCanBuildEvent event = new BlockCanBuildEvent(Type.BLOCK_CANBUILD, getWorld().getBlockAt(j1, k1, l1), i1, superResult);
- server.getPluginManager().callEvent(event);
-
- return event.isBuildable();
- } else {
- return superResult;
- }
+ boolean superResult = super.a(i1, j1, k1, l1, flag);
+
+ if (!flag) {
+ BlockCanBuildEvent event = new BlockCanBuildEvent(Type.BLOCK_CANBUILD, getWorld().getBlockAt(j1, k1, l1), i1, superResult);
+ server.getPluginManager().callEvent(event);
+
+ return event.isBuildable();
+ } else {
+ return superResult;
+ }
}
// CraftBukkit stop
-
+
public void f() {
super.f();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/CraftLivingEntity.java
index 8f753386..9212bad9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftLivingEntity.java
@@ -7,7 +7,7 @@ import org.bukkit.LivingEntity;
public class CraftLivingEntity extends CraftEntity implements LivingEntity {
private EntityLiving entity;
-
+
public CraftLivingEntity(final CraftServer server, final EntityLiving entity) {
super(server, entity);
this.entity = entity;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 1fe1ee44..086343f8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1,15 +1,12 @@
-
package org.bukkit.craftbukkit;
import java.io.File;
-import java.util.HashMap;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.minecraft.server.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.ServerConfigurationManager;
-import net.minecraft.server.WorldServer;
import org.bukkit.*;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.SimplePluginManager;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 5e6d20d7..322065f2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -16,7 +16,7 @@ public class CraftWorld implements World {
public CraftWorld(WorldServer world) {
this.world = world;
}
-
+
public Block getBlockAt(int x, int y, int z) {
BlockCoordinate loc = new BlockCoordinate(x, y, z);
Block block = blockCache.get(loc);
@@ -78,7 +78,7 @@ public class CraftWorld implements World {
private final class ChunkCoordinate {
public final int x;
public final int z;
-
+
public ChunkCoordinate(final int x, final int z) {
this.x = x;
this.z = z;
@@ -115,7 +115,7 @@ public class CraftWorld implements World {
public final int x;
public final int y;
public final int z;
-
+
public BlockCoordinate(final int x, final int y, final int z) {
this.x = x;
this.y = y;
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index d2543b5e..786e56d8 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -6,7 +6,7 @@ import net.minecraft.server.MinecraftServer;
public class Main {
public static void main(String[] args) {
// Todo: Installation script
-
+
try {
MinecraftServer.main(args);
} catch (Throwable t) {