diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-08-29 16:09:13 +0100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-08-29 16:09:13 +0100 |
commit | f165d4082d36e181d6b2df06d4937688716f6cdc (patch) | |
tree | 4edfbbe4e7f172ca4097203f4cb6099b564758e9 /src/main/java/net/minecraft/server/BlockIce.java | |
parent | 1e8bbbfbd59fce79d138043f423081732b010e44 (diff) | |
download | craftbukkit-f165d4082d36e181d6b2df06d4937688716f6cdc.tar craftbukkit-f165d4082d36e181d6b2df06d4937688716f6cdc.tar.gz craftbukkit-f165d4082d36e181d6b2df06d4937688716f6cdc.tar.lz craftbukkit-f165d4082d36e181d6b2df06d4937688716f6cdc.tar.xz craftbukkit-f165d4082d36e181d6b2df06d4937688716f6cdc.zip |
Refactored some code from nms to ob for minimal diffs
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockIce.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockIce.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/main/java/net/minecraft/server/BlockIce.java b/src/main/java/net/minecraft/server/BlockIce.java index 16044958..44f3573b 100644 --- a/src/main/java/net/minecraft/server/BlockIce.java +++ b/src/main/java/net/minecraft/server/BlockIce.java @@ -1,8 +1,7 @@ package net.minecraft.server; import java.util.Random; - -import org.bukkit.event.block.BlockFadeEvent; // CraftBukkit +import org.bukkit.craftbukkit.event.CraftEventFactory; public class BlockIce extends BlockBreakable { @@ -28,13 +27,7 @@ public class BlockIce extends BlockBreakable { public void a(World world, int i, int j, int k, Random random) { if (world.a(EnumSkyBlock.BLOCK, i, j, k) > 11 - Block.q[this.id]) { // CraftBukkit start - org.bukkit.block.BlockState blockState = world.getWorld().getBlockAt(i, j, k).getState(); - blockState.setTypeId(Block.STATIONARY_WATER.id); - - BlockFadeEvent event = new BlockFadeEvent(blockState.getBlock(), blockState); - world.getServer().getPluginManager().callEvent(event); - - if (event.isCancelled()) { + if (CraftEventFactory.callBlockFadeEvent(world.getWorld().getBlockAt(i, j, k), Block.STATIONARY_WATER.id).isCancelled()) { return; } // CraftBukkit end |