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