diff --git a/nms-patches/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.patch b/nms-patches/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.patch new file mode 100644 index 000000000..6dda67cf7 --- /dev/null +++ b/nms-patches/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.patch @@ -0,0 +1,15 @@ +--- a/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java ++++ b/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java +@@ -38,6 +38,12 @@ + if (worldserver.getBlockState(blockposition2).isAir()) { + IBlockData iblockdata = block.defaultBlockState(); + ++ // CraftBukkit start ++ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entityliving, blockposition2, iblockdata)) { ++ memoryaccessor2.erase(); ++ return true; ++ } ++ // CraftBukkit end + worldserver.setBlock(blockposition2, iblockdata, 3); + worldserver.gameEvent(GameEvent.BLOCK_PLACE, blockposition2, GameEvent.a.of(entityliving, iblockdata)); + worldserver.playSound((EntityHuman) null, (Entity) entityliving, SoundEffects.FROG_LAY_SPAWN, SoundCategory.BLOCKS, 1.0F, 1.0F);