Changed tabs to 4 spaces, removed unnecessary imports
This commit is contained in:
parent
84bf373c55
commit
f199cc7190
@ -56,8 +56,8 @@ public class BlockFlowing extends BlockFluids
|
|||||||
if(world.d(i1, j1 - 1, k1))
|
if(world.d(i1, j1 - 1, k1))
|
||||||
j2 = 0;
|
j2 = 0;
|
||||||
else
|
else
|
||||||
if(world.c(i1, j1 - 1, k1) == bs && world.b(i1, j1, k1) == 0)
|
if(world.c(i1, j1 - 1, k1) == bs && world.b(i1, j1, k1) == 0)
|
||||||
j2 = 0;
|
j2 = 0;
|
||||||
if(bs == Material.g && l1 < 8 && j2 < 8 && j2 > l1 && random.nextInt(4) != 0)
|
if(bs == Material.g && l1 < 8 && j2 < 8 && j2 > l1 && random.nextInt(4) != 0)
|
||||||
{
|
{
|
||||||
j2 = l1;
|
j2 = l1;
|
||||||
@ -76,8 +76,8 @@ public class BlockFlowing extends BlockFluids
|
|||||||
world.g(i1, j1, k1, bh);
|
world.g(i1, j1, k1, bh);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
if(flag)
|
if(flag)
|
||||||
i(world, i1, j1, k1);
|
i(world, i1, j1, k1);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
i(world, i1, j1, k1);
|
i(world, i1, j1, k1);
|
||||||
@ -88,40 +88,40 @@ public class BlockFlowing extends BlockFluids
|
|||||||
|
|
||||||
if(l(world, i1, j1 - 1, k1))
|
if(l(world, i1, j1 - 1, k1))
|
||||||
{
|
{
|
||||||
// Craftbucket send "down" to the server
|
// Craftbucket send "down" to the server
|
||||||
BlockFromToEvent blockFlow = new BlockFromToEvent(Type.BLOCK_FLOW, source, BlockFace.Down);
|
BlockFromToEvent blockFlow = new BlockFromToEvent(Type.BLOCK_FLOW, source, BlockFace.Down);
|
||||||
((WorldServer) world).getServer().getPluginManager().callEvent(blockFlow);
|
((WorldServer) world).getServer().getPluginManager().callEvent(blockFlow);
|
||||||
|
|
||||||
if (!blockFlow.isCancelled()) {
|
if (!blockFlow.isCancelled()) {
|
||||||
if(l1 >= 8)
|
if(l1 >= 8)
|
||||||
world.b(i1, j1 - 1, k1, bh, l1);
|
world.b(i1, j1 - 1, k1, bh, l1);
|
||||||
else
|
else
|
||||||
world.b(i1, j1 - 1, k1, bh, l1 + 8);
|
world.b(i1, j1 - 1, k1, bh, l1 + 8);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
if(l1 >= 0 && (l1 == 0 || k(world, i1, j1 - 1, k1)))
|
if(l1 >= 0 && (l1 == 0 || k(world, i1, j1 - 1, k1)))
|
||||||
{
|
{
|
||||||
boolean aflag[] = j(world, i1, j1, k1);
|
boolean aflag[] = j(world, i1, j1, k1);
|
||||||
int k2 = l1 + byte0;
|
int k2 = l1 + byte0;
|
||||||
if(l1 >= 8)
|
if(l1 >= 8)
|
||||||
k2 = 1;
|
k2 = 1;
|
||||||
if(k2 >= 8)
|
if(k2 >= 8)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Craftbukkit start
|
// Craftbukkit start
|
||||||
BlockFace[] faces = new BlockFace[]{ BlockFace.North, BlockFace.South, BlockFace.East, BlockFace.West };
|
BlockFace[] faces = new BlockFace[]{ BlockFace.North, BlockFace.South, BlockFace.East, BlockFace.West };
|
||||||
for (BlockFace currentFace : faces) {
|
for (BlockFace currentFace : faces) {
|
||||||
int index = 0;
|
int index = 0;
|
||||||
if (aflag[index]) {
|
if (aflag[index]) {
|
||||||
BlockFromToEvent event = new BlockFromToEvent(Type.BLOCK_FLOW, source, currentFace);
|
BlockFromToEvent event = new BlockFromToEvent(Type.BLOCK_FLOW, source, currentFace);
|
||||||
((WorldServer) world).getServer().getPluginManager().callEvent(event);
|
((WorldServer) world).getServer().getPluginManager().callEvent(event);
|
||||||
if (!event.isCancelled())
|
if (!event.isCancelled())
|
||||||
f(world, i1 + currentFace.getModX(), j1, k1 + currentFace.getModZ(), k2);
|
f(world, i1 + currentFace.getModX(), j1, k1 + currentFace.getModZ(), k2);
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
|
}
|
||||||
|
// Craftbukkit stop
|
||||||
}
|
}
|
||||||
// Craftbukkit stop
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void f(World world, int i1, int j1, int k1, int l1)
|
private void f(World world, int i1, int j1, int k1, int l1)
|
||||||
|
@ -19,7 +19,7 @@ import org.bukkit.craftbukkit.CraftServer;
|
|||||||
|
|
||||||
|
|
||||||
public class MinecraftServer
|
public class MinecraftServer
|
||||||
implements ICommandListener, Runnable {
|
implements ICommandListener, Runnable {
|
||||||
|
|
||||||
public static Logger a = Logger.getLogger("Minecraft");
|
public static Logger a = Logger.getLogger("Minecraft");
|
||||||
public static HashMap b = new HashMap();
|
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());
|
a.info((new StringBuilder()).append("Starting Minecraft server on ").append(s.length() != 0 ? s : "*").append(":").append(i1).toString());
|
||||||
try {
|
try {
|
||||||
c = new NetworkListenThread(this, inetaddress, i1);
|
c = new NetworkListenThread(this, inetaddress, i1);
|
||||||
// CraftBukkit: Be more generic; IOException -> Throwable
|
// CraftBukkit: Be more generic; IOException -> Throwable
|
||||||
} catch (Throwable ioexception) {
|
} catch (Throwable ioexception) {
|
||||||
a.warning("**** FAILED TO BIND TO PORT!");
|
a.warning("**** FAILED TO BIND TO PORT!");
|
||||||
a.log(Level.WARNING, (new StringBuilder()).append("The exception was: ").append(ioexception.toString()).toString());
|
a.log(Level.WARNING, (new StringBuilder()).append("The exception was: ").append(ioexception.toString()).toString());
|
||||||
|
@ -14,7 +14,7 @@ import org.bukkit.event.player.PlayerMoveEvent;
|
|||||||
|
|
||||||
|
|
||||||
public class NetServerHandler extends NetHandler
|
public class NetServerHandler extends NetHandler
|
||||||
implements ICommandListener {
|
implements ICommandListener {
|
||||||
|
|
||||||
public static Logger a = Logger.getLogger("Minecraft");
|
public static Logger a = Logger.getLogger("Minecraft");
|
||||||
public NetworkManager b;
|
public NetworkManager b;
|
||||||
|
@ -53,7 +53,7 @@ public class WorldServer extends World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public CraftServer getServer() {
|
public CraftServer getServer() {
|
||||||
return server;
|
return server;
|
||||||
}
|
}
|
||||||
// CraftBukkit stop
|
// CraftBukkit stop
|
||||||
|
|
||||||
@ -92,16 +92,16 @@ public class WorldServer extends World {
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@Override
|
@Override
|
||||||
public boolean a(int i1, int j1, int k1, int l1, boolean flag) {
|
public boolean a(int i1, int j1, int k1, int l1, boolean flag) {
|
||||||
boolean superResult = super.a(i1, j1, k1, l1, flag);
|
boolean superResult = super.a(i1, j1, k1, l1, flag);
|
||||||
|
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
BlockCanBuildEvent event = new BlockCanBuildEvent(Type.BLOCK_CANBUILD, getWorld().getBlockAt(j1, k1, l1), i1, superResult);
|
BlockCanBuildEvent event = new BlockCanBuildEvent(Type.BLOCK_CANBUILD, getWorld().getBlockAt(j1, k1, l1), i1, superResult);
|
||||||
server.getPluginManager().callEvent(event);
|
server.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
return event.isBuildable();
|
return event.isBuildable();
|
||||||
} else {
|
} else {
|
||||||
return superResult;
|
return superResult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// CraftBukkit stop
|
// CraftBukkit stop
|
||||||
|
|
||||||
|
@ -1,15 +1,12 @@
|
|||||||
|
|
||||||
package org.bukkit.craftbukkit;
|
package org.bukkit.craftbukkit;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import net.minecraft.server.EntityPlayerMP;
|
import net.minecraft.server.EntityPlayerMP;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.server.ServerConfigurationManager;
|
import net.minecraft.server.ServerConfigurationManager;
|
||||||
import net.minecraft.server.WorldServer;
|
|
||||||
import org.bukkit.*;
|
import org.bukkit.*;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.plugin.SimplePluginManager;
|
import org.bukkit.plugin.SimplePluginManager;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user