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/BlockLever.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/BlockLever.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockLever.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/net/minecraft/server/BlockLever.java b/src/main/java/net/minecraft/server/BlockLever.java index b8204e16..796c0757 100644 --- a/src/main/java/net/minecraft/server/BlockLever.java +++ b/src/main/java/net/minecraft/server/BlockLever.java @@ -1,10 +1,11 @@ package net.minecraft.server; +// CraftBukkit start import org.bukkit.craftbukkit.CraftBlock; import org.bukkit.craftbukkit.CraftPlayer; import org.bukkit.event.Event.Type; import org.bukkit.event.block.BlockInteractEvent; - +// CraftBukkit end public class BlockLever extends Block { @@ -138,21 +139,22 @@ public class BlockLever extends Block { if (world.z) { return true; } - - // Craftbukkit start - Interact Lever + + // CraftBukkit start - Interact Lever CraftBlock block = (CraftBlock) ((WorldServer) world).getWorld().getBlockAt(i, j, k); CraftPlayer player = new CraftPlayer(((WorldServer) world).getServer(), (EntityPlayerMP) entityplayer); BlockInteractEvent bie = new BlockInteractEvent(Type.BLOCK_INTERACT, block, player); - + ((WorldServer) world).getServer().getPluginManager().callEvent(bie); - + // Craftbukkit the client updates the doors before the server does it's thing. // Forcibly send correct data. if (bie.isCancelled()) { ((EntityPlayerMP) entityplayer).a.b(new Packet53BlockChange(i, j, k, (WorldServer) world)); return true; } - + // CraftBukkit end + int l = world.b(i, j, k); int i1 = l & 7; int j1 = 8 - (l & 8); @@ -228,4 +230,3 @@ public class BlockLever extends Block { return true; } } - |