2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/level/block/BlockPlant.java
|
|
|
|
+++ b/net/minecraft/world/level/block/BlockPlant.java
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -23,7 +23,14 @@
|
2015-01-31 00:09:45 +01:00
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|
2021-11-21 23:00:00 +01:00
|
|
|
public 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);
|
2018-07-15 02:00:00 +02:00
|
|
|
+ // CraftBukkit start
|
2021-11-21 23:00:00 +01:00
|
|
|
+ if (!iblockdata.canSurvive(generatoraccess, blockposition)) {
|
2018-07-15 02:00:00 +02:00
|
|
|
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(generatoraccess, blockposition).isCancelled()) {
|
2021-11-21 23:00:00 +01:00
|
|
|
+ return Blocks.AIR.defaultBlockState();
|
2015-01-31 00:09:45 +01:00
|
|
|
+ }
|
2018-07-15 02:00:00 +02:00
|
|
|
+ }
|
2021-11-21 23:00:00 +01:00
|
|
|
+ return super.updateShape(iblockdata, enumdirection, iblockdata1, generatoraccess, blockposition, blockposition1);
|
2018-07-15 02:00:00 +02:00
|
|
|
+ // CraftBukkit end
|
|
|
|
}
|
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|