2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/BlockPlant.java
|
|
|
|
+++ b/net/minecraft/server/BlockPlant.java
|
2019-04-23 04:00:00 +02:00
|
|
|
@@ -14,7 +14,14 @@
|
2015-01-31 00:09:45 +01:00
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|
2018-07-15 02:00:00 +02:00
|
|
|
public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) {
|
|
|
|
- return !iblockdata.canPlace(generatoraccess, blockposition) ? Blocks.AIR.getBlockData() : super.updateState(iblockdata, enumdirection, iblockdata1, generatoraccess, blockposition, blockposition1);
|
|
|
|
+ // CraftBukkit start
|
|
|
|
+ if (!iblockdata.canPlace(generatoraccess, blockposition)) {
|
|
|
|
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(generatoraccess, blockposition).isCancelled()) {
|
|
|
|
+ return Blocks.AIR.getBlockData();
|
2015-01-31 00:09:45 +01:00
|
|
|
+ }
|
2018-07-15 02:00:00 +02:00
|
|
|
+ }
|
|
|
|
+ return super.updateState(iblockdata, enumdirection, iblockdata1, generatoraccess, blockposition, blockposition1);
|
|
|
|
+ // CraftBukkit end
|
|
|
|
}
|
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|