Files
CatServer/patches/net/minecraft/block/BlockSnowBlock.java.patch
2019-02-24 22:29:41 +08:00

21 lines
885 B
Diff

--- ../src-base/minecraft/net/minecraft/block/BlockSnowBlock.java
+++ ../src-work/minecraft/net/minecraft/block/BlockSnowBlock.java
@@ -4,6 +4,7 @@
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.util.math.BlockPos;
@@ -33,6 +34,9 @@
{
if (worldIn.getLightFor(EnumSkyBlock.BLOCK, pos) > 11)
{
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldIn.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()), Blocks.AIR).isCancelled()) {
+ return;
+ }
this.dropBlockAsItem(worldIn, pos, worldIn.getBlockState(pos), 0);
worldIn.setBlockToAir(pos);
}