mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 13:07:06 +01:00
Fixed new type reporting in BlockFade event for snow and ice. Thanks DiddiZ!
This commit is contained in:
parent
831d97c8de
commit
28b3c9b0d7
2 changed files with 2 additions and 2 deletions
|
@ -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 a new issue