diff options
author | Erik Broes <erikbroes@ripe.net> | 2011-01-11 09:25:13 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@ripe.net> | 2011-01-11 09:27:35 +0100 |
commit | 22dab8e9855b1d2aabb1ba10b16ebd5ae5943da4 (patch) | |
tree | 879d89e9f5d260f70a8199c42c1b0320b423fe17 /src/main/java/net/minecraft/server/BlockFlowing.java | |
parent | 75654e8db5b97497f6285266a1116a536d80720c (diff) | |
download | craftbukkit-22dab8e9855b1d2aabb1ba10b16ebd5ae5943da4.tar craftbukkit-22dab8e9855b1d2aabb1ba10b16ebd5ae5943da4.tar.gz craftbukkit-22dab8e9855b1d2aabb1ba10b16ebd5ae5943da4.tar.lz craftbukkit-22dab8e9855b1d2aabb1ba10b16ebd5ae5943da4.tar.xz craftbukkit-22dab8e9855b1d2aabb1ba10b16ebd5ae5943da4.zip |
Updated against new mc-dev format, takes out quite some casting troubles at the cost of extra ()'s
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockFlowing.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockFlowing.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java index cc1dd943..58a7a417 100644 --- a/src/main/java/net/minecraft/server/BlockFlowing.java +++ b/src/main/java/net/minecraft/server/BlockFlowing.java @@ -1,12 +1,13 @@ package net.minecraft.server; - import java.util.Random; +// CraftBukkit start import org.bukkit.BlockFace; import org.bukkit.craftbukkit.CraftBlock; import org.bukkit.event.Event.Type; import org.bukkit.event.block.BlockFromToEvent; +// CraftBukkit end public class BlockFlowing extends BlockFluids { @@ -86,8 +87,8 @@ public class BlockFlowing extends BlockFluids { } else { i(world, i1, j1, k1); } - - // Craftbukkit start + + // 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 @@ -101,6 +102,7 @@ public class BlockFlowing extends BlockFluids { world.b(i1, j1 - 1, k1, bh, l1 + 8); } } + // CraftBukkit end } else if (l1 >= 0 && (l1 == 0 || k(world, i1, j1 - 1, k1))) { boolean aflag[] = j(world, i1, j1, k1); int k2 = l1 + byte0; @@ -111,10 +113,10 @@ public class BlockFlowing extends BlockFluids { if (k2 >= 8) { return; } - // Craftbukkit all four cardinal directions. Do not change the order! + // CraftBukkit start - all four cardinal directions. Do not change the order! BlockFace[] faces = new BlockFace[]{ BlockFace.North, BlockFace.South, BlockFace.East, BlockFace.West }; int index = 0; - for (BlockFace currentFace : faces) { + for (BlockFace currentFace: faces) { if (aflag[index]) { BlockFromToEvent event = new BlockFromToEvent(Type.BLOCK_FLOW, source, currentFace); ((WorldServer) world).getServer().getPluginManager().callEvent(event); @@ -124,8 +126,8 @@ public class BlockFlowing extends BlockFluids { } index++; } + // CraftBukkit end } - // Craftbukkit stop } private void f(World world, int i1, int j1, int k1, int l1) { @@ -278,4 +280,3 @@ public class BlockFlowing extends BlockFluids { } } } - |