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

27 lines
1.5 KiB
Diff

--- ../src-base/minecraft/net/minecraft/block/BlockConcretePowder.java
+++ ../src-work/minecraft/net/minecraft/block/BlockConcretePowder.java
@@ -27,11 +27,10 @@
this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
}
- public void onEndFalling(World worldIn, BlockPos pos, IBlockState p_176502_3_, IBlockState p_176502_4_)
+ public void onEndFalling(World worldIn, BlockPos pos, IBlockState blockState, IBlockState blockState1)
{
- if (p_176502_4_.getMaterial().isLiquid())
- {
- worldIn.setBlockState(pos, Blocks.CONCRETE.getDefaultState().withProperty(BlockColored.COLOR, p_176502_3_.getValue(COLOR)), 3);
+ if (blockState1.getMaterial().isLiquid() && worldIn.getBlockState(pos).getBlock() != Blocks.CONCRETE) { // CraftBukkit - don't double concrete
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(worldIn, pos, Blocks.CONCRETE.getDefaultState().withProperty(BlockColored.COLOR, blockState.getValue(BlockConcretePowder.COLOR)), null); // CraftBukkit
}
}
@@ -55,7 +54,7 @@
if (flag)
{
- worldIn.setBlockState(pos, Blocks.CONCRETE.getDefaultState().withProperty(BlockColored.COLOR, state.getValue(COLOR)), 3);
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(worldIn, pos, Blocks.CONCRETE.getDefaultState().withProperty(BlockColored.COLOR, state.getValue(BlockConcretePowder.COLOR)), null);
}
return flag;