[Bleeding] Ice in the nether fades to air. Fixes BUKKIT-5373

Previously, whenever BlockFadeEvent was called for ice melting, it returned
the new BlockState with a type of Material.STATIONARY_WATER. However, in
the Nether, ice melting does not form water, but is simply replaced by air
instead. This changes the event to use the proper BlockState based on
whether the block is located in the Nether or not.
This commit is contained in:
GJ 2014-02-06 08:34:07 -05:00 committed by Travis Watkins
parent 0a179711aa
commit 2a2cdd4885

View File

@ -44,7 +44,7 @@ public class BlockIce extends BlockHalfTransparent {
public void a(World world, int i, int j, int k, Random random) { public void a(World world, int i, int j, int k, Random random) {
if (world.b(EnumSkyBlock.BLOCK, i, j, k) > 11 - this.k()) { if (world.b(EnumSkyBlock.BLOCK, i, j, k) > 11 - this.k()) {
// CraftBukkit start // CraftBukkit start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world.getWorld().getBlockAt(i, j, k), Blocks.STATIONARY_WATER).isCancelled()) { if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world.getWorld().getBlockAt(i, j, k), world.worldProvider.f ? Blocks.AIR : Blocks.STATIONARY_WATER).isCancelled()) {
return; return;
} }
// CraftBukkit end // CraftBukkit end