mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
65bc2541a3
By: md_5 <git@md-5.net>
18 lines
1 KiB
Diff
18 lines
1 KiB
Diff
--- a/net/minecraft/world/level/block/BlockPlant.java
|
|
+++ b/net/minecraft/world/level/block/BlockPlant.java
|
|
@@ -26,7 +26,14 @@
|
|
|
|
@Override
|
|
protected IBlockData updateShape(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) {
|
|
- return !iblockdata.canSurvive(generatoraccess, blockposition) ? Blocks.AIR.defaultBlockState() : super.updateShape(iblockdata, enumdirection, iblockdata1, generatoraccess, blockposition, blockposition1);
|
|
+ // CraftBukkit start
|
|
+ if (!iblockdata.canSurvive(generatoraccess, blockposition)) {
|
|
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(generatoraccess, blockposition).isCancelled()) {
|
|
+ return Blocks.AIR.defaultBlockState();
|
|
+ }
|
|
+ }
|
|
+ return super.updateShape(iblockdata, enumdirection, iblockdata1, generatoraccess, blockposition, blockposition1);
|
|
+ // CraftBukkit end
|
|
}
|
|
|
|
@Override
|