--- a/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java
+++ b/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java
@@ -37,6 +37,12 @@
             if (world.getBlockState(blockPos2).getCollisionShape(world, blockPos2).getFaceShape(Direction.UP).isEmpty() && world.getFluidState(blockPos2).is(Fluids.WATER)) {
                 BlockPos blockPos3 = blockPos2.above();
                 if (world.getBlockState(blockPos3).isAir()) {
+                    // Paper start
+                    if (org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockPos3, this.spawnBlock.defaultBlockState()).isCancelled()) {
+                        entity.getBrain().eraseMemory(this.memoryModule); // forgot pregnant memory
+                        return;
+                    }
+                    // Paper end
                     world.setBlock(blockPos3, this.spawnBlock.defaultBlockState(), 3);
                     world.playSound((Player)null, entity, SoundEvents.FROG_LAY_SPAWN, SoundSource.BLOCKS, 1.0F, 1.0F);
                     entity.getBrain().eraseMemory(this.memoryModule);
