mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 03:48:01 +01:00
Fixed new type reporting in BlockFade event for snow and ice. Thanks DiddiZ!
This commit is contained in:
parent
831d97c8de
commit
28b3c9b0d7
@ -29,7 +29,7 @@ public class BlockIce extends BlockBreakable {
|
|||||||
if (world.a(EnumSkyBlock.BLOCK, i, j, k) > 11 - Block.q[this.id]) {
|
if (world.a(EnumSkyBlock.BLOCK, i, j, k) > 11 - Block.q[this.id]) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
org.bukkit.block.BlockState blockState = world.getWorld().getBlockAt(i, j, k).getState();
|
org.bukkit.block.BlockState blockState = world.getWorld().getBlockAt(i, j, k).getState();
|
||||||
blockState.setTypeId(this.id);
|
blockState.setTypeId(Block.STATIONARY_WATER.id);
|
||||||
|
|
||||||
BlockFadeEvent event = new BlockFadeEvent(blockState.getBlock(), blockState);
|
BlockFadeEvent event = new BlockFadeEvent(blockState.getBlock(), blockState);
|
||||||
world.getServer().getPluginManager().callEvent(event);
|
world.getServer().getPluginManager().callEvent(event);
|
||||||
|
@ -79,7 +79,7 @@ public class BlockSnow extends Block {
|
|||||||
if (world.a(EnumSkyBlock.BLOCK, i, j, k) > 11) {
|
if (world.a(EnumSkyBlock.BLOCK, i, j, k) > 11) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
org.bukkit.block.BlockState blockState = world.getWorld().getBlockAt(i, j, k).getState();
|
org.bukkit.block.BlockState blockState = world.getWorld().getBlockAt(i, j, k).getState();
|
||||||
blockState.setTypeId(this.id);
|
blockState.setTypeId(0);
|
||||||
|
|
||||||
BlockFadeEvent event = new BlockFadeEvent(blockState.getBlock(), blockState);
|
BlockFadeEvent event = new BlockFadeEvent(blockState.getBlock(), blockState);
|
||||||
world.getServer().getPluginManager().callEvent(event);
|
world.getServer().getPluginManager().callEvent(event);
|
||||||
|
Loading…
Reference in New Issue
Block a user