aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/world/level/block/BlockPlant.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/og/net/minecraft/world/level/block/BlockPlant.patch')
-rw-r--r--patch-remap/og/net/minecraft/world/level/block/BlockPlant.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/level/block/BlockPlant.patch b/patch-remap/og/net/minecraft/world/level/block/BlockPlant.patch
new file mode 100644
index 0000000000..689f95275a
--- /dev/null
+++ b/patch-remap/og/net/minecraft/world/level/block/BlockPlant.patch
@@ -0,0 +1,18 @@
+--- a/net/minecraft/world/level/block/BlockPlant.java
++++ b/net/minecraft/world/level/block/BlockPlant.java
+@@ -26,7 +26,14 @@
+
+ @Override
+ 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);
++ // 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